I tried ExternalInterface and faced similar problem. Then I realized, I don't really need ExternalInterface because it converts things to XML which is further deserialized in _javascript_. That is the reason of all \r \n problems.
In this case, I just wanted to eval () some script in browser's context and don't expect any return in ActionScript. navigateToURL (..) made sense to me.
-abdul
On 6/16/06,
drome.dario <[EMAIL PROTECTED]> wrote:
Abdul,
Your component works fine (as expected) in Safari and FireFox for
MacOSX.
In my component, I use ExternalInterface.call( "eval", jscode ) to
inject the _javascript_ code into the wrapper and it has problems when
in the jsocde variable there are \n, \r and so on (i have had to
replace them)
However, your component does not have these problems and I have found
that navigateToURL( "_javascript_:eval('var a;\n\rvar b;')" ) behave
different than ExernalInterface.call( "eval", "'var a;\n\rvar b;" );
Weird, isn't. Should the behave identically?
--- In [email protected], "Abdul Qabiz" <[EMAIL PROTECTED]>
wrote:
>
>http://www.abdulqabiz.com/blog/archives/macromedia_flex/a_mxml_compone
n.php
>
> You can use this component to write _javascript_ code within MXML
document,
> when application is initialized all _javascript_ code would be
exported to
> container HTML document's context.
>
> I just wanted to do, infact had filed an ECR so that compiler team
can do
> it. But it was easy to do with ActionScript. I have only tested on
> Firefox-windows and it works.
>
> Let me know, if you like it :)
>
> -abdul
>
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
![]()
SPONSORED LINKS
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___
Reply via email to

