Calling AS3 function from html link - Javascript? php? swfaddress?
Posted
by wdense51
on Stack Overflow
See other posts from Stack Overflow
or by wdense51
Published on 2010-04-05T05:03:13Z
Indexed on
2010/04/05
5:13 UTC
Read the original article
Hit count: 424
I have an actionscript function that loads an external swf and is currently linked to a button in the same swf...
function btnClick(event:MouseEvent):void{
SoundMixer.stopAll();
removeChild(loader);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onSWFLoaded);
loader.load(movieSWF)
loader.x=Xpos
loader.y=Ypos
addChild(loader)
}
button.addEventListener(MouseEvent.CLICK,btnClick);
I'm wondering if there is a way to call this function from a link on the page that the swf is housed on. I'm guessing javascript, php or swfaddress would be the most likely way, but I'm unbelievably new to all this so I'm not sure where to start or how to go about it.
Any help would be appreciated.
© Stack Overflow or respective owner