473,397 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

How to create an empty Movie Clip behind other layers?

Hey,

I got an automatic slideshow script. But I want the slideshow to be my background, so it has to be behind all the other layers.

Does anyone know how to do it?

Here is the part of the script that creates the EmptyMovieClips

Expand|Select|Wrap|Line Numbers
  1. container_mc.createEmptyMovieClip("loader1_mc",2);
  2. container_mc.createEmptyMovieClip("loader2_mc",1); 
Thnks
Jul 17 '07 #1
3 9105
axis
12
Expand|Select|Wrap|Line Numbers
  1. container_mc.createEmptyMovieClip("loader1_mc",2);
  2. container_mc.createEmptyMovieClip("loader2_mc",1); 
I'm not sure what movieclips your script is refering to, but here's the simplest way to do it:

Create your movieclips like this:
Expand|Select|Wrap|Line Numbers
  1. container_mc.createEmptyMovieClip("slideshow", container_mc.getNextHighestDepth());
Then do a loop to get the lowest movieclip on the stage. You may want to name your movieClips sequentially to simplify this (eg. loader1, loader2).
Expand|Select|Wrap|Line Numbers
  1.  
  2. mc = this["loader" + 1];
  3. var lowest:MovieClip = mc;
  4. for(i = 1; mc != undefined; i++)
  5. {
  6.   mc = this["loader" + i];
  7.   if(mc.getDepth() < lowest.getDepth())
  8.   lowest = mc;
  9. }
  10. slideshow.swapDepths(lowest);
  11.  
If you need to keep the current order of depth for each movieclip and stick the slideshow beneath all of them, just let me know and I can modify that script to do that. At the moment, it just swaps the depth of slideshow with the lowest clip (so the lowest clip goes to the top).
Jul 18 '07 #2
kreid
2
Hi,

I am using the same slideshow as you, and I have exactly the same problem. I thought putting the slideshow code in the bottom layer would resolve it, but no.

Did you ever solve this problem?

Thanks
Jan 23 '08 #3
kreid
2
Hi,

could you explain your script to an actionscript novice? Is slideshow replacing loader_1 and loader_2? Could you modify it, as you mentioned, to use the lowest depth with the layer?

Best Regards,
kreid

I'm not sure what movieclips your script is refering to, but here's the simplest way to do it:

Create your movieclips like this:
Expand|Select|Wrap|Line Numbers
  1. container_mc.createEmptyMovieClip("slideshow", container_mc.getNextHighestDepth());
Then do a loop to get the lowest movieclip on the stage. You may want to name your movieClips sequentially to simplify this (eg. loader1, loader2).
Expand|Select|Wrap|Line Numbers
  1.  
  2. mc = this["loader" + 1];
  3. var lowest:MovieClip = mc;
  4. for(i = 1; mc != undefined; i++)
  5. {
  6.   mc = this["loader" + i];
  7.   if(mc.getDepth() < lowest.getDepth())
  8.   lowest = mc;
  9. }
  10. slideshow.swapDepths(lowest);
  11.  
If you need to keep the current order of depth for each movieclip and stick the slideshow beneath all of them, just let me know and I can modify that script to do that. At the moment, it just swaps the depth of slideshow with the lowest clip (so the lowest clip goes to the top).
Jan 23 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: torbs | last post by:
I have a problem when I use javascript to get the length and position of a movie I recieve from a rtsp stream. The length and position is extremely high and not the actual length and position of...
2
by: teenIce | last post by:
Hi all, Please help me with this problem. I'm new in flash and actionscript, sorry if my question is too easy. I have a variable name _root.test at Scene 1, and I have a movie clip name Answer,...
0
by: deluxmilkman | last post by:
I have a movie clip with a gradient mask. now I would like to have the bounding box of this movie clip reduced to the visible(masked) area, so that I can get its x and y positions. is it even...
2
by: robtyketto | last post by:
Greetings, I have workable code to allow movie clips to be dragged around. However I can't find an example of a drag n drop where the movie clip has to be placed with a certain range/xy...
1
by: manxman | last post by:
Guys and Gals, AS2 do you know if its possible to drag a movie from one clip into another clip? I know I can do it by having two same drags, one in movie A, and the other in movie B. But is...
2
by: Mickey Flores | last post by:
I have just tried to attach a background sound with on/off button to my movie clip at frame 1 of the main Timeline. Flash Movie: the movie will keep on replaying until a viewer clicks a button....
1
Fary4u
by: Fary4u | last post by:
Hi i'm trying to design the picture gallery ever thing works fine but whn i've make test movie or export the swf file it's runs fine but problme i'm using this with in movie clip & i think...
1
by: gusheneshin | last post by:
hi everyone im Using this code to Creat a Movie Clip and load a movie "SWF" into this Flash ------------ stop(); loady._x = 226.4;this.createEmptyMovieClip("loady",5);
1
by: angelicdevil | last post by:
ok wat i m trying to do it get flash to read a xml file and load the titles in xml as a button into the imagetitles movie clip made on stage in flash . so that when i click on a title it displays...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.