# getUrl and random motion

**URL:** https://forum.kirupa.com/t/geturl-and-random-motion/14629
**Category:** flash
**Created:** [February 28, 2003, 5:57pm UTC](https://forum.kirupa.com/t/geturl-and-random-motion/14629 "2003-02-28T17:57:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ateale](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ateale/32/173_2.png) [@ateale](https://forum.kirupa.com/u/ateale)
#### Post date: [February 28, 2003, 5:57pm UTC](https://forum.kirupa.com/t/geturl-and-random-motion/14629/1 "2003-02-28T17:57:59Z")

</div>

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](mailto:ateale@mac.com)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 28, 2003, 6:07pm UTC](https://forum.kirupa.com/t/geturl-and-random-motion/14629/2 "2003-02-28T18:07:25Z")

</div>

put button into movie clip  
that’s it 😉

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 28, 2003, 6:30pm UTC](https://forum.kirupa.com/t/geturl-and-random-motion/14629/3 "2003-02-28T18:30:05Z")

</div>

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…

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

```

Know what I mean??? 😉

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 28, 2003, 6:46pm UTC](https://forum.kirupa.com/t/geturl-and-random-motion/14629/4 "2003-02-28T18:46:26Z")

</div>

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 😉

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.
