[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

movieclip._visible

Posted on 2003-11-06
2
Medium Priority
?
1,187 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

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

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…
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 live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

656 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