View Full Version : Restricted to Buttons
Mario912
01-15-2003, 03:22 AM
Okey Dokey,
On (release) is restricted to buttons right? Well, how can I classify a layer as a button
thpii
01-15-2003, 03:57 AM
Maybe it would help if you told us what you're trying to do or accomplish....
-Theron
farafiro
01-15-2003, 09:23 AM
if u r on MX, no it's not restricted to the buttons, MC can recieve it
Layers can be classified for that, it's just a matter of organising things
Mario912
01-15-2003, 11:34 AM
Yes it is! When I put in the code, I get an output screen stating this
Scene=Scene 1, Layer=Button, Frame=53: Line 1: Mouse events are permitted only for button instances
I am just trying to make a button that goes from one scene to the next... Everyone does this!
farafiro
01-15-2003, 11:38 AM
ahuh, u just need to give the button instance name in the property panel, say myButton
and then call it from the _root likemyButton.onRelease = function(){
gotoAndStop(//any)
}
read this also
http://www.actionscript.org/tutorials/intermediate/Flash_MX_Event_Model/index.shtml
vosgien
01-15-2003, 02:12 PM
Hi mario,
farafiro is right, but perhaps he assumes that you know how to make an mc a button - your first line of code should read
myButton.enabled = true;
myButton.onRelease = function(){
//action in here
};
As he says make sure you give your mc an instance name and then any mc will work just like a button
Hope that helps
Vosgien
p.s. my first post since the Holidays - so HAPPY NEW YEAR to all at actionscript.org
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.