Quantcast
Channel: Adobe Community : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 238792

How to use gotoandplay scene link using class property (external code.as)

$
0
0

Hello

 

I am using ‘gotoandplay’ scene by scene link using this code. If I use this in the same time line (internal), it’s working properly but when I use this code in as a class, I got this error

Call to a possibly undefined method MovieClip.

 

 

 

I use this code in time timeline

 

b_enter.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene_enter1);

function fl_ClickToGoToScene_enter1(event:MouseEvent):void

{

            MovieClip(this.root).gotoAndPlay("p menu", "Menu");

}

 

 

 

 

 

I use this code in class

 

package  {

           

            import flash.display.SimpleButton;

           

           

            public class next extends SimpleButton {

                       

                       

                        public function next() {

                                    // constructor code

                                    MovieClip(this.root).gotoAndStop("p2", "page2")

                        }

            }

           

}

 

 

 

 

u can download the flash file using this link

http://www.delta-adv.com/nav/np.rar


Viewing all articles
Browse latest Browse all 238792

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>