Extending the Flash/XML Photo Gallery Support Product Page

This topic was archived

thumbnail view

Shared 22 Oct 2004 12:04:32
1
likes this idea
22 Oct 2004 12:04:32 Michel De Backer posted:
nice tutorial! But what about if I want a larger view of the picture when clicking on the thumbnail?
is this possible? And what about a progress bar when loading the big picture?

Replies

Replied 22 Oct 2004 14:40:11
22 Oct 2004 14:40:11 Sas Jacobs replied:
Hi Michel
I'm in the UK at the moment so don't have the files to hand. I'm also on a public computer so don't have access to Flash.

You could add an onRelease event to the movie clip to pop up a full sized picture. I've done this on one version of the gallery for a client.

There are some additional event handlers for the MovieClipLoader class. You could use the onProgress event handler to determine how much has loaded and display a progress bar. Again, I don't have Flash on this computer so can't test and give you the exact code.

I'm back in Australia at the end of November. Let me know if you need any code samples.

Cheers

Sas
Replied 30 Oct 2004 16:45:09
30 Oct 2004 16:45:09 Michel De Backer replied:
Should be great to have some code samples! I'm not a big big expert on this... <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Regards
Michel
Replied 01 Nov 2004 17:02:45
01 Nov 2004 17:02:45 Sas Jacobs replied:
Hi Again

No problems with the code samples. Should be able to have a few ideas for you at the end of November if you don't mind waiting that long <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Sas
Replied 11 Nov 2004 01:31:16
11 Nov 2004 01:31:16 Aaron Hui replied:
where in the code would you add the onRelase actionscript? I am trying to figure this out, but I am not an expert in coding so I am not sure where I should add it
Replied 26 Nov 2004 08:28:51
26 Nov 2004 08:28:51 Sas Jacobs replied:
Hello everyone

Here's the answer to the question of displaying the larger image. I'm not going to give the full solution, just some pointers so you can try and figure it out for yourselves.

You'll need to add the onRelease within the onLoadInit event handler of the mclListener object. Like this:

mclListener.onLoadInit = function(target_mc:MovieClip):Void {
Resize(target_mc, 75, 75);
<font color=red>target_mc.onRelease = function ():Void {
//do the resize
};</font id=red>
};

You could find out which movie clip had been clicked from the name, like this:

mclListener.onLoadInit = function(target_mc:MovieClip):Void {
Resize(target_mc, 75, 75);
target_mc.onRelease = function ():Void {
<font color=red>var intPhotoNum:Number = Number(target_mc._name.substr(11));</font id=red>
};
};

You could use that number to determine the position in the XML tree and then load that image at full size.

Good luck and if you need a bit more help, post again.

Cheers

Sas
Replied 24 Dec 2004 14:47:58
24 Dec 2004 14:47:58 simon burrows replied:
Hi,

thanks for the tutorials, i'm quite new to this and need a bit more help with getting the thumbnail to once clicked showing the full image. any chance you could help me out.

ta in advance

Si.
Replied 27 Dec 2004 03:07:42
27 Dec 2004 03:07:42 Sas Jacobs replied:
Hi Simon

I'm not quite sure exactly what help you need with. Where are you up to in the code? Did you add the code below to determine the name?

Maybe you could post what you've got so far.

Cheers

Sas

Reply to this topic