Quantcast
Channel: Adobe Community : All Content - Adobe Animate CC - General
Viewing all articles
Browse latest Browse all 13519

Graphics not displaying on stage - errors 1119 and 1061

$
0
0

I've been following a tutorial for a simple animation but I'm failing to get the library items to display on the stage. It's probably something really simple. Here is the code in my Main.as

 

I also receive the errors 1119 and 1061.

 

If anyone can help that would be fab and much appreciated.

 

 

 

 

package {

 

 

          import flash.display.MovieClip;

          import flash.events.Event;

 

 

          public class Main extends MovieClip {

 

                    var touching:Boolean = false;

 

                    public function Main() {

 

 

                              startGame();

                    }

 

                    function startGame():void {

 

                              stage.addEventListener(Event.ENTER_FRAME, gameLoop);

 

 

                    }

 

                    function gameLoop(e:Event):void {

 

                              fly();

                              checkCollisions();

                    }

 

 

                    function fly():void {

 

                              if (touching == false) {

                                        player.x ==30;

                              } else if (touching == true) {

                                        stage.removeEventListener(Event.ENTER_FRAME, gameLoop);

                              }

                    }

 

                    function checkCollisions():void {

 

                              if (player.hitTestObject(square)) {

                                        touching = true;

                              } else {

                                        touching = false;

                              }

                    }

          }

}


Viewing all articles
Browse latest Browse all 13519

Trending Articles



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