-
[CS3] Can't get button within movie to work
Hi all,
I'm having a little bit of trouble making a button located inside of an instance of a movie clip work. I'm trying to use actionscript in the main timeline to get the button to work.
Here's what I have:
A movie clip with an instance name of "movie_mc"
Inside of the movie clip, I have a button with an instance name of "button_btn"
On the actions layer of the main timeline, I have the following code:
this.movie_mc.button_btn.onRelease = function(){
getUrl("www.website.com")
}
When I click on the button, nothing happens. I used the targeting feature in CS3, so I'm certainly specifying the instance of the button. I'm not sure whats wrong.
Any help that you could provide me with would be greatly appreciated. Thanks!
Ipsum
-
you have to have "http://" in there
PHP Code:
getUrl("http://www.website.com")
-
Hi moagrius,
Thanks for the reply! Actually, I do have "http://www.website.com" typed in there. I just forgot to put it in the post when I retyped the code.
Sorry for the confusion!
Ipsum
-
then that should work fine. check for typos, and make sure your actionscript is in the frame and not on a symbol.
-
Got it! It didn't have anything to do with the code, but with the frame in which I was placing the code. In the movieclip, the button doesn't appear in the first frame of the clip, which was where I was placing the code in the main timeline. Can't apply code to something if it doesn't exist yet! Stupid me.
Thanks for your responses moagrius! Wish I had figured that out earlier!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|