23
Sep 09

update, and flash-javascript

So im not as far along with the video as I would have hoped to be by now. It’s really time consuming to figure out what to draw/ animate for the video. That and I had some stuff come up that slowed me down.

I was able this weekend to make my first flash/javascript connection. Something I was doing in javascript required me to be able to control a flash video. Thankfully, mootools was to the rescue. Sadly mootool’s documentation on how to make it happen was way less than par. It took me a while to find out what I had to do to make it work, but in the end, a nice blog came to the rescue. So for anyone wondering how to get mootools’ SWIFF remote working here is some code:

Swiff.remote($(VarNameOfSwiffInstance), 'NameOfFlashFunction');

TRUST ME! You need: $(VarNameOfSwiffInstance)... it must be wrapped in the $()

and in flash you need this:

import flash.external.ExternalInterface;
ExternalInterface.addCallback("NameOfFlashFunction", NameOfFlashFunction);

Im not sure why you need it in quotes as well... But it is what worked. So there!


Comments are closed.


Copyright © 2012 ASM | a blog
Proudly powered by WordPress, Free WordPress Themes, and Search Marketing