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 July 29th, 2003, 09:24 AM
TulipaNegra TulipaNegra is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 3 TulipaNegra User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Animated buttons - keeping movie playing after mouseOff

Hello,

I am trying to make an animated button where the mouseOver action starts a movie that completes irrespective of whether the mouse actually stays over the buttons. I can create buttons where the movieClip starts on mouseOver and stops/reverts back to start on mouseOff (not sure of correct terminology here!), but not where the movie goes to the end even though the mouse has moved away.

I have tried several tutorials downloaded from the internet, but can't seem to get them to work.Sometimes Flash keeps telling me the scripting is wrong, but when I try and make corrections accordingly Flash repeats the debugging message as nothing has been changed. I don't know actionScript well enough to do this from scratch myself, so some advice would be most welcome.

It seems like such a simple thing to do - there must be some way I can manage it!

Thanks

Reply With Quote
  #2  
Old July 29th, 2003, 02:15 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 55 m 17 sec
Reputation Power: 17
use an mc rather than a button - they are much more powerful - like this:
Code:
//on main timeline
my_mc.onRollOver = function() {
this.play();
}
//on frame 1 of my_mc timeline
stop();

Reply With Quote
  #3  
Old July 30th, 2003, 08:53 AM
TulipaNegra TulipaNegra is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 3 TulipaNegra User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for the code. I tried it and came up with the following error messages from Flash. I hope I put the code in the right places!

Scene=Scene 1, Layer=main, Frame=1: Line 1: You must export your movie as Flash 5 to use this action.
about_mc.onRollOver=function()

Scene=Scene 1, Layer=main, Frame=1: Line 3: You must export your movie as Flash 5 to use this expression.
this.play();

Scene=Scene 1, Layer=main, Frame=1: Line 1: Statement must appear within onClipEvent handler
about_mc.onRollOver=function()

I am using Flash MX (which doesn't seem to want to let me save down to Flash 5), if that makes any difference.

Reply With Quote
  #4  
Old July 30th, 2003, 09:26 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 55 m 17 sec
Reputation Power: 17
what are you exporting as? (see File/Publish Settings/Flash)

Reply With Quote
  #5  
Old July 30th, 2003, 10:52 AM
TulipaNegra TulipaNegra is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 3 TulipaNegra User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
The settings (File/Publish Settings/Flash) I have at the moment are:

Version: FlashPlayer4

Load Order: Bottom up

Options: (none chosen)

Jpeg quality: 50

and that's it..

Reply With Quote
  #6  
Old July 30th, 2003, 02:46 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 55 m 17 sec
Reputation Power: 17
you'll have to export as 5 at least, 6 is better - you could it as flash 4 but the syntax is totally different.

Reply With Quote
  #7  
Old July 30th, 2003, 03:52 PM
church586 church586 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 3 church586 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
the movieClip.onEvent syntax is new to MX and it's new event model. Don't forget to give your clips instance names, otherwise your script will fail.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Animated buttons - keeping movie playing after mouseOff


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 5 hosted by Hostway