I l @ ve RuBoard



What if I have a variable named the same thing as a movie clip? How do I differentiate between them in my code?


You can't. For example, if you have a movie clip instance at the root level named mine and you create a variable at the root level named mine, you will not be able to access that movie clip instance. Always use different names for movie clip instances and variables .


If I have a movie clip that uses all sorts of colors, how does setting the Color object of the movie clip affect it?


It changes each color depending on how it relates to the Color object. It is difficult to predict unless you are very good with colors. However, you can test the changes by choosing Advanced color in the Properties panel and then clicking the Settings button. You can then adjust the numbers and see the changes live.


If I can't trust the user 's computer time, how can I get a time that I trust?


Only server time is trustworthy, and then only if you trust your server. In most cases, for instance, in an e-commerce application, you don't need to trust the time on the client's machine because the server will apply its own time when the transaction is made. However, you can always set up your server to pass the time to the Flash movie via one of the external data methods discussed in Hour 10, "Creating and Controlling Text."


Can arrays store items of different types? Can an array contain numbers and strings?


Yes, an array can store data of mixed types. For instance, suppose that you had an array that stored mouse location and clicks. Most of the elements might be x and y locations, but some might be the string "click" to signify that a click was made at that point. You just have to make sure that the code that reads the array can handle what comes.

I l @ ve RuBoard

Sams Teach Yourself Flash MX ActionScript in 24 Hours
Sams Teach Yourself Flash MX ActionScript in 24 Hours
ISBN: 0672323850
EAN: 2147483647
Year: 2002
Pages: 272 © 2008-2017.
If you may any questions please contact us: