Groups | Blog | Home
all groups > flash actionscript > february 2004 >

flash actionscript : Reusing a Jpeg loaded with loadMovie - help!


grant_online
2/6/2004 8:31:54 PM
OK, there MUST be a way to do this but i just cant figure it out...

I have an image gallery where i want to have a list of thumnail images that link to a larger display of each image. Ok that sounds easy, but the catch is i want to use the same external image file for the thumnail and the larger image - in effect using an externally loaded Jpeg twice in my swf.

So, I have a movieClip i want to load an external Jpeg into e.g.

imageHolder_mc.loadMovie("images/photo.jpg", 1);

this works fine, but how do i reuse this loaded jpg in another movieClip (that could be nested under a different heirachy) e.g I want the image to appear (transformed smaller) here:

navigation_mc.thumnails_mc.thumb1 <---- here!

I cannot 'attach' this mc elsewhere because the image does not exist in the Library. I cannot duplicate this mc into anywhere but it's current _parent. The only way i can work out how to do this is to load the jpeg again into this other mc but this often means the user would have to wait for the whole image to download again before it is displayed.

Any help you could give me here would be much appreciated - i'm sure it's easy but i just can't think of how to do it!

Thanks in advance

Grant

Peter Blumenthal
2/7/2004 6:40:07 PM
There is no way to do it. you must reload the JPEG. the user shouldn't have
to wait though, because the image should be cached.

I don't see the point in loading the full image as a thumbnail though. In
general, especially if you have a lot of images, you would want to laod a
small image as the thumbnail to save loading time.

}`¬P

--
---------------------------------------
http://www.phageinteractive.com
PhageInteractive Ltd.
remove mm_ to mail
---------------------------------------
'I wish we lived in a world where it was possible to be religious and think
at the same time.' - Jonh Graves

Mark Redman
2/11/2004 8:53:54 AM
I have the same issue, there is no way to reference an image already loaded,
I am loading thumbnails and images by calling an aspx page which either gets
an image from a database or manipulates the image before it binary writes th
image to the aspx response.
Caching these images in my case is undesirable, but I do need to load them
into more than one place in my flash movie.

If you use a list component with a custom cell renderer, the image will
reload many times as you scroll up and down the list, calling the url over
and over causing a massive traffic. I would have thought being able to
reference the same images would be an obvious thing to build into flash.

I know flash has always been written for designers and not programmers, but
If I was writing flash, as a programmer I would expect things from flash
that I was used to in my programming IDE. Flash should be based on a more
Visual IDE, I dont know what flash is written in, but it seems that they
need to look at something like Delphi, Visual C#/Visual Studio or similar
IDE and different component architechtures that have been tried and tested.

Just my 2c (or 2p as I am in th UK)

Mark Redman

AddThis Social Bookmark Button