02.02.2013 Views

Flash MX 2004 Games : Art to ActionScript

Flash MX 2004 Games : Art to ActionScript

Flash MX 2004 Games : Art to ActionScript

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix A<br />

where ‘clipName’ is the name of the movie clip instance from the ‘_root’ level. You can use the<br />

same technique <strong>to</strong> move the frame within a <strong>Flash</strong> clip.<br />

sprite(n).telltarget(clipName)<br />

sprite(n).go<strong>to</strong>Frame(5)<br />

sprite(n).endtelltarget()<br />

You can set the properties of a clip using:<br />

For example,<br />

sprite(n).set<strong>Flash</strong>Property(clipName, #propertyName, value)<br />

sprite(2).set<strong>Flash</strong>Property("Cat", #x, 180)<br />

Figure A.4 Developing the road example in Direc<strong>to</strong>r <strong>MX</strong><br />

393

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!