Dynamic Images

I have an image gallery posted online where the images can be linked to from wherever. Instead of having to embed the images and have a large .swf file size, I wish to have the menus and everything using the dynamic images.

So far, I have loaded the images with the actions in a separate layer using the following action script:

this.onLoad = function()
{
image01.loadMovie( URL );
image02.loadMovie( URL );


(etc.)
}

The thumbnails are all about 15k. so I don’t care that they all load up at once, but I may find another way to do it with an animated scrolling menu that loads the thumbnails as they are seen… is that possible?

Well, on with the rest…

I can create a transparent button over the dynamic images (using the images themselves as buttons did nothing) to load up full-size images.

The action script on the buttons is as follows:

on( press )
{
image01_main.loadMovie( URL );
}

You can click on the image once and it’s fine, but when you click on it again, it unloads the image. Then, if you want to click a different button to load a different image, you have to click twice… once to unload the previous image, and then again to load the image that is desired.

I don’t want the image to unload when it is clicked again. And when you click another button for another image, I just want it to load immediately in the place of the other image.

Thanks,

Michael

Welcome to the forums MrMichael!,
what, in a shorter version , do you want?

Short version?

I want a button that will show a dynamic jpg. Right now, the problem is that the image loads when clicked, then unloads when clicked again. Clicking another button for another image while the other image is showing just unloads that image and you have to press it again to show the one you want.

I have the thumbnails loading just fine for the basic setup I want right now and the buttons laid over them. I’m just not sure what modifications are needed in the action script on the buttons to get rid of the problem I stated in the above paragraph.

Can you give me the AS on one of the buttons? If you do:
[COLOR=red][“as”]your actionscript["/as"][/COLOR] without the quotes, the AS wil show up correctly.

Thumbnail action script (works for the basic setup I need):


this.onLoad = function()
{
	thumb01.loadMovie( URL );
	thumb02.loadMovie( URL );
	... etc.
}

Button action script:


on( press )
{
	image01_main.loadMovie( URL );
	image02_main.loadMovie( URL );
	... etc.
}

I know this is very basic, but it’s what I’ve gleamed from a tutorial. I’m not sure how to change the behavior so it works for me.

So you want to load the images and for them to stay on the screen when another button’s pressed?

Only one image at a time. Where you don’t have to press buttons multiple times to load/unload images. Just hit the thumbnail button you want and have the image updated to the new picture. Would it be possible to show a progress indicator when loading images?

Well, you can check out this example:

thumbs_text.zip

Let me know what you think…