Solved

movieclip._visible

Posted on 2003-11-06
2
1,177 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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

771 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

9 Experts available now in Live!

Get 1:1 Help Now