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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script for images flipping ??

Status
Not open for further replies.

duponty

Instructor
Oct 25, 2000
101
CA
Hi everybody,

I would need clue in who to script something that I am sure is easy. I have like 200 images numbered from 001 to 200 that I want to make them appear in a flash movie at a specific position, with alpha transition each 5 seconds.

I know I can do it manually but for 200 images, it is alot of work.

thanks
yannick
 
Generator or an equivalent!

Regards,
new.gif
 
Thanks Oldnewbie

but actually, I am doing a small exe in flash for cd production and I am sure that there is an easy way to do it by scripting. The images are already chosen an thay aren't going to change.

See you
yannick
 
If all your files are named 001.gif, 002.gif, 003.gif, etc.. and located in the same directory:

-Create a new symbol (movie clip)
-Edit the new symbol
-select File | Import
-find the files, select the first image.
-Flash 5 should come back and say that the image appears to be one in a series, do you want to import the others?
-Select yes
-On the root of scene 1, drag and drop the movie clip, and give the instance of the mc a name (Pictures)
-In the actions panel for frame 1 add the following code:
Code:
var clip;
clip++;
if (clip > 200) { clip = 1; }
Pictures.gotoAndStop(clip);
-Add a keyframe to 5 seconds into the movie
-test the movie.

You can add the extra code to do transparency later, with more keyframes, and such.

This will result in both a large .fla and .swf, but if it is being distributed on a CD Rom, the size doesn't matter.

Kevin
 
BTW - I only tested this on .gif's, but it should work the same for .jpg's and .png's and all other picture formats supported by flash.

Kevin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top