List Info

Thread: Flashr slideshow with rotating the photos




Flashr slideshow with rotating the photos
user name
2007-04-24 10:04:02
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&quot; < dmarttilagmail.com">dmarttilagmail.com>
Subject: Re: [Flashr] Flashr slideshow with rotating the photos
To: Flashrosflash.org">Flashrosflash.org
Message-ID:
 &nbsp;   ; &nbsp; <; 5276bbd50704190534l7c91bbaag99d502433fd64a55mail.gmail.com">5276bbd50704190534l7c91bbaag99d502433fd64a55mail.gmail.com >
Content-Type: text/plain; charset=&quot;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&nbsp; &quot;
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){
 &nbsp;   ... do the fading here
}
// always do your rotating
..rotating code here
}

Good luck

Doug

 


Re: Flashr slideshow with rotating the photos
user name
2007-04-25 19:29:44
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 < gloriakaogmail.com">gloriakaogmail.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

---------------------------------------------------------------------
&nbsp; &nbsp; //performTransition is the overridden method
&nbsp; &nbsp; public function performTransition() { &nbsp;   &nbsp; 

 &nbsp;   &nbsp;  var xLoc:Number = Math.round(slideShowWidth/2);
&nbsp; &nbsp;  &nbsp;  var yLoc:Number = Math.round(slideShowHeight/2);

 &nbsp;   &nbsp;  DynamicRegistration.initialize(theCurrentSlide);
 ; &nbsp;  &nbsp;  //theCurrentSlide.setRegistration( (theCurrentSlide._width/2) , (theCurrentSlide._height/2));
 &nbsp;   &nbsp;  theCurrentSlide.setRegistration( 300, 300);
 &nbsp;   &nbsp;   &nbsp;   &nbsp;
 &nbsp;   &nbsp;  var tween = new Tween(this, "animate", Regular.easeInOut, 0, 100, animationSpeed, true);&nbsp; &nbsp;  &nbsp; 
 &nbsp;   &nbsp;  tween.addListener(this);
 &nbsp;   &nbsp;   &nbsp; 
 &nbsp;  }
 &nbsp;  //use a setter to fake a "property"
 &nbsp;  public function set animate(val:Number):Void { &nbsp;   &nbsp; 

 &nbsp;   &nbsp;  //check that it is in the last second
&nbsp; &nbsp;  &nbsp;   if (val>=80){
 &nbsp;   &nbsp;   &nbsp;  theCurrentSlide._alpha = 100-val;
&nbsp;    &nbsp;   &nbsp;  theNextSlide._alpha = val;
&nbsp; &nbsp;  &nbsp;   &nbsp;  theCurrentSlide._rotation2 = (val*360/100); &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp; 
 &nbsp;   &nbsp;   &nbsp;  trace(&quot;SlideTrasitionFade.as/animate, val: " + val); ; &nbsp;  &nbsp;   &nbsp; 
 &nbsp;   &nbsp;  }
 &nbsp;   &nbsp;  else{
&nbsp; &nbsp;  &nbsp; 
 &nbsp;   &nbsp;   &nbsp;  //hide the next slide while rotating the current one slide
&nbsp; &nbsp;  &nbsp;   &nbsp;  theNextSlide._alpha = 0;
 &nbsp;   &nbsp;   &nbsp;  // always do your rotating
&nbsp;    &nbsp;   &nbsp;  theCurrentSlide._alpha = 100;
 ; &nbsp;  &nbsp;   &nbsp;  theCurrentSlide._rotation2 = (val*360/100); &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp;   &nbsp; 
 &nbsp;   &nbsp;  } &nbsp;   &nbsp; 
 &nbsp;  }
 &nbsp;
 &nbsp;  //called when transition is complete - fireTransitionComplete is in the Super class - SlideTransition
 ; &nbsp; public function onMotionFinished():Void {
 &nbsp;   &nbsp;  theCurrentSlide._alpha = 100;   ;  &nbsp;   &nbsp; 
 &nbsp;   &nbsp;  theCurrentSlide._rotation2 = 0; &nbsp;   &nbsp; 
 &nbsp;   &nbsp;  fireTransitionComplete();
   ; }


 

Message: 2
Date: Thu, 19 Apr 2007 08:34:41 -0400
From: "Doug Marttila&quot; < dmarttilagmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">dmarttilagmail.com >
Subject: Re: [Flashr] Flashr slideshow with rotating the photos
To: Flashrosflash.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Flashrosflash.org
Message-ID:
 &nbsp;   ; &nbsp; <; 5276bbd50704190534l7c91bbaag99d502433fd64a55mail.gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> 5276bbd50704190534l7c91bbaag99d502433fd64a55mail.gmail.com >
Content-Type: text/plain; charset=&quot;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&nbsp; &quot;
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){
 &nbsp;   ... do the fading here
}
// always do your rotating
..rotating code here
}

Good luck

Doug

 



_______________________________________________
Flashr mailing list
osflash.org">Flashrosflash.org
http://osflash.org/mailman/listinfo/flashr_osflash.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )