Skip to main content
Inspiring
June 13, 2012
Question

probleme variable

  • June 13, 2012
  • 1 reply
  • 340 views

Hi

Probably a rookie mistake, but i have a problem

My script

                              import views.Piou;

                              private var transition:SlideViewTransition = new SlideViewTransition;

                              [Bindable]

                              public var imageScroller:String;

                              public function clickScroller(event:MouseEvent):void

                              {

                                        transition.direction = ViewTransitionDirection.DOWN;

                                        transition.duration = 1000;

                                        switch ( event.target.name ) {

                                                  case 'Group141': imageScroller = 'Piou'; break;

                                                  case 'Group147': imageScroller = 'Star'; break;

                                        }

  //trace( imageScroller );   my trace is OK

                                        navigator.pushView(views.imageScroller, null, null, transition);  /// Here an error

                              }

Access to undefined property imageScroller in the package  views.

An idea ??

Thanks for your help

This topic has been closed for replies.

1 reply

Inspiring
June 13, 2012

it looks like your error is coming from the "views.imageScroller" part. From the code above, it looks like the "imageScroller" string is a class variable, not part of the "views" instance....but I dont see all your code.... maybe try "this.imageScroller" instead?