Groups | Blog | Home
all groups > flash actionscript > july 2007 >

flash actionscript : lost with transitions._xscale


luciewong
7/16/2007 4:55:26 PM
Hi,
I have a slide show, loading images from a folder dynamicly into a sliding
Thumbnail panel.
And I have a stage, when a pic in the thumbnail is clicked, showing the pic in
bigger format.
All works fine - actually same as shown at this page:
http://www.ruthk.net/butterflies/slideshows/index.html
the pic fades in and out with an alpha transition.

What I just cannot manage:
The bigger pic on stage has an overlapping background, which changes according
to each image with a scale transition.
The code below moves my pic background perfectly to the new x position,
everytime a new pic is loaded.
I just cannot manage, that the background is scaled to the new image width,
overlapping lets say left and right side 20px.
I think, when I have the width, I will manage the height as well.

function fadeInBGs() {
easeType = mx.transitions.easing.Regular.easeOut;

var time = 1.5;
var mc = bgA;
var a:Number = Math.ceil((myXP)-20);//<<myXP is my new x position
var slideTween = new mx.transitions.Tween(mc, "_x", easeType, oldX, a, time,
true);
};

Thank you for your help.

Best regards
Luciewong



luciewong
7/17/2007 5:18:59 AM
wow, just can't make it.
The background should scale from the old width to the new width nicely.
Does this need some kind of Ratio again?
Any help greatly appreciated.

AddThis Social Bookmark Button