Solved

movieclip._visible

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
anti-download video publishing site? 6 616
Embedded Video Download (Flash) 3 1,162
Can't play streaming video on event.on24.com 7 346
word is recognized as adobe and adobe as IE files 14 51
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

840 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