Hi,

You're declaring the variable ffxscroller inside the function transitionIn.
This makes the variable local, meaning it will only be available when the
method is executing. When the method returns, you'll lose the reference to
the scroller. If you want to access the object outside the function, declare
it in the class instead.
In fact, it seems you've already done that. So, change

var ffxscroller:AxisScroller = new AxisScroller(stage, ....

to:

ffxscroller = new AxisScroller(stage,....

And ffxscroller will be available in other methods, and will be not null
assuming transitionIn has been executed before you try to access the var.


Cheers
Juan Pablo Califano

2009/9/4 Zuriel <zu...@zadesigns.com>

>
>
> Here is a page of my GAIA framework code. I am loading a scrollbar
>
> var ffxscroller:AxisScroller; but I am trying to destroy it. The
> documentation for destroying the scrollbar is ffxscroller.destroy();
>
> but if you look at my code below, ffxscroller is not available when I try
> and run it in TransitionOut (where I would like to destroy my scrollbar and
> remove event listeners) Is there a way to setup my scroller so that it can
> be removed on transition out? I am tracing it 3 places and its NULL after
> the transitionIn section. hope this explanation is enough for someone to
> see what I am asking?
>
> ------------------------------------------------------------------------
>
> package pages{
>  import com.gaiaframework.templates.AbstractPage;
>  import com.gaiaframework.events.*;
>  import com.gaiaframework.debug.*;
>  import com.gaiaframework.api.*;
>  import flash.display.*;
>  import flash.events.*;
>  import flash.text.*;
>  import flash.external.*;
>  import flash.xml.*;
>  import gs.*;
>  import
> gs.easing.*;
>  import gs.plugins.*;
>  import com.reintroducing.ui.AxisScroller;
>
>  public class ProductsIntellichiefManagementPage extends AbstractPage {
>
>  var ffxObj:Object;
>  var ffxscroller:AxisScroller;
>
>  public function ProductsIntellichiefManagementPage() {
>   super();
>   alpha = 0;
>  }
>  override public function transitionIn():void {
>   super.transitionIn();
>   TweenLite.to(this, 0.3, {alpha:1, onComplete:transitionInComplete});
>
>   var ffxObj:Object = new Object(
>   {
>   scrollType: "easing",
>   isTrackClickable: true,
>   useArrows: true,
>   upArrow: myText_mc.invoice_mc.up_btn,
>   downArrow: myText_mc.invoice_mc.down_btn,
>   continuousScroll: true,
>   easeFunc: Regular.easeOut,
>   duration: .25,
>   arrowMove: 100,
>   scaleScroller: true,
>   autoHideControls: true
>   });
>   var ffxscroller:AxisScroller = new AxisScroller(stage,
> myText_mc.invoice_mc, myText_mc.invoice_mc.scroller_mc,
> myText_mc.invoice_mc.movie_mc,
> myText_mc.invoice_mc.track_mc,
> myText_mc.invoice_mc.mask_mc, "y", ffxObj);
>
>   trace(ffxscroller);
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to