Copy link to clipboard
Copied
import.flash.events.MouseEvent;
function ClickStop(Event: MouseEvent) {
stop();
}
StopButton.addEventListener(Mouse.Event.MOUSE_UP, ClickStop);
function ClickPlay(Event: MouseEvent) {
play();
}
PlayButton.addEventListener(Mouse.Event.MOUSE_UP, ClickPlay);
thats the code the one that gets the error is this
import.flash.events.MouseEvent;
Copy link to clipboard
Copied
Hi.
There are a few errors on your code.
// there's no dot between import and flash
import flash.events.MouseEvent;
function ClickStop(event:MouseEvent):void // event should be lowercase
{
stop();
}
StopButton.addEventListener(MouseEvent.MOUSE_UP, ClickStop); // there's no dot between Mouse and Event
function ClickPlay(event:MouseEvent):void // it's a good practice to indicate that the function doesn't return any value
{
play();
}
// you should use camel case in AS3. It means, for example,
// that the first word of instance names should be lowercase
// and the other words should start with uppercase letters.
// The same goes for functions and variables.
PlayButton.addEventListener(MouseEvent.MOUSE_UP, ClickPlay);
I hope this helps.
Regards,
JC
Copy link to clipboard
Copied
tyyy for the answer
I did it all but still the error pop up
the same one
Iam a Student last activity so I can go to college
tyy for the answers again:))
Copy link to clipboard
Copied
You didn't fix all the errors.
In you screenshot you're writing Mouse.event instead of MouseEvent, for example.
Please double-check the syntax.
Copy link to clipboard
Copied
darn I did
still that error still and higlighting
frame 1 line 1 column 1
Copy link to clipboard
Copied
Have you tried just copying and pasting my code?
Copy link to clipboard
Copied
No but I just did rn
what it worked tyysmm
I just wanna learn it in my own pace but holy that worked
tyyyyysmmmmmm:)