Groups | Blog | Home
all groups > flash actionscript > february 2004 >

flash actionscript : onRelease and getURL



kirknetiq
2/23/2004 10:02:56 PM
Is this correct:

btn.onRelease = function(){
getURL("mysite.com/it_training/training.htm", _self);
}

I want to go to a new web page in the same browser window as the Flash piece I
am leaving...

Thanks!


kirknetiq
2/23/2004 10:39:03 PM
John,

Thanks! I did all that, but I still get this error message:

Statement must appear within on handler


kirknetiq
2/23/2004 11:03:23 PM
stop();
my_btn.onRelease = function () {
getURL ("http://intra.netiq.com/it_training/training.htm", "_self");
}

when I do a script check it's fine,...but when I preview it I receive this
error:

**Error** Scene=Scene 1, layer=Enter, frame=190:Line 1: Syntax error.
onRelease {

Total ActionScript Errors: 1 Reported Errors: 1

Thanks

Laiverd.COM
2/23/2004 11:12:51 PM
The _self should also be in quotes. And: provide the full path including
http://www. Other than that it should work.

john

--
----------------------------------------------------------------------------
-----------
RESOURCES
http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash
----------------------------------------------------------------------------
-----------
TUTORIALS at
www.laiverd.com
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------

kirknetiq
2/23/2004 11:28:38 PM
Laiverd.COM
2/23/2004 11:44:15 PM
Hmm; the way you have coded the button, means that it should be written
inside a frame. Not written in the actiobnspanel when the button on stage is
selected. To correct: clcik the button on stage: cut the script from the
actionspanel; deselect the button, select the frame where the button sites
and paste back into the as-panel. Obviously you have given the button the
instancename 'btn'.

john

--
----------------------------------------------------------------------------
-----------
RESOURCES
http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash
----------------------------------------------------------------------------
-----------
TUTORIALS at
www.laiverd.com
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------

Laiverd.COM
2/24/2004 12:12:53 AM
That error is not referring to the script you posted. Check if you have some
scripted attached to that button; select the button by clicking on it and
check the as-panel. If there's script there, my feel is you can delete it
completely as you have already coded the button with the script you posted.

John

----------------------------------------------------------------------------
-----------
RESOURCES
http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash
----------------------------------------------------------------------------
-----------
TUTORIALS at
www.laiverd.com
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------

AddThis Social Bookmark Button