Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to initialize and then start a level0 script

Status
Not open for further replies.

SimJim

Programmer
Apr 7, 2003
26
KR
I need to run a counter to use for controlling animations througout a diagram. I want to test them before linking them to a database via Cold Fusion (That's another story).
How do I make sure not to burden the CPU with calcs, example:

onLoad{ //Is there such a thing as this, if not what should precede variables in the root script that need to be initialized?

Range_Of_Movement=100

OnEnterFrame //???????? This is the part I expect to have run continuously. I'm trying to modify several instances of the same MC that has a button I want to slide, which is two mc's deep, as follows:

x+=.02;
c = Math.cos(x)
for (i=1, i<13, i++){
_level0.my_pane.(&quot;nested_mc&quot; + i).nested_mc2.pointer_button._y = (c * rangeofmovement)
}

//etc. etc. for all the other animated objects I want to drive.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top