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 August 27th, 2003, 04:01 PM
desgnthis desgnthis is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 2 desgnthis User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Can anyone figure this out??

I have 5 movies with 10 frames in each I use for interactive buttons. All the movies are displayed at once.

When one is clicked it goes to frame 5, stops and displays an image. Same with the other 4 but displays a different image.

This is what I want to happen:

A movie(button) is clicked on, plays to frame 5 and displays an image and is sitting on frame 5. When another movie is clicked on, the previous clicked movie plays to frame 10 and goes back to frame one and the new clicked movie plays to frame 5.

The problem is when a movie(button) is clicked how can I make the movie that is sitting on frame 5 to play.

Does this make sense or is it utterly confusing. Hopefully someone will know.
Thanks for any help.

Reply With Quote
  #2  
Old August 28th, 2003, 03:32 PM
Cyanide Cyanide is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 17 Cyanide User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 17 sec
Reputation Power: 0
First put stop(); on frame 1 and 5 of your clip.

Next put this in the event that you want to trigger your button (Release, Press, etc).

Code:
if (lastButton != this._name) {
	_root[lastButton].gotoAndPlay(5);
	_root.lastButton = this._name;
	b1.gotoAndPlay(1);
}


lastButton is a variable on the _root timeline that stores the instance name of the last button that was clicked. When a different button is clicked, the last button is told to play from frame five. We also have an if statement being used to make sure that the last button is not the same as the button currently being pressed before we execute the rest of the code.

Hope that helps.

Reply With Quote
  #3  
Old September 9th, 2003, 02:15 PM
desgnthis desgnthis is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 2 desgnthis User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
What is the b1??

Reply With Quote
  #4  
Old September 12th, 2003, 09:40 PM
Cyanide Cyanide is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 17 Cyanide User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 17 sec
Reputation Power: 0
b1 was just the name of the movieClip. You could replace it with "this" if you wanted.

You would put that code in the movieClips onRelease and onReleaseOutside actions. That is assuming you have MX. If you don't then you'll have to put the code in the movieClip's onMouseUp event and use a hitTest to determine if the mouse is over the clip or not.

Usually if the keyword "this" is used in the code, it means the code goes in the actions of the object that is using it.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Can anyone figure this out??


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