SunQuest
           Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 26th, 2003, 07:11 PM
Dr Tim Dr Tim is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 6 Dr Tim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Problem with Flash MX button

I'm trying to develop a button with an up and over state consisting of 2 graphics of the same image, one color, one b&w. I would like to have text fly in from the side onto the button when in the over state. What I have done is: On the stage on the over state, I insert a symbol, specifying it as a movie and then set up my initial and final frames. I also specify the button size as the hit state since I don't want the text that's off the button to be activated.

The button works as I want except that if the cursor lands on the text as it comes into the button, I get a flashing or stuttering between the original image, the over image and the text, with the result that one usually predominates. Anywhere else on the button (outside of the text animation), it works fine. Any ideas on how to get rid of this annoying stuttering or flashing?

I'd also like to have the text reverse its motion when the cursor leaves the button. How is that done?

Reply With Quote
  #2  
Old July 2nd, 2003, 05:28 AM
jamieB jamieB is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2002
Posts: 592 jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 1 h 56 m 16 sec
Reputation Power: 17
re the text, break it apart - select the text and press Ctrl-B twice.

to reverse the tween, use a movieclip instead of a button - take the graphics from your button and put it in a clip with frames labelled _up, _over, _down and rollOut - these maybe one frame only or in the case of _over and _rollOut will include your tween. Put a stop() action on frame 1 (_up) then put some code like this on the main timeline:

Code:
my_button.onRollOut = function() {
this.gotoAndPlay("rollOut");
}


that's all you need - the _up, _over and _down frames are recognised by flash as the button states for any clip that has a button type event handler applied to it, eg onRollOut. This is the better way to make any button in mx, even ones that down't need to do anything fancy, co then you can apply other movieclip methods etc.

Reply With Quote
  #3  
Old July 2nd, 2003, 01:21 PM
Dr Tim Dr Tim is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 6 Dr Tim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks, that does the trick . One small item, though, is that the tweening needs to be changed from 'motion' to 'shape'.

Tim

Reply With Quote
  #4  
Old July 3rd, 2003, 11:51 AM
Dr Tim Dr Tim is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 6 Dr Tim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
JamieB,

I've tried your alternative method for animated buttons, but am not having any success. Do you have an .fla file that uses this method that you could send to me?

Tim

Reply With Quote
  #5  
Old July 3rd, 2003, 01:52 PM
jamieB jamieB is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2002
Posts: 592 jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 1 h 56 m 16 sec
Reputation Power: 17
can do, but sorry I don't have access to flash at the mo (when we can flash on linux without wine I'll be happy ) will post something when i get the chance...

Reply With Quote
  #6  
Old July 3rd, 2003, 02:43 PM
StealthElephant's Avatar
StealthElephant StealthElephant is offline
Shes dancing (obviously)
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2002
Location: the far side
Posts: 526 StealthElephant User rank is Corporal (100 - 500 Reputation Level)StealthElephant User rank is Corporal (100 - 500 Reputation Level)StealthElephant User rank is Corporal (100 - 500 Reputation Level)StealthElephant User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 h 14 m 22 sec
Reputation Power: 8
hello to the other flash developer that dont use mac or windows

Reply With Quote
  #7  
Old July 5th, 2003, 09:33 AM
Dr Tim Dr Tim is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 6 Dr Tim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question

Does anyone have a sample .fla that uses the button method that jamieB describes? I can send my personal email if that helps.

Reply With Quote
  #8  
Old July 5th, 2003, 12:33 PM
jamieB jamieB is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2002
Posts: 592 jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 1 h 56 m 16 sec
Reputation Power: 17
here you go dr tim - you'll see that I was underestimating what's needed slightly, cos the default behavious with a clip with _up, _over etc frames and one or more button handlers is to gotoAndStop at the relevent frame - no good for your tween....so I added the onRollOver and onRollOut handlers in code....


also, this is pretty crude cos when you rollout on the button mc the rollOut tween starts from the beginning every time - but maybe you've only just rolled onto it so that looks weird - mouse on and off the button quickly and you'll see what I mean....if this bothers you then it's pretty easy to solve, but you'd use a different method - have just one tween from offstage to central position and when you mouse on the button set a variable to say "keep moving one frame at a time left to right till you get to the middle" but when you mouse off that would then be saying "keep moving one frame at a time till you get to the other extreme..." so you would go in and out smoothly - let me know if you want more detail on that.

I hope this helps you man, I booted windows! (I normally just flash at work)
Attached Files
File Type: zip buttons.zip (4.1 KB, 514 views)

Reply With Quote
  #9  
Old July 5th, 2003, 02:06 PM
Dr Tim Dr Tim is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 6 Dr Tim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks, jamieB!

I'll take a look at it and let you know how it goes.

Tim

Reply With Quote
  #10  
Old July 5th, 2003, 02:54 PM
Dr Tim Dr Tim is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 6 Dr Tim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
JAMIEb, YOU'RE A LIFESAVER!

The .fla works great. Actually, I only want the animation to last about 5 or 6 frames (at 12fps) so the momentary mouseover doesn't present a problem. It actually looks better if it only partially comes on the screen.

Thanks again!

Tim

Reply With Quote
  #11  
Old July 5th, 2003, 03:02 PM
jamieB jamieB is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2002
Posts: 592 jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level)jamieB User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 1 h 56 m 16 sec
Reputation Power: 17
great

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Problem with Flash MX button


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway