Timeline.setguidelines() – Adobe Extending Flash Professional CS5 User Manual
Page 514
492
EXTENDING FLASH PROFESSIONAL
Timeline object
Last updated 5/2/2011
Description
Method; sets the property of the Frame object for the selected frames.
Example
The following example assigns the ActionScript
stop()
command to the first frame of the top layer in the current
document:
fl.getDocumentDOM().getTimeline().currentLayer = 0;
fl.getDocumentDOM().getTimeline().setSelectedFrames(0,0,true);
fl.getDocumentDOM().getTimeline().setFrameProperty("actionScript", "stop();");
The following example sets a motion tween from Frame 2 up to, but not including, Frame 5, of the current layer
(remember that index values are different from frame number values):
var doc = fl.getDocumentDOM();
doc.getTimeline().setFrameProperty("tweenType","motion",1,4);
timeline.setGuidelines()
Availability
Flash CS4 Professional.
Usage
timeline.setGuidelines(xmlString)
Parameters
xmlString
An XML string that contains information on the guidelines to apply.
Returns
A Boolean value of
true
if the guidelines are successfully applied;
false
otherwise.
Description
Method: replaces the guide lines for the timeline (View
> Guides
> Show Guides) with the information specified in
xmlString. To retrieve an XML string that can be passed to this method, use
To view the newly set guide lines, you may have to hide them and then view them.
Example
The following example applies the guide lines from one FLA file to another FLA file:
var doc0 = fl.documents[0];
var guides0 = doc0.timelines[0].getGuidelines();
var doc1 = fl.documents[1];
doc1.timelines[0].setGuidelines(guides0);