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 March 11th, 2004, 03:03 PM
randycrews randycrews is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 68 randycrews User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 17 m 37 sec
Reputation Power: 5
navigating to a new scene from a MC on the main TL

Good afternoon all, Quick question I have a MC with a button in it MC=mymc, and the button=mybtn.
Now let's say I have this button wihtin the MC on the main timeline. If I wanted to go to a frame labeled start (on the main timeline) the code would be:

on(release)
{
_root.gotoAndPlay("start"); //start being the frame label
}

If I wanted to go to another scene how would I code that? I tried
_root.gotoAndPlay("Scene2","start2"); //start2 being the frame label

I even tried _root.mymc.gotoAndPlay..... no luck.

I know the button is working beacuse I have a stopAllSound() on it and the audio it stoppingwhen I click on the button.

I'd appreciate any feedback.

Cheers,

RC

Reply With Quote
  #2  
Old March 11th, 2004, 03:51 PM
randycrews randycrews is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 68 randycrews User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 17 m 37 sec
Reputation Power: 5
Arrow

OK all after doing some research here is what I found out...
When using the goto comand it only references the most local time line of the current mc and not the main timeline.
Apparently even when using the _parent.goto or _root.goto it still does not work becuase of the object Hieracrhy is not recognized within Flash.(I didn't come up with this concept).
SOooooo the work around for this is to eiterh put your buttons on the main timeline "or" point to a frame on the current timline that is 1 past the last keyframe and drop code into those frame sending the playback head to the other scenes. To sum it all up gotoAndPlay will not jump directly to other scenes when placed on buttons inside of movie clips.

Reply With Quote
  #3  
Old March 11th, 2004, 07:06 PM
jmichels's Avatar
jmichels jmichels is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Orlando, FL
Posts: 177 jmichels User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 18 m 12 sec
Reputation Power: 6
Here is an .fla to show you how to achieve this.
Attached Files
File Type: zip scenes.zip (4.5 KB, 132 views)

Last edited by jmichels : March 11th, 2004 at 07:09 PM.

Reply With Quote
  #4  
Old March 11th, 2004, 09:54 PM
randycrews randycrews is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 68 randycrews User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 17 m 37 sec
Reputation Power: 5
Quote:
Originally Posted by jmichels
Here is an .fla to show you how to achieve this.


Thanks jmichels. That worked like a charm

Cheers,

RC

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > navigating to a new scene from a MC on the main TL


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
Stay green...Green IT