My Books

  • Follow me on Twitter
My Photo

Subscribe my blog

  • Get this widget from Widgetbox
  • Add to Google
  • RSS FEEDS
  • Enter your Email here to subscribe :



    Powered by FeedBlitz

Blog Widget by LinkWithin

« Flash Lite Friday Digest #18 : a compact weekly overview from the world of Flash Lite | Main | Learn how the Nokia S60 user interface works »

Comments

Pavel Simek

To handle this issue, we use a flash variable containing the name of the JS function that has to be called after the SWF is loaded and inited (FlashVars="onInit=myFunction").

This is the only FlashVar needed (all further params and calls are implemented using FABridge).

Why any more complicated solution?

Francesco Rapanà

Your solution works well when you want to call a Javascript function on a Flex event.
In the case of "onload" event it is possible to use your solution because JS always starts earlier then flash movie.

But in our context your approach does not work.
In fact if you have a Javascript event (i.e. onmousedown on an HTML button) that needs to call an Actionscript 3 method,
you don't know if the swf movie has been already loaded.

The solution of using an ObjectManager, that I'll share with you soon, will solve all the issues.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment