|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help me please
Hello,
I've an array of permanently changing values and I want that my movies m0-4 change to that framenumber in the array. First question, How can I do it with a for-loop? like: for(i=0;i<5;i++) { ???????? } Second question, WHY DOESN'T IT WORK? if I do m0.gotoandstop(40) if changes.... but not when I'm trying to get the value from the array :/ here's the original source code: m0.gotoandstop(actval[0]); m1.gotoandstop(actval[1]); m2.gotoandstop(actval[2]); m3.gotoandstop(actval[3]); m4.gotoandstop(actval[4]) stepnow = stepnow+step; gotoAndPlay(2); Thanks for any help |
|
#2
|
|||
|
|||
|
It's often best to resolve the retreval of values from array's before attempting to use them within other parts of your code. If you are having trouble a good way is to separate the processes and reintegrate them later.
Although in theory based on what you've said, something like: for(i=0; i<5;i++){ m[i].gotoAndStop(actval[i]); } should work fine, it's difficult to know with out the context of the code. If this won't work put in some extra steps to resolve the variables outside of the gotoAndStop() line. Also use trace commands to check that it is resolving you variables correctly. swoop |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Help me please |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|