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 18th, 2009, 02:37 PM
Brendan.C Brendan.C is offline
Dim Brendan as Noob
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 443 Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Days 9 h 31 m 26 sec
Reputation Power: 417
ActionScript 3 - Since when do I have to declare an MC???!!

Since when do I have to "declare" an mc to set it's _visible status???!!!

lol, this is very frustrating.

I just have a plain old MC on the stage named mcCross1 and I want to set it's _visible to false on my actionscript frame....

How do I go about doing this?

THank you.

Reply With Quote
  #2  
Old June 18th, 2009, 02:55 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
Hi, there is no _visible in ActionScript 3, it's visible without the underscore. When you say it's named mcCross1 do you mean that's its library name or do you mean you have given the copy on the stage an instance name via the properties panel. You have to do the later to be able to reference it to set its visible property. Well, technically you don't have to if you know its index in its parents display list but I'm assuming you don't want to do that!
__________________
Quis custodiet ipsos custodes?

Reply With Quote
  #3  
Old June 18th, 2009, 07:45 PM
Brendan.C Brendan.C is offline
Dim Brendan as Noob
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 443 Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Days 9 h 31 m 26 sec
Reputation Power: 417
Thank you very much. It's been way too long since I've done this stuff.

How would I go about changing the visible property of an instance on the stage from a button?

Reply With Quote
  #4  
Old June 18th, 2009, 09:00 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
You would give the button an instance name, associate an event handler with it which in turn sets the visible property of your mcCross1 clip:
Code:
your_button.addEventListener(MouseEvent.MOUSE_DOWN, this.doPress);
function doPress(event:MouseEvent):void
   {
      mcCross1.visible = false;
      // Or as a toggle on/off
      // mcCross1.visible = !mcCross1.visible;
   }
Comments on this post
Brendan.C agrees: Thank you sir.

Reply With Quote
  #5  
Old June 18th, 2009, 09:48 PM
Brendan.C Brendan.C is offline
Dim Brendan as Noob
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 443 Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Brendan.C User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Days 9 h 31 m 26 sec
Reputation Power: 417
Works.

Much appreciated.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > ActionScript 3 - Since when do I have to declare an MC???!!


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 6 Hosted by Hostway
Stay green...Green IT