getURL on a Movieclip

How do I use the getURL method to work on a movie clip…here is an .fla file for an example of the type of thing I want to happen…

I tried:

on (press) {
getURL(blah blah blah.com);

}

But the movieclip wouldn’t play…

Here is an .fla from Ultrashock that has the same type of thing I have…if anyone could help me out it would be much appreciatted…thanks!

on (rollOver) {
//do this
}
on (rollOut) {
//do this
}
on (release){
getURL("yourFile.html","_self");
}

You can change _self to _blank to open in a new window.

can you show me using that .fla…because I based my code on that…and when i try to do it…every possible way I know…it doesn’t work…

actually, i found a way…thanks for the tip!

Glad you found a way :slight_smile:

Even though I don’t see why my way didn’t work, works great for me :-\

actually, i didn’t find a way…i did a little bit of what you said, because I couldn’t get your way to work either, and i did a little tinkering…and still couldn’t get it…when i did it your way it wouldn’t goto the URL yet, the animation and everything worked…

same thing happened after a scrapped it…and rebuilt it another way.

i’m almost ready to give up on something soooo simple!

Well for one, that .fla you posted up top there… it is in slash syntax… which is Flash 4!

I just tested the code on my own movieclip as a button and I got the getURL to work fine. I am trying to whip up a quick .fla for you.

Thanks! I’m still trying…I know it is old syntax…i’ve just started learning MX, I learned on Flash 4, and Flash 5.

Ok, here is the attachment. Took like 3 seconds to do, so excuse the tackiness :wink:

Ok…i did that…how come this doesn’t work…

well…it works outside of Flash…AHHH!! I hate programming…

You have to have contents.html in the same directory as your flash file, otherwise it can’t open what it can’t find in Flash.

I just created a lame content.html in notepad and saved it in the same directory, and it works.

And you really sure use on(release) I find it to be better for links for some reason.