[Flashr] Flashr slideshow with rotating the photos
gloria kao
gloriakao at gmail.com
Thu Apr 19 06:09:05 EDT 2007
Hi Gio:
I'm using those properties of movie clip objects,
but I haven't tried onEnterFrames event before, thanks for your tips.
Hi Doug:
I have noticed the default rotation is around the upper left corner and
found a class on the Internet to do that. So, my question now is more on
where in the code can I apply the rotation effect to the slide photo while
it's alpha value remains 100?
The final effect I'd like to see is, for example, if I set 10 sec for the
pause between slides,
that each slide remains its alpha value as 100 and rotates 360 degree for
the first 9 sec, THEN the current slide
starts to fade out (like what you have done) in the last second (according
to the "animationSpeed"?).
But what I have now is the rotation and fading out effect happen almost the
same time;
I guess that is because I do both of these during the transition (
SlideTransitionFade.as).
So, I'm thinking I should move the rotation effect somewhere else in the
code, not during the transition,
but I can't find where to do that...
//gloria: add rotate effects before fading out --begin
//performTransition is the overridden method
public function performTransition() {
var xLoc:Number = Math.round(slideShowWidth/2);
var yLoc:Number = Math.round(slideShowHeight/2);
DynamicRegistration.initialize(theCurrentSlide);
//trace("SlideTransitionFade.as/ theCurrentSlide, "+
theCurrentSlide);
//theCurrentSlide.setRegistration( (theCurrentSlide._width/2) ,
(theCurrentSlide._height/2));
theCurrentSlide.setRegistration( 300, 300);
var tween = new Tween(this, "rotateByCenter", Regular.easeInOut, 0,
360, animationSpeed, true);
tween.addListener(this);
var tween = new Tween(this, "animate", Regular.easeInOut, 0, 100,
animationSpeed, true);
tween.addListener(this);
}
//use a setter to fake a "property"
public function set animate(val:Number):Void {
theCurrentSlide._alpha = 100-val;
theNextSlide._alpha = val;
//theCurrentSlide._rotation2 = 360-val;
}
public function set rotateByCenter(val:Number):Void {
theCurrentSlide._rotation2 = 360-val;
}
//called when transition is complete - fireTransitionComplete is in the
Super class - SlideTransition
public function onMotionFinished():Void {
theCurrentSlide._alpha = 100;
theCurrentSlide._rotation2 = 0;
fireTransitionComplete();
}
//gloria: add rotate effects before fading out --end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/flashr_osflash.org/attachments/20070419/1284afb6/attachment.htm
More information about the Flashr
mailing list