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 23rd, 2009, 03:55 PM
mboom123 mboom123 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 46 mboom123 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 40 m 21 sec
Reputation Power: 3
ActionScript 2 - Controlling one MC from another? AS 2.0

i have two MC with two swf files loading into them on my main file. what i am trying to do is have buttons in one MC move something in the my 2nd mc. i know that the _root. will work for controlling my main file but I'm don't know how to go about controlling anything inside of other movie clips. if anyone can help out at all it would save me big time.
Thanks guys

Reply With Quote
  #2  
Old June 23rd, 2009, 04:26 PM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 5,637 Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)  Folding Points: 14767 Folding Title: Novice Folder
Time spent in forums: 1 Month 11 h 15 m 54 sec
Reputation Power: 2029
Facebook MySpace
Once the two files have loaded they will both have the same _root which is the top most MovieClip/document. If you give them both instance names then you can control them via _root.clip_name_one.gotoAndPlay(1); etc.
__________________
Quis custodiet ipsos custodes?

Reply With Quote
  #3  
Old June 23rd, 2009, 04:34 PM
mboom123 mboom123 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 46 mboom123 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 40 m 21 sec
Reputation Power: 3
ok cool i will try this out, thanks so much tann

Reply With Quote
  #4  
Old June 23rd, 2009, 04:59 PM
mboom123 mboom123 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 46 mboom123 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 40 m 21 sec
Reputation Power: 3
i had two more questions, the first one is the "one" in _root.clip_name_one.gotoAndPlay(1); refer to the level of the mc or is that done with the 1 in the "gotoAndPlay(1);"?
my 2nd question was how would i apply that same code you gave me to moving something to a specific _x, _y inside of "clipB" by hitting a button that is placed inside of "clipA"

Last edited by mboom123 : June 23rd, 2009 at 05:04 PM.

Reply With Quote
  #5  
Old June 23rd, 2009, 07:05 PM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 5,637 Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)Tann San User rank is General 16th Grade (Above 100000 Reputation Level)  Folding Points: 14767 Folding Title: Novice Folder
Time spent in forums: 1 Month 11 h 15 m 54 sec
Reputation Power: 2029
Facebook MySpace
the "one" was just part of a name I made up. The whole thing was made up: "clip_name_one". I thought you would of understood that which is why I didn't explain it. The gotoAndPlay was also just part of the example to show how you would call a function within the fictional clip "clip_name_one".

As for moving an object, well you'd give that object an instance name and then control it as you would normally i.e.

_root.clip_name_one.movable_object._x = 50;

"clip_name_one" and "movable_object" are just instance names I made up for the sake of showing you what I meant.

Reply With Quote
  #6  
Old June 24th, 2009, 01:39 AM
mboom123 mboom123 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 46 mboom123 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 40 m 21 sec
Reputation Power: 3
oh ok, was not sure if the "one" was part of the name or not. thanks for explain that for me tann. you are always a big help thanks much

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > ActionScript 2 - Controlling one MC from another? AS 2.0


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




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

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




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
Stay green...Green IT