http://edolecki.livejournal.com/

I have a nice shortcut for using ExternalInterface there.

- e.dolecki

On 4/20/06, Jon Robert <[EMAIL PROTECTED]> wrote:
> Thanks. I got it working.
>
> On 4/19/06, Mike Britton <[EMAIL PROTECTED]> wrote:
> >
> > Sorry about the crappily-formatted code - I'm writing it in GMail!
> >
> > FLASH:
> >
> > import flash.external.ExternalInterface;
> >
> > class blah
> > {
> >     var instance:Object = new Object();
> >     // Function alias for JavaScript
> >     var methodName:String = "goToCuePoint";
> >     // Function alias for Actionscript
> >     var method:Function = setPlayIndexByTrack;
> >
> >     function blah() {
> >             ExternalInterface.addCallback(methodName, instance, method);
> >     }
> >
> >     function setPlayIndexByTrack() {
> >       trace("dude, JS just called my AS!");
> >     }
> >
> > }
> >
> >
> > JS:
> >
> > <script language="JavaScript">
> >
> >     function getNextTrack() {
> >         thisMovie("mediaPlayer").goToCuePoint();
> >     }
> >
> >     function thisMovie( movieName ) {
> >         if (navigator.appName.indexOf("Microsoft") != -1) {
> >             return window[movieName];
> >         } else {
> >             return document[movieName];
> >         }
> >     }
> >
> > </script>
> >
> >
> >
> > hth,
> >
> > Mike
> > _______________________________________________
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to