[Flashr] Flashr slideshow with rotating the photos

Doug Marttila dmarttila at gmail.com
Wed Apr 25 20:29:44 EDT 2007


Hi Gloria,

Sorry about the slow reply, been busy.

To clear the slide show - try this from Core.as

instead of this...
var main : SlideShowMain = new SlideShowMain(slide_mc, slideList,
layoutParams, transition);

set up main as a class variable

private var main:SlideShowMain;

then

main=new SlideShowMain..etc

then try

main.deleteMe();

after that you will need to create a new SlideShow with the new list.

Hopefully that works.

On the initial slide showing twice - that might be a bug on my part - I'll
take a look over the next couple days (sorry really busy right now). Any
chance that you're sending 2 copies of the initial slide? Just hoping..

Good luck,

Doug

On 4/24/07, gloria kao <gloriakao at gmail.com> wrote:
>
> Hi, Doug:
>
> Thanks for the indication. It's more easier to keep the change in the
> transition.
> Although the effect is not what I am exactly looking for but it works.
> One thing weird is that the first photo will show "twice" on the first
> loop of the slideshow.  Any ideas?
>
> Besides, is there simple way to clear all the slideshow photos/movieclips
> on the stage?
> Because in my case,  users could initialize another tag and get another
> set of photos from Flickr,
> the photos in the slideshow will become confused if several requests have
> been made.
> I saw lots of  public function deleteMe() in several .as files.
> Is there a main entry I could call to clear all the slideshow objects
> thoroughly?
>
> Thanks!
>
> Gloria
>
> ---------------------------------------------------------------------
>     //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);
>         //theCurrentSlide.setRegistration( (theCurrentSlide._width/2) ,
> (theCurrentSlide._height/2));
>         theCurrentSlide.setRegistration( 300, 300);
>
>         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 {
>
>         //check that it is in the last second
>          if (val>=80){
>             theCurrentSlide._alpha = 100-val;
>             theNextSlide._alpha = val;
>             theCurrentSlide._rotation2 = (val*360/100);
>
>             trace("SlideTrasitionFade.as/animate, val: " + val);
>
>         }
>         else{
>
>             //hide the next slide while rotating the current one slide
>             theNextSlide._alpha = 0;
>             // always do your rotating
>             theCurrentSlide._alpha = 100;
>             theCurrentSlide._rotation2 = (val*360/100);
>
>         }
>     }
>
>     //called when transition is complete - fireTransitionComplete is in
> the Super class - SlideTransition
>     public function onMotionFinished():Void {
>         theCurrentSlide._alpha = 100;
>         theCurrentSlide._rotation2 = 0;
>         fireTransitionComplete();
>     }
>
>
>
>
> Message: 2
> > Date: Thu, 19 Apr 2007 08:34:41 -0400
> > From: "Doug Marttila" <dmarttila at gmail.com>
> > Subject: Re: [Flashr] Flashr slideshow with rotating the photos
> > To: Flashr at osflash.org
> > Message-ID:
> >         <5276bbd50704190534l7c91bbaag99d502433fd64a55 at mail.gmail.com >
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> > Gloria,
> >
> > I would keep all the changes in the transition. I built it so that is an
> > easy access point to affect the look of the slides.
> >
> > The animate setter method changes from 0-100 over the animationSpeed
> > time.
> > You will want to change the Tween effect to None- : replace  "
> > Regular.easeInOut" w/ "None"). If the tween change is linear (None),
> > than
> > the animate setter methods will change 10 for every second (assuming you
> > have the animationTime set to 10.)
> >
> > So an animate method something like this should work...
> >
> > function set animate(val){
> > //check that it is in the last second
> > if (val>=90){
> >      ... do the fading here
> > }
> > // always do your rotating
> > ..rotating code here
> > }
> >
> > Good luck
> >
> > Doug
>
>
>
>
>
>
> _______________________________________________
> Flashr mailing list
> Flashr at osflash.org
> http://osflash.org/mailman/listinfo/flashr_osflash.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/flashr_osflash.org/attachments/20070425/6ba6f517/attachment.htm


More information about the Flashr mailing list