Re: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2008-03-05 Thread Steven Sacks
If you really like this auto-button trick, check out my JSFL script which automates the process of making them. http://www.stevensacks.net/2008/02/01/using-jsfl-to-create-auto-buttons-in-flash/ ___ Flashcoders mailing list

Re: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2008-03-02 Thread Jimbo
Thanks! I had given up on using the _up, _over, _down mc-button method in as3 because of that flicker. Your explaination and solution make perfect sense. jimbo *** REPLY SEPARATOR *** On 3/1/2008 at 9:08 PM Joseph Balderson wrote: Just found this thread while trying to work

Re: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2008-03-01 Thread Joseph Balderson
Just found this thread while trying to work this out myself. I have tried the same technique as discused here, and my button was flickering too, until I discovered that it's because of the event bubbling and regarding child objects as buttons themselves. What you need to do is set

Re: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2007-06-28 Thread Jim Berkey
Adam, Your button works with your assets . . . if you change all of the graphic elements from 'movie clips' on your _up, _over and _down frames to 'graphic' Type - both in the library and above the instance name in the properties panel when selected on stage. Grouping is all right, but no mc

Re: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2007-06-28 Thread Jim Berkey
Fumio, Can you explain using' InteractiveObject.mouseEnabled' to allow a mc inside a mc acting as a button a little more? I have a mc called button_play, with the three frames (_up, _over, and _down), in the over frame, instead of a graphic, I placed a mc, gave it instance name over_mc, and on

Re: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2007-06-28 Thread Fumio Nonaka
When the statement you put is processed the play head in the btn_play instance is in the first frame, in which the over_mc instance does not exist. This is what the error tells you. Therefore InteractiveObject.mouseEnabled for over_mc cannot be set. trace(btn_play.over_mc); //

Re: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2007-06-28 Thread Jim Berkey
Thanks Fumio, Works like a charm!! jimbo *** REPLY SEPARATOR *** On 6/28/2007 at 9:48 PM Fumio Nonaka wrote: When the statement you put is processed the play head in the btn_play instance is in the first frame, in which the over_mc instance does not exist. This is what the

Re: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2007-06-28 Thread Jim Berkey
Fuomo, One more question, if you have the inclination . . . I put the statement on each frame of the button mc, and it works as expected, but as I mouse over the shape, there is a flicker between the up state to the over state - I thought it might be that part of the graphic was transparent and

Re: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2007-06-27 Thread Muzak
@chattyfig.figleaf.com Sent: Wednesday, June 27, 2007 6:40 AM Subject: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3 In ActionScript 2, I never used button symbols. Instead I would create buttons as MovieClips, give the frames of the buttons labels -- _up, _down, _over -- and assign

Re: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2007-06-27 Thread Jim Berkey
One way to instantiate a mc as a button in as3 is: my_btn.addEventListener(MouseEvent.CLICK, myFunction); my_btn.buttonMode = true; function myFunction(event:MouseEvent):void { //do something } jimbo *** REPLY SEPARATOR *** On 6/26/2007 at 9:40 PM Adam Pasztory wrote:

Re: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2007-06-27 Thread Adam Pasztory
Thanks Jim, I've set up the AS3 event handler as you've specified, and it does change the cursor from an arrow to a pointer, but the _up, _down and _over states don't work. I pasted the same button symbol into an AS2 FLA file, and it does work, so there isn't anything wrong with the way I've

Re: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2007-06-27 Thread Jim Berkey
Yes, I can find nothing in as3 docs about support for that shortcut (_up,_over, _down frame labels). The buttonMode=true only affects the cursor - changes it from pointer to hand. afaik, you need to set functions for each event - possible mouse events include: CLICK DOUBLE_CLICK MOUSE_DOWN

Re: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2007-06-27 Thread Leandro Amano
Hi Adam, Use the sample below for Button instances: import flash.display.SimpleButton; import flash.display.Sprite; var up:Sprite = new Sprite(); up.graphics.beginFill(0x99); up.graphics.drawRect(50, 50, 50, 50); up.graphics.endFill(); var over:Sprite = new Sprite();

Re: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2007-06-27 Thread Adam Pasztory
Also, the client just wants the buttons delivered in a simple graphical format, so they can add code later. They don't want me to send them an FLA with a ton of code in it, like in Leandro's example. I would go ahead and just use button symbols, but my problem is that these buttons also have an

Re: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2007-06-27 Thread Adam Pasztory
According to the docs, it *is* supported. http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/Sprite.html#buttonMode If you use the buttonMode property with the MovieClip class (which is a subclass of the Sprite class), your button might have some added functionality. If you

Re: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2007-06-27 Thread Jim Berkey
Hah, yes, it does work, just need to addChild: my_btn.addEventListener(MouseEvent.CLICK, myFunction); my_btn.buttonMode = true; function myFunction(event:MouseEvent):void { //do something } addChild(my_btn); jimbo *** REPLY SEPARATOR *** On 6/27/2007 at 7:14 AM Adam

Re: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2007-06-27 Thread Adam Pasztory
Didn't work. I posted the FLA in case anyone is bored and feels like taking a look: http://www.pasz.com/xfer/FinalAssets.zip On 6/27/07, Jim Berkey [EMAIL PROTECTED] wrote: Hah, yes, it does work, just need to addChild: my_btn.addEventListener(MouseEvent.CLICK, myFunction); my_btn.buttonMode

Re: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2007-06-27 Thread Jim Berkey
funny, mine does . . . your setup looks the same? http://jimbo.us/lab/buttonAs3.fla http://jimbo.us/lab/buttonAs3.swf *** REPLY SEPARATOR *** On 6/27/2007 at 8:39 AM Adam Pasztory wrote: Didn't work. I posted the FLA in case anyone is bored and feels like taking a look:

Re: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2007-06-27 Thread Adam Pasztory
Jim, The problem seems to be that each of my button states is a MovieClip. In your version, the buttons states are just raw graphics and text the timeline of the button. Do a convert to symbol on your graphics, and change each button state into a MovieClip. The hit areas will no longer work.

Re: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2007-06-27 Thread Leandro Amano
Adam, Please, it sees the archive in the URL: www.leandroamano.com.br/files/button_as3.fla best regards On 6/27/07, Adam Pasztory [EMAIL PROTECTED] wrote: Jim, The problem seems to be that each of my button states is a MovieClip. In your version, the buttons states are just raw graphics

Re: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2007-06-27 Thread Jim Berkey
You're right. Unfortunately, there are precious few examples in the flash docs for simple designer-type actionscript - it's all Flex type class structure. jimbo *** REPLY SEPARATOR *** On 6/27/2007 at 9:22 AM Adam Pasztory wrote: Jim, The problem seems to be that each of my

Re: [Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2007-06-27 Thread Fumio Nonaka
This works in ActionScript 3.0, too. You should use Graphic instances for your button's states. Otherwise, set the InteractiveObject.mouseEnabled properties of MovieClips for each state to false. _ Adam Pasztory wrote: The problem seems to be that each of my button states is a

[Flashcoders] MovieClip Buttons in Flash CS3 ActionScript 3

2007-06-26 Thread Adam Pasztory
In ActionScript 2, I never used button symbols. Instead I would create buttons as MovieClips, give the frames of the buttons labels -- _up, _down, _over -- and assign an event handler to them. I tried this in AS3, but it didn't seem to work. Is there some new secret to MovieClip buttons in