Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 83883

Re: Trying to create a five nights at freddies parody.

$
0
0

correct the codes as following:

 

public var timepassed: Number = 0;

//use one enter frame event listener for the timepassed variable & if statements (remove "timePassed" function and event listener)
addEventListener(Event.ENTER_FRAME, movement);
public function movement(event: Event)
{    timepassed += .05; // add it here       if (timepassed < 30)    {        gotoAndStop(4);    }       if (timepassed > 30 && timepassed < 35)    {        gotoAndStop(5);    }    if (timepassed > 35 && timepassed < 50)    {        gotoAndStop(2);    }    if (timepassed > 50 && timepassed < 55)    {        gotoAndStop(5);    }    if (timepassed > 55 && timepassed < 55.01)    {        gotoAndStop(4);        removeEventListener(Event.ENTER_FRAME, movement);    }
}

Viewing all articles
Browse latest Browse all 83883

Trending Articles



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