| Ultrashock Forums
• AS2 - loop a function ?? |
Member Blogs | ||
![]() |
||||
| Search this Thread | Thread Tools | Display Modes |
|
|
|||||||||||||||||||||||||
![]() |
Ultrashock Member Comments:
|
2008-07-07
#2 |
||
|
|
2008-07-08
#3 |
||
|
hi isocase, big thx for your reply but its doesnt work??? any ideas or am i doing something wrong my clip on stgae is called mc
|
|
|
2008-07-08
#4 |
||
|
How man clips do you have on the stage?
|
|
|
2008-07-08
#5 |
||
|
just 1 called mc...
|
|
|
2008-07-08
#6 |
||
|
Ahh thats why it wasn't working because you were looking for mc0, mc1...which don't even exist. Try the below out, and if your only using one mc what are you looping through? Code:
#include "lmc_tween.as"
var customEasing:String = "Linear";
for(var i:Number = 1; i < 4; i++)
{
regMe();
}
function regMe():Void
{
trace( "regMe method is running" );
mc.tween("_alpha",20,1,customEasing);
mc.alphaTo(100,1,customEasing,4);
mc.rotateTo(360,1,customEasing,4);
mc.scaleTo(250,1,customEasing,4);
mc.scaleTo(50,0.5,customEasing,5);
}
|
|
|
2008-07-08
#7 |
||
|
i was trying to build a set of tasks (regMe function ) with tween classes and then just loop for ever or by action. basically trying to loop my function...thx for all your help btw top man
|
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|





6 comments
| 201 views



Linear Mode
#include "lmc_tween.as" var customEasing:String = "Linear"; for(var i:Number = 1; i < 4; i++) { var mc:MovieClip = _root[ "mc" + i ]; regMe( mc ); } function regMe( target:MovieClip ):Void { target.tween("_alpha",20,1,customEasing); target.alphaTo(100,1,customEasing,4); target.rotateTo(360,1,customEasing,4); target.scaleTo(250,1,customEasing,4); target.scaleTo(50,0.5,customEasing,5); }