Welcome to Dream.In.Code
Become an Expert!

Join 136,941 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,869 people online right now. Registration is fast and FREE... Join Now!




Hide & Show MC's

 
Reply to this topicStart new topic

Hide & Show MC's, Path issues - Not getting the path thing correct

bmcc81
23 Oct, 2007 - 11:26 AM
Post #1

D.I.C Head
**

Joined: 10 Jul, 2007
Posts: 164


My Contributions
Hi,

I’ve go this project: There is 3 swf that load ontop of each other.

1st swf – no problem

2nd swf = has main mc on it, which needs to be hiden and shown when needed.

3rd swf – merchants.swf what I want is to show the mc main that is one swf lower on the 2nd swf.

I used:

CODE

on (press) {
   if (_parent.merchants._visible) {
   trace(“brandon”);
   main._visible = true;
  }
}


I think I have a levels issue, but I don’t know how to get the code to get to the main mc? Can anyone help with finding main mc?

Thanks

User is offlineProfile CardPM
+Quote Post

girasquid
RE: Hide & Show MC's
23 Oct, 2007 - 11:32 AM
Post #2

Barbarbar
Group Icon

Joined: 3 Oct, 2006
Posts: 1,267



Thanked: 14 times
Dream Kudos: 650
My Contributions
Try using the _levelx property, or _root and accessing it directly.
User is offlineProfile CardPM
+Quote Post

bmcc81
RE: Hide & Show MC's
24 Oct, 2007 - 05:41 AM
Post #3

D.I.C Head
**

Joined: 10 Jul, 2007
Posts: 164


My Contributions
QUOTE(girasquid @ 23 Oct, 2007 - 12:32 PM) *

Try using the _levelx property, or _root and accessing it directly.


Does anyone know how to get down a swf?

To control a swf that is loaded underneath a top swf.
From the Top swf button must make a MC on the bottom swf become visible.

Can you control a swf that is loaed underneath?
User is offlineProfile CardPM
+Quote Post

girasquid
RE: Hide & Show MC's
24 Oct, 2007 - 09:10 AM
Post #4

Barbarbar
Group Icon

Joined: 3 Oct, 2006
Posts: 1,267



Thanked: 14 times
Dream Kudos: 650
My Contributions
If you have 3 SWF's:

1.swf, 2.swf, 3.swf

You can access 3.swf if it's loaded into 2.swf(which is loaded into 1.swf) using _level2, I believe. I'm not at home right now so I can't do any testing.
User is offlineProfile CardPM
+Quote Post

cclements
RE: Hide & Show MC's
8 Nov, 2007 - 06:08 PM
Post #5

New D.I.C Head
*

Joined: 8 Nov, 2007
Posts: 2


My Contributions
from what i am understanding you are not having a visibility issue but a levels issue. if you want to place a MovieClip on top of another one on command because it is currently underneath the MovieClip you have to use what is called swapDepths(). Here is how you use it:
CODE

// name 2 movieclips clip1 and clip2
// on a blank place this code
clip1.swapDepths(clip2)

If clip1 is on level5 and clip2 is on level78, those 2 movieclips will exchange depths. you can also use swapDepths() by passing a level number into the function.
CODE

clip1.swapDepths(22)
// clip1 is now on level22

Hope that helps,
Charles

User is offlineProfile CardPM
+Quote Post

Slpixe
RE: Hide & Show MC's
28 Sep, 2008 - 06:43 AM
Post #6

New D.I.C Head
*

Joined: 28 Sep, 2008
Posts: 1

disregarding the problem,

I'm trying _visible = false;
and getting the error
Statement must appear within on/onClipEvent handler

any idea's?

This post has been edited by Slpixe: 28 Sep, 2008 - 07:04 AM
User is offlineProfile CardPM
+Quote Post

DilutedImage
RE: Hide & Show MC's
29 Sep, 2008 - 10:03 PM
Post #7

D.I.C Addict
Group Icon

Joined: 20 Nov, 2006
Posts: 642



Thanked: 6 times
Dream Kudos: 25
My Contributions
QUOTE(Slpixe @ 28 Sep, 2008 - 07:43 AM) *
any idea's?

Yeah. Create your own thread.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/3/08 10:57PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month