Hi, I am new to Flex and would like some advice. I have a JS function that I would like to use within my Flex application. Can I embed/include the JS as is? Or do I need to convert the code to Actionscript or Flex? Which is more efficient? The code is triggered by the mouse_move so it needs to be responsive. I would appreciate any suggestions/advice. Thanks -b
Javascript and Flex/ActionscriptEmbedding JS code within Flex
Page 1 of 1
3 Replies - 1217 Views - Last Post: 21 January 2009 - 08:34 PM
Replies To: Javascript and Flex/Actionscript
#2
Re: Javascript and Flex/Actionscript
Posted 21 January 2009 - 04:32 PM
Depending on what the function does you may want to have it in your AS (for the flex/ flash app) but there are some cases where AS can't do what you want it to, at which point it is better to be doing things via JS and using an AS 2 JS communication library. You can find one of those libraries at adobe.com
HTH
HTH
#3
Re: Javascript and Flex/Actionscript
Posted 21 January 2009 - 05:08 PM
Ok, thanks, I'll check out the library. The function itself is converting a map x/y coordinate from an Albers projection to latitude/longitude value for display. Lots of variables and equations - - pretty much straight mathmatics.
#4
Re: Javascript and Flex/Actionscript
Posted 21 January 2009 - 08:34 PM
If that is the case you could just port it to Actionscript, that would probably be easiest (as people won't be able to easily steal your work).
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|