# Crazy button has a mind of its own!

**URL:** https://forum.kirupa.com/t/crazy-button-has-a-mind-of-its-own/263083
**Category:** flash
**Created:** [June 12, 2008, 1:45pm UTC](https://forum.kirupa.com/t/crazy-button-has-a-mind-of-its-own/263083 "2008-06-12T13:45:56Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![aligray](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@aligray](https://forum.kirupa.com/u/aligray)
#### Post date: [June 12, 2008, 1:45pm UTC](https://forum.kirupa.com/t/crazy-button-has-a-mind-of-its-own/263083/1 "2008-06-12T13:45:56Z")

</div>

Hi guys hope someone can help. Ive just got a simple button, on mouse over it clanges colour which all works fine and on the hit state i want to embed a movie clip that makes the button slide up like a tab. ive embedded a working movie clip but it doesnt work when the button is clicked. any ideas? im going crazy here! its in AS3 by the way

---

<div class="post-metadata">

### Author: ![tizbo1423](https://avatars.discourse-cdn.com/v4/letter/t/90ced4/32.png) [@tizbo1423](https://forum.kirupa.com/u/tizbo1423)
#### Post date: [June 12, 2008, 1:56pm UTC](https://forum.kirupa.com/t/crazy-button-has-a-mind-of-its-own/263083/2 "2008-06-12T13:56:14Z")

</div>

i’m not sure how to fix that, but i have a question for you if you don’t mind. how do you make buttons work with AS3?! I make the buttons. The roll over works (i don’t even know how to make it roll up like a tab… how do you do that?). But, i can’t add actions to it, so when the button is clicked, it will never go anywhere. do you know how to make them clickable with AS3??

---

<div class="post-metadata">

### Author: ![aligray](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@aligray](https://forum.kirupa.com/u/aligray)
#### Post date: [June 12, 2008, 2:02pm UTC](https://forum.kirupa.com/t/crazy-button-has-a-mind-of-its-own/263083/3 "2008-06-12T14:02:22Z")

</div>

yeah its all about as3. you need to put in the timeline of where the button is some code. Something like this:

var yourbuttonLoader:Loader = new Loader();  
yourbuttonLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, youbuttonLoaded);  
yourButton.addEventListener(MouseEvent.CLICK, yourbuttonClickHandler);  
function armsClickHandler(event:MouseEvent):void  
{  
yourbuttonLoader.load(new URLRequest(“pageYouWantToLoad.swf”));  
}  
function yourbuttonLoaded(event:Event):void  
{  
addChild(yourbuttonLoader);  
}

where you give the button an instance name and replace the corresponding text. this will open a swf in the current document but if yo get to grips with this you can tell it to do anything.

---

<div class="post-metadata">

### Author: ![tizbo1423](https://avatars.discourse-cdn.com/v4/letter/t/90ced4/32.png) [@tizbo1423](https://forum.kirupa.com/u/tizbo1423)
#### Post date: [June 12, 2008, 2:10pm UTC](https://forum.kirupa.com/t/crazy-button-has-a-mind-of-its-own/263083/4 "2008-06-12T14:10:57Z")

</div>

yeaaaaaa i definitely don’t understand any of that stuff, haha. thanks a lot, i’ll just have to learn AS i guess. i just wish flash had like a button for everything instead of having to know AS.
