technoknow
Technical User
Here is my script:
index = random()*(5-1)+1;
imageToDisplay = _root["image" + index];
this.attachMovie(imageToDisplay, "randomImage", 0);
I get the error message:
"Wrong number of parameters; random requires exactly 1.
index = random()*(5-1)+1;"
So I tried:
random(5);
Which doesn't generate an error message but puts code onto the page.
I have 6 mc's in the library named image1, image2, etc.
and in linkage "export for actionscript" is checked for each.
I have a mc named "randomImage" on the stage in frame 1
The script is on frame1
Any ideas?
Thanks,
TechNoKnow
index = random()*(5-1)+1;
imageToDisplay = _root["image" + index];
this.attachMovie(imageToDisplay, "randomImage", 0);
I get the error message:
"Wrong number of parameters; random requires exactly 1.
index = random()*(5-1)+1;"
So I tried:
random(5);
Which doesn't generate an error message but puts code onto the page.
I have 6 mc's in the library named image1, image2, etc.
and in linkage "export for actionscript" is checked for each.
I have a mc named "randomImage" on the stage in frame 1
The script is on frame1
Any ideas?
Thanks,
TechNoKnow