Copy link to clipboard
Copied
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.
Go into your Flash Publish Setttings and make sure you have it set to publish for AS3.
Copy link to clipboard
Copied
Go into your Flash Publish Setttings and make sure you have it set to publish for AS3.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now