flash help please...
- Started
- Last post
- 8 Responses
- thosethat
ok, i'm cobbling something together in flash...
so far so good...
what i need to know is how, after the thing has run through once, to make it start again... automatically...
if that makes any sense...
basically a shape (from the library) is messed about with actionscript...
all the script is in the first frame, but i want it to repeat infinitley...
how..?
i thank you...
- stewart0
gotoAndPlay(1);
- thosethat0
i tried that...
to no avail...
if it's any use, here's the script from frame one (there is only one frame):
stop();
for (i=0; i<60; i++){
nm = "shape" + i;
attachMovie ("shape", nm, i);
my_id = number(substring(_root[nm]._name...
_root[nm]._x = i+280;
_root[nm]._y = i+100;
_root[nm]._width = random(15)+1;
_root[nm]._height = random(250)+5;
_root[nm]._rotation = random(360);
_root[nm].onEnterFrame = function(){
this._rotation += Math.sin(my_id/5);
}
}
any ideas..?
- MX_OnD0
erm, forgive my stupidity but it loops constantly as it is doesn't it??
Or how do you mean repeat infinitely??
- thosethat0
um...
what happens is (and i should have said) the shape that is used basically fades from black to transparent... therefore the image created from it does likewise...
i want it to redraw the image again once the alpha = 0
the fade is contained in the shape rather that the script...
does that make sense..?
- MX_OnD0
makes sense so far.... only why have the alpha fade in the shape and not on frame one like the rest of your script?? It would be more central and you could access it with a simple
if(MovieClip._alpha<0){
attachMovie("idname", "newName", same level as the one which as faded....)
}if that makes any sense....
- thosethat0
cheers,
i'll give it a go...
thanks for your help...
- MX_OnD0
anytime, let me know how it goes :)
- blindpilot0
you could call a function that initialise all the variables