Hey, how do i get a button to go to a new page. geturl doesn't seem to be working for me. any help would be appreciated
Making buttons in Flash CS4
ok, i solved that problem, i found the code
home_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
navigateToURL(new URLRequest("http://www.coconuttech.com/"));
but
when i add them to the other buttons in the file i get this error
1084: Syntax error: expecting rightbrace before end of program.
what do i do about that?
Solved using one of those closing brackets
Last edited by redslazers on Tue Mar 24, 2009 12:12 pm; edited 1 time in total
home_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
navigateToURL(new URLRequest("http://www.coconuttech.com/"));
but
when i add them to the other buttons in the file i get this error
1084: Syntax error: expecting rightbrace before end of program.
what do i do about that?
Solved using one of those closing brackets
Last edited by redslazers on Tue Mar 24, 2009 12:12 pm; edited 1 time in total
ok it seems like i am solving my own problems but now i have a hit a dead end
1021: Duplicate function definition.
for one of the layers i have this
home_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
navigateToURL(new URLRequest("http://www.coconuttech.com/"));
}
and for another this one
flash_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
navigateToURL(new URLRequest("http://www.coconuttech.com/flashcenter.html"));
}
i dont see the conflict
thank for any help
1021: Duplicate function definition.
for one of the layers i have this
home_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
navigateToURL(new URLRequest("http://www.coconuttech.com/"));
}
and for another this one
flash_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
navigateToURL(new URLRequest("http://www.coconuttech.com/flashcenter.html"));
}
i dont see the conflict
thank for any help
Related topics
