FORUMS: list search recent posts

newbie question - multiple simultaneous clips

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
sylvian
newbie question - multiple simultaneous clips
on Dec 12, 2005 at 10:36:20 am

Hi, I'm a Flash beginner but have some good javascript/coding experience so I understand scripting, but getting confused with the best way to go about structuring projects in Flash. Any advice on this one would be most appreciated:

I want to display a series of images at the same time, in a grid format. Each image will fade in and fade out, then wait a delay time before displaying again. The delay time varies randomly with each image and each occurrence. The images are .jpg files sitting in a folder. There are around 300 images in total.

I can get so far as making a single movie clip which fades in and out, and I can make duplicates of this and change the image in each one. But for the whole grid this obviously involves loading all the images into my project and manually creating 300 individual movie clips and then if I later want to change the images, or even just change the name of the source folder, I'll have to manually do it all over again.

Further complicating things is that if I use the same random variable names in each movie clip then the movies will all fade at the same rate, right? So do I have to manually create 300 individual clips all with different variable names too?

I'd rather use a generic actionscript function containing a variable name and then simply call that function as many times as I want to have the effect of
"for i = 1 to 300 {createMovieClip(i); positionIntoTheGrid(i) }"?
In Javascript this is easy, but can it be done inside Flash?

Further, and this is where my Flash virginity really shows, should I be making a Flash movie which contains the entire grid of 300 images, or should I be making a flash movie which contains 1 image and then embedding this 300 times into an HTML/PHP file using a different value of some variable for each embedding?

Thanks in advance...



Return to posts index

Richard
Re: newbie question - multiple simultaneous clips
on Dec 13, 2005 at 10:50:25 am

This can be done dynamicly. Flash gives you the capability of loading .jpg images into your flash file, no need to load them into your project, and make MovieClips out of them all.

All you would need to do is create MovieClips on your stage. Inside that MovieClip you load another MovieClip calling the .jpg you want.

You would then have to determan your stage area, and where these can pop up.

-Richard




Return to posts index

sylvian
Re: newbie question - multiple simultaneous clips
on Dec 13, 2005 at 5:25:34 pm

Thanks for the reply Richard. Yes, I imagined it might involve some loop which will create the required number of instances of a clip.

What I still don't understand is how I can make a clip symbol which contains an image which can be changed from a higher level loop. For example if I make a loop for a 30x10 grid and use something like:

for(x=0; x<=30; x++){
for(y=0; y<=10; y++){
(code to create an instance of a preconstructed clip symbol)
(assign a different image to this instance)
}
}

Then a) what actionscript could be used to assign the image
and b) how would I create the original symbol with a "variable" image name?

Is it simply going to be something like a javascript code, something like (for example) 'instancename.layername.imagename = "row"+ x + "col" + y + ".jpg"' ?

Apologies if I'm missing something basic here, but I'm not quite clear on Flash's structure of scripts calling scripts from different timelines...up till now all my programming has been one-dimensional i.e. written with a single linear logic stream.

Thanks....



Return to posts index


Richard
Re: newbie question - multiple simultaneous clips
on Dec 14, 2005 at 10:50:05 pm

>>Then a) what actionscript could be used to assign the image
>>and b) how would I create the original symbol with a "variable" image name?

a) Use the LoadMovie method.
_root.myMovieClip.loadMovie(myDynamicPhoto001.jpg);

Do you know the variable image name?

>>imagename = "row"+ x + "col" + y + ".jpg"' ?

In flash that would look like..
var imageName:String = "row"+ x + "col" + y + ".jpg";

Hope this helps..
-Richard


Return to posts index

sylvian
Re: newbie question - multiple simultaneous clips
on Dec 15, 2005 at 12:19:10 pm

thanks so much, Richard.....slowly I'll begin to see how it all hangs together. I'll test these suggestions and see what happens....



Return to posts index

Richard
Re: newbie question - multiple simultaneous clips
on Dec 15, 2005 at 6:04:57 pm

What is it that your trying to do exactly?

Just wondering, because sometimes you can find components that someone has already put together.

Basically, components are small programs that you can use in Flash.

For example, one of my favorite components for photos is this one.

http://www.slideshowpro.net/

-Richard


Return to posts index


Richard
Re: newbie question - multiple simultaneous clips
on Dec 15, 2005 at 6:08:56 pm

scratch that question.. I had to re read your orginal post again.. I think I have an idea of what your doing.

Do, me a favor and shoot me an email at:

richard@deepmagicstudios.com

I've just finnihsed a huge 7 month long massive project, and I have some time for a quick little item. I'll give you a head start.

-Richard


Return to posts index

sylvian
Re: newbie question - multiple simultaneous clips
on Dec 19, 2005 at 7:54:07 am

Thanks Richard....I've emailed you with more details...



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]