getUrl and random motion

Hi Guys,

Firstly, what a great site! Kirupa has been such a great source of info!

I did the random motion tut and “borrowed” the code.

Now what I want to do is the the randomly moving object at a link to a URL.

However, it seems that when an object is a ‘Movie’ and not a ‘Button’, it cannot be done using getURL actionscript.

Is this the case? How can I fix it?

Thanks

ateale@mac.com

put button into movie clip
that’s it :wink:

Howdy…

Since you are using FMX, you can utilize MovieClip.onPress handler to make the movieclip act as a button… So, the script will be something like this…

yourMCInstance.onPress = function ()
{
     getURL("blahblahlalala...
}

Know what I mean??? :wink:

Also in Flash MX you can use Button handlers on a Movie Clip symbol.

so on (release) and such WILL still work on a movie clip symbol :wink:

Gotta love MX. More people prefer Cyans way because it allows you to keep all your code on a frame for easy access, but both methods work.