Skip to main content
February 3, 2013
Answered

My code Event.ENTER_FRAME could not be loaded.

  • February 3, 2013
  • 1 reply
  • 350 views

Hi I'm rather new with AS3 and I made a new code for a game where a character picks up coins that looks like:

stage.addEventListener(Event.ENTER_FRAME, gameloop);

function gameloop(evt:Event) {

    pickUp();

}

function pickUp(){

    if (car1.hitTestObject(coin1)){

        coin1.x=1500;

    }

    if (car1.hitTestObject(coin2)){

        coin2.x=1500;

    }

    if (car1.hitTestObject(coin3)){

        coin3.x=1500;

    }

}

However, it says the class or interface "Event" could not be loaded.

Please help me.

Thank you.

This topic has been closed for replies.
Correct answer Ned Murphy

Go into your Flash Publish Setttings and make sure you have it set to publish for AS3.

1 reply

Ned Murphy
Ned MurphyCorrect answer
Legend
February 3, 2013

Go into your Flash Publish Setttings and make sure you have it set to publish for AS3.