Solved

movieclip._visible

Posted on 2003-11-06
2
1,178 Views
Last Modified: 2008-03-04
I am searching through this database because I have problems with the visibility of movieclips throughout my fla-file with multiple frames.

Now I've read that a movieclip has no level: does this mean that a movieclip placed in the second frame of my swf-file with the action:

onClipEvent (load) {
_visible = false;
}

cannot be made visible clicking a button in the first frame using the actionscript:
on (release) {
gotoAndPlay(2);
_level1[movieclip]._visible = true // or _root[movieclip]._visible = true
}
?
How do I make that movieclip visible clicking the button in the first frame ?

Thanks for your reply,
0
Comment
Question by:Fivez
2 Comments
 
LVL 27

Accepted Solution

by:
negatyve earned 500 total points
ID: 9694096
The issue is not with level (you are not loading an external movie anyway). In fact you cannot act on movieclip which is not on the stage when you try to apply it a script. That means that if the movieclip "enters" the stage on frame 2, you cannot make it visible from frame 1.
So, you have got two solutions:

1st solution

• move your movieclip's layer on frame back, so the movieclip is on the stage from frame 1. your script:

onClipEvent (load) {
_visible = false;
}

makes it not visible. when you want to make it visible:

on (release) {
                gotoAndPlay(2);
                clip_instance_name._visible = true;
}

(where the instance name is that identifier you set from Instance panel in flash 5 or properties panel in flash mx)

2nd solution

• change the button script to:

on (release) {
                gotoAndPlay(2);
                var_visible = true;
}

and the movieclip script to:

onClipEvent (load) {
                if(!this._parent.var_visible)this._visible = false;
}
0
 

Author Comment

by:Fivez
ID: 9694375
onClipEvent (load) {
_visible = false;
}

makes it not visible. when you want to make it visible:

on (release) {
                gotoAndPlay(2);
                clip_instance_name._visible = true;
}

WORKS !!!!
I still don't quite understand the "why" since I go the second frame first and then ask to make the movieclip in frame2 visible, but I am very happy I have got my first-frame-to-second-frame working as it should !!

Thank you
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to how to record live broadcast.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now