I am currently revising my slideshow movie, because I want to make use of the new Flash 8 features. Earlier I loaded the hires photo twice once for the thumbnail, once for the real photo for in the slide. Now I want to make use of the BitmapData class to make a clone of the hires photo for the sliding animation.

Only I am not sure what the best way is to store the photo, currently I am using a method which will change the _width/_height properties of the Thumb movieclip. Does anyone good any advice how to solve my problem the best way? I am currently making a new variable in the thumb movieclip like. Using the following code where the clip variable is thumb movieclip:

       // store the actual photo dimensions the clip
       clip.photoWidth  = clip._width;
       clip.photoHeight = clip._height;

       // make a copy of the original photo
clip.originalPhoto = new BitmapData( clip._width, clip._height, false, 0xFF00FF );
       clip.originalPhoto.draw( clip );

The method which includes this code is triggered when the photo is loaded in the MovieClipLoader i.e. when the onLoadInit-event is dispatched. Currently after all the photos are loaded and has been resized to a nice small thumb image within a 75px x 75 box.

Does anyone know any examples which uses bitmapdata for a simple slideshow? Somewhere I am unable to make it work, earlier I was able to clone this originalPhoto-instance to a new one. Only then attach it to the holder movieclip for the actual photo clip. Only somehow this caused to make it become 3px by 800px instead of the real dimensions of the photo. Sadly. Yours,
Weyert de Boer
To change your subscription options or search the archive:

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training

Reply via email to