# Mouse events are permitted only for button instances

**URL:** <https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914>\
**Category:** flash\
**Created:** [August 20, 2003, 3:03am UTC](https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914 "2003-08-20T03:03:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![trevorsaint](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/trevorsaint/32/268_2.png) [@trevorsaint](https://forum.kirupa.com/u/trevorsaint)\
**Post date:** [August 20, 2003, 3:03am UTC](https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914/1 "2003-08-20T03:03:08Z")

</div>

I have converted dynamic text to a button, and this is the message I get when I attempt to link it to something, where am i going wrong it puzzles me this does.

Trev

---

<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:** [August 20, 2003, 3:08am UTC](https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914/2 "2003-08-20T03:08:38Z")

</div>

You are probably using a mouse event handler inside a frame in the main timeline. It should be applied on the button instance.  
:-\

---

<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:** [August 20, 2003, 3:14am UTC](https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914/3 "2003-08-20T03:14:15Z")

</div>

Thanks for pointing that out, I wondered what I was doing wrong as i did it before fine :).

Was it you I asked previously about having an empty movie clip and loading the two swf files I have inside that. As I tried this method with little success. I have just spend ages getting a form sorted, it can be difficult, I am sure you find all this way to easy. 🙂

could you spare a few moments C, to help me with this loading mc ?

---

<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:** [August 20, 2003, 3:18am UTC](https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914/4 "2003-08-20T03:18:17Z")

</div>

welcome :thumb:  
Im not sure if you asked me about the other problem earlier… maybe you can point me the thread?

---

<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:** [August 20, 2003, 3:23am UTC](https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914/5 "2003-08-20T03:23:23Z")

</div>

Ok Claudio, I will explain. I have almost completed my first flash movie for a school web site. Due to such a rush I have blasted through flash with little experience, so I feel I may have started off wrong. For there requirements its more of a re-direction page. with a home page and a contact us page. I have two files the first is the homepage and the send is a contact us page. so two swf files.

This may have been the wrong way to do it, as It is advised somewhere not to use scenes, How can I achieve displaying the two clips, if they are seperate files.

please please have a look at the contact us page and give comments for improvements. Its my first flash work. any comments would be really cool Claudio

cheers

---

<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:** [August 20, 2003, 3:37am UTC](https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914/6 "2003-08-20T03:37:38Z")

</div>

Ok, you have 2 movies (contact and homepage). How are they going to interact? The “homepage” is the main movie? Do you want the contact to open on the same page?  
I myself hate using scenes, i think they are too buggy. And you might want to read this tutorial:  
[http://www.kirupa.com/developer/mx/full\_site.htm](http://www.kirupa.com/developer/mx/full_site.htm)

And the contact page looks fine, really good for a first flash project 🙂  
That explains how to load external swf’s.

---

<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:** [August 20, 2003, 3:52am UTC](https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914/7 "2003-08-20T03:52:17Z")

</div>

Well if there were no people like you helping there would be no flash site :). thanks again I will have a look at the link you gave me.

Thank you

---

<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:** [August 20, 2003, 3:54am UTC](https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914/8 "2003-08-20T03:54:04Z")

</div>

I have the homepage. and included is a preloader. the same applies for the second page i.e contact. I am still not sure how they will interact !!! any ideas?

---

<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:** [August 20, 2003, 3:57am UTC](https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914/9 "2003-08-20T03:57:32Z")

</div>

Do you plan on doing something similar to that link?  
I mean, have a main page witha navigation and load the external swf’s into an empty movie clip?

---

<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:** [August 20, 2003, 4:02am UTC](https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914/10 "2003-08-20T04:02:23Z")

</div>

Hi Claudio, I am beginning to look at the tutorial. My design however. I require a movie clip with nothing in it, rather than having buttons there to load the clips into afterwoods. I hope you follow, so basically I want an automatically load of my homepage.swf file or index.swf 🙂 - I hope this makes sense.

T

---

<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:** [August 20, 2003, 4:03am UTC](https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914/11 "2003-08-20T04:03:48Z")

</div>

I guess that you want the index page to be the “homepage” movie. And them when you click “contact”, it should open in the same window.  
Right?

---

<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:** [August 20, 2003, 4:06am UTC](https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914/12 "2003-08-20T04:06:48Z")

</div>

thats it right. so I will have my html document with the flash in the centre. the preloader comes on and the homepage loads as normal, then when I click on my contact button it runs the preloader again and viola 🙂

---

<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:** [August 20, 2003, 4:11am UTC](https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914/13 "2003-08-20T04:11:45Z")

</div>

Inside “homepage”, use this code on the main timeline:[AS]contactbutton.onPress = function() {  
loadMovieNum(“contactus.swf”, 0);  
};[/AS]  
And on “contactus”:[AS]homepagebutton.onPress = function() {  
loadMovieNum(“homepage.swf”, 0);  
};[/AS]

---

<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:** [August 20, 2003, 4:13am UTC](https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914/14 "2003-08-20T04:13:47Z")

</div>

what about the holder movie? do you mean just place my home.swf inside the html and then use the action script. Is this the method to use, and did I make the mistake using seperate swf files for each page.?

---

<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:** [August 20, 2003, 4:18am UTC](https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914/15 "2003-08-20T04:18:27Z")

</div>

You wont need a holder mc on this case.  
You could have placed everytihng inside one swf, that was an option… but no problem.  
Use that code and no holder mc.

---

<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:** [August 20, 2003, 4:20am UTC](https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914/16 "2003-08-20T04:20:33Z")

</div>

ok C, thats good I will get it sorted and let you know when it is complete, maybe you could provide me with some finishing tweaks towards the end 🙂

cheers again

Trev

---

<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:** [August 20, 2003, 4:23am UTC](https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914/17 "2003-08-20T04:23:29Z")

</div>

K good luck  
🙂

---

<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:** [August 20, 2003, 4:24am UTC](https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914/18 "2003-08-20T04:24:52Z")

</div>

I have all this code in my button action script

[AS]

buttonOne.onRollOver = function(){  
OK1 = true;  
}  
buttonOne.onRollOut = function(){  
OK1 = false;  
}  
effectOne.onEnterFrame = function() {  
if (OK1) {  
effectOne.nextFrame();  
} else {  
effectOne.prevFrame();  
}  
};

[/AS]

where is a good place to put the links in Claudio - too much code for my brain to handle ☹

---

<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:** [August 20, 2003, 4:25am UTC](https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914/19 "2003-08-20T04:25:55Z")

</div>

thanks - I have not slept in days, beginning to feel the pressure now 🙂

later

---

<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:** [August 20, 2003, 4:31am UTC](https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914/20 "2003-08-20T04:31:11Z")

</div>

What buttonOne does?

[Next page](https://forum.kirupa.com/t/mouse-events-are-permitted-only-for-button-instances/28914.md?page=2)
