Log in

View Full Version : Resolved Button cannot have actions applied? (getURL issue)



SaishuHane
12-10-2008, 06:39 PM
Going by this tutorial:

http://www.trap17.com/index.php/linking-url-button_t9225.html

I tried to apply the script to the button, but when I go to the button, it says "Current selection cannot have actions applied to it."

So I use the code:


on (release) {
getURL("http://confava.com/user/register","_self");
}

and it tells me:

"extra characters found at end of program"

on the line:


on (release) {

Though even then, I have no idea how this goes to the button and doesn't just stick to the frame. I know I've done this in the past, but due to acid leaking and me losing all my former .fla's, I have nothing to look at personally that's worked for me.

bluewalrus
12-10-2008, 10:57 PM
Are you in as3? In as3 buttons can not have action script applied to them directly as in as2. You have to call the button from the timeline. For example this is the code for a button called "btnhelmet" in a movie clip called "contentMain" to open on release "index.html" in a new window. I'm 98% sure this is as3 i switched the page code to as2 though because i added in other elements from older fla's. so I can't test it to make sure but if you liked the old adding the code to the button just switch back to as2 and it'll let you.


contentMain.btnhelmet.onRelease = function() {
getURL("pages/helmet/index.html", "_blank");
};

SaishuHane
12-10-2008, 11:09 PM
Oh wow, didn't even notice I was in as3. Thank you!!