[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

movieclip._visible

Posted on 2003-11-06
2
Medium Priority
?
1,190 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 2000 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

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…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to how to record live broadcast.
Suggested Courses

873 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