Skip to main content
Participant
January 28, 2011
Question

hello is there any better view for this code?

  • January 28, 2011
  • 1 reply
  • 257 views

thanks

about_btn.addEventListener(MouseEvent.MOUSE_DOWN, aboutclick);
function aboutclick(event:MouseEvent) {
gotoAndPlay("page2");
}

gallery_btn.addEventListener(MouseEvent.MOUSE_DOWN, gallery_click);
function gallery_click(event:MouseEvent) {
gotoAndPlay("page3");
}

video_btn.addEventListener(MouseEvent.MOUSE_DOWN, video_click);
function video_click(event:MouseEvent) {
gotoAndPlay("page4");
}

or_mc.addEventListener(MouseEvent.MOUSE_DOWN,drag);
or_mc.addEventListener(MouseEvent.MOUSE_UP,drop);
function drag(event:MouseEvent):void{
    or_mc.startDrag();
}

function drop(event:MouseEvent):void{
    or_mc.stopDrag();
}
all.pah.addEventListener(MouseEvent.MOUSE_DOWN,drag1);
all.pah.addEventListener(MouseEvent.MOUSE_UP,drop1);
function drag1(event:MouseEvent):void{
    all.pah.startDrag();
}

function drop1(event:MouseEvent):void{
    all.pah.stopDrag();
}

}

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
January 28, 2011

What do you mean?  Except for what appears to be an excess curly brace at the end, and an inconsistent use of ":void" in the function declarations and indentations too, it looks okay functionally.