[Extendflash] Add AS code...
Derek Vadneau
extendflash_again at thunderunderground.com
Wed Jan 25 16:33:51 PST 2006
RTFM: Read The Friendly Manual ;)
Objects > Frame object > frame.actionScript
fl.getDocumentDOM().getTimeline().layers[0].frames[0].actionScript =
'stop();';
It's a property that you can read from and write to.
If you want the user to select the layer/frame instead of hardcoding it,
you can use:
var selectedFrames =
fl.getDocumentDOM().getTimeline().getSelectedFrames();
The return is an array that contains the info you need:
var currentAS =
fl.getDocumentDOM().getTimeline().layers[selectedFrames[0]].frames[selectedFrames[1]].actionScript
fl.getDocumentDOM().getTimeline().layers[selectedFrames[0]].frames[selectedFrames[1]].actionScript
= newAS+'\\n'+currentAS;
Where newAS is the AS you want to add. I added a newline, but you might
want to add more (or none).
Derek Vadneau
----- Original Message -----
From: "Jay" <jaym at ontargetllc.com>
To: <extendflash at flashguru.co.uk>
Sent: Wednesday, January 25, 2006 4:08 PM
Subject: SPAM-LOW: Re: [Extendflash] Add AS code...
I hope this isn't a dumb question but how exactly would I go about doing
that?
Jay
More information about the Extendflash
mailing list