ActionScript 1/2 :: How To Set Depth For Certain Layers

Oct 3, 2009

I'm trying to create a menu for my game, it is a tile-based game, and it draws my tile game ontop of everything. So how can I make my menu layer be above the tile game?

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Layers And Depth Of Objects?

Dec 22, 2009

im having trouble figuring out the difference between the layers on the time line and the dept of object that can be manipulated by actionscript.in a single layer there can be many objects but in actionscript at specific dept you can manipulate just one object using function such as setchildindex() .so in a movie clip where there are several objects in a single layer how can you access and change their depth as in bring them to front or put them to the bottom

View 3 Replies

Actionscript 3 :: Setting Multiple Depth Layers?

Sep 30, 2011

I get how to set depth in as3 - but with as2 i could begin multiple 'depth points' using numbers - where in as3 all i can seem to do is set this object to a higher/lower depth than that object. The problem is (when dealing with a stack of isometric boxes, which can be placed by the user on a grid in any order) i don't want to deal with the added complexity of having every element know where every other element is, then adjust appropriately.

What I'm trying to do is set up 6 total depth numbers/positions, one for each column in a 6 x 6 grid. So anything in column 1 will begin it's depth placement at say 500, anything in column 2 will begin its depth at 1000, column 3 would be 1500 and so on.

That way, the second i place an object on a particular column, it would tuck itself under, or place itself above all surrounding items in other columns, this to me is much much easier than somehow figuring out where 15 different sized boxes are, how they relate to one another, then figure out what depth order they need to go in. as3 seems to have removed the ability to set a depth to a specific number.

View 1 Replies

Flash :: Moving Layers In X & Y Direction With Depth By Mouse

Aug 30, 2011

Could you take a look at this site , it's official web site of Coraline animated movie , is there any related article or tutorial to do such navigation technique [URL] If not i will try to explain , layers of movieclips are ordered in z direction when you move your mouse in x & y they move based on depth like semi 3d side walk games

View 1 Replies

ActionScript 2.0 :: Action Scripted Layers Always Act As Top Layers?

Sep 10, 2005

the snow effect always acts like the top layer, ok what i mean is, i have 3 layers, (1)toplayer= a car, (2)middle= snow, (3)low= background.I want to make the snow to be seen behind the car...i hope you understand what i mean , whenever i put the code from the link above it acts as the top layer and appears in front of everything.

View 4 Replies

ActionScript 2.0 :: Putting A Movieclip Into Highest Depth Without Knowing Which Clip Is In The Highest Depth

May 11, 2004

putting a movieclip into highest depth without knowing which clip is in the highest depth

View 2 Replies

ActionScript 3.0 :: Possible To Add Layers / Re-order Layers / Move Movieclips From Layer To Layer

Oct 22, 2008

Is it possible to add layers, re-order layers, move movieclips from layer to layer or specify which layer a duplicate movieclip appears on at runtime with AS3?I am aware of the depth properties and the functions associated with that but it would be easier to have a concept of a layer because I am dealing with masks.I have a nasty feeling I'm gonna be told that layers don't really exist within an swf and that depths and setmask are all there is to work with.

View 4 Replies

Swap The Depth Of MC's?

Oct 3, 2009

i'm workin with some "self created windows" in my flash app. how can i put the window i click on front of the others? I found smth about swapDepth, but there is no swapDepth in as3.

View 3 Replies

ActionScript 2.0 :: Set Depth On A Hittest?

Feb 25, 2009

i have this drag and drop thing basically when i drop the item on top of its slot i want it to do a hittest to set the depth to a number assigned to it. so lets say I drag an item called Item to a spot called slot i want it to do like item on hit test to slot set depth(2) lets say.

View 1 Replies

ActionScript 3.0 :: Swap Depth Only Once?

Jan 14, 2010

[code]When I publish it keeps swapping over and over.How can I get it to call only once?

View 2 Replies

ActionScript 2.0 :: Check If Depth Is Being Used?

Jul 29, 2010

Is there any way to see if a depth is already being used by a movieclip before assigning it to another movieclip? I have a game where there are hundreds of movieclips moving around on screen at the same time and changing depths every time they move. But at rare times, one movieclip will spawn at the exact spot another movieclip is in and use that depth, making the old movieclip invisible (but still active and moving around).

View 2 Replies

Changing The Depth Of A Folder?

Nov 13, 2009

I have a movie clip that has about 20 layers that make up four different groups. (Five of the layers work together)Any one of the four groups has to come to the front of the others at any time.Is there an easiesh way to swap depths of these groups?EG. Can you swap a folders depth for example?

View 1 Replies

ActionScript 3.0 :: Way To Set Movieclip's Depth

Aug 11, 2011

I m looking for method similat to MovieClip.swapDepths(depth).what is the method in as3, i have movieclips i wanne update those deths

View 4 Replies

AS3 :: Flash - Getting Child By Name And Then By Depth?

Nov 12, 2009

I have 3 sprites: img1spr, img2spr, and img3spr. Inside every sprite I have some bitmaps.Every sprite has a name:

img1spr.name=name1;
img2spr.name=name2;
img3spr.name=name3;

[code].......

View 1 Replies

ActionScript 2.0 :: Movieclips On Same Depth?

Jan 4, 2010

I'm running a loop that's creating a multiple movieclips. Each clip can be dragged to drop point on the screen. What i'm trying to accomplish is when you select an item to drag it should take the highest depth, and should appear over all other draggable items. Right now the first clip is always under all of them while the last is getting the highest.

View 1 Replies

ActionScript 3.0 :: How To Put MC On Top (swap Depth)

Feb 5, 2010

This should be really easy to do, but i cant find anything from searching. It's all tuturials for buttons and stuff. All i want to do, is put a MC called "face" on top of everything. What exactly would be the AS3 for this, and where would i put it?

View 4 Replies

ActionScript 3.0 :: Looping Through Not-known Depth XML?

Dec 11, 2010

show me a good algorithm which loops through an entire XML without knowing from the start the number of children and sub-children?I studied something in university but at the time I didn't get the explanation well and now I totally forgot.

View 0 Replies

ActionScript 3.0 :: Replace Mc In Same Depth?

Mar 17, 2011

Is there any code like replacemc? Instead of removeChild() and then placing the new one at the addChildAt(same depth).

View 1 Replies

Actionscript 3.0 :: LoadChild On A Different Depth?

Apr 6, 2010

i have a slide out panel, which is a clip, with animated buttons,(they are cheat buttons so they have time lines or clips for each of the button states) these load pages or clips to the main stage, the problem is i want these swfs to load under the slide out panel, here is a little of my code,i know its a little crude but the way i have made the panel and buttons i found it easier this way.clip is laid out like "stage.page_loader.navi_pane.navi_pane_animations.buttons",the navi_pane loads clips to stage,the stage has about 15 layers with various animations,the navi pane has rollover states so clips have to be loaded to the stage so as not to take on button properties
any help would be most greatfull.

navi_pane.addEventListener(MouseEvent.ROLL_OVER, npRollover);
navi_pane.addEventListener(MouseEvent.ROLL_OUT, npRollout);
navi_pane.b1.addEventListener(MouseEvent.CLICK,pageb1);

[code]....

View 1 Replies

ActionScript 2.0 :: Changing MC Depth?

Jul 5, 2005

Here is my issue. I have 6 MCs that are the same size and are on the same position on the stage. I am using AC variables to activate each one of them, here is an example of my script for the button:

Code:
on (release) {
if (number(test) == 2) {

[code].....

View 3 Replies

ActionScript 2.0 :: Set Depth For A Movieclip

Nov 13, 2005

How can I set the depth for a movieclip.Actually I want my popup to always come on the top and there is some problem using swapdepth.Would it help setting the depth of movieclip to be something like 10000??

View 1 Replies

ActionScript 2.0 :: Z-depth On Already Distorted Mc?

Mar 8, 2006

I've got an isometric view of a flat surface. On this surface there are various characters running around and I obviously need to control the depths of each object.

My flat surface needs to be used in two views: top-bottom + isometric.

The original mc is generated in the flat top-bottom mode. For the isometric view, that same mc gets distorted: this way the whole XY coordinates system gets distorted too.

Have a look at this (updated).

So i'd need to create this extra coordinate (is it the classic Z-depth?), and manage to gather information about it...

Does anyone know what the formula would be to calculate the depths of each character (red lines)?

View 2 Replies

ActionScript 3.0 :: Flash Depth Vs IDE?

Aug 26, 2011

Whenever I create a MovieClip in the IDE and draw on it with the IDE then use ActionScript to add more to it (add a Sprite, draw graphics etc..) the thing I added is always behind the graphics of the MovieClip that was drawn in the IDE. How do I bring the Sprite/Graphics that I draw/add to the MovieClip in front of the graphics that were drawn with the IDE?I have tried doing this:


Code:
var myMC:mcDemo = new mcDemo(); //mcDemo being a MovieClip created in the IDE.
var sp:Sprite = new Sprite();[code]...

The final product of this is the myMC movieclip on the screen with my sprite behind whatever I drew in the IDE for myMC. How do I make it so the sprite is in front of everything? I have tried setting it to numChildren-1 which should set it in front of all objects.

View 1 Replies

ActionScript 2.0 :: Arangement Of Mc In Z Depth?

Jan 8, 2004

I have a slide show of images for my banner that is loaded through the use of a component in my library. The component merely swaps images with a fade out/in as a transition. Now, that is working fine, the thing that i am having a problem with is that i can not place an graphic/text on top of the component. I what the banner to be in the background. What do I have to add to the component to insure that it will always load in the back, not infront of the text, graphic, etc..

View 1 Replies

Dynamically Set Movie Clip Depth?

Jul 25, 2006

I am making a 3d engine using formulas from a different language and its coming along nicely but I am having depth issues. How do I set the depth of an object within the script? I need the depth to change so I objects that are farther in the distance are further behind other objects.

View 4 Replies

ActionScript 3.0 :: SetChildIndex Simple Depth?

Dec 12, 2006

I am creating multiple sprites on the stage using structured classes as shown below, I would like every time I click on one of these sprites to make it go on top of all previously created sprites. I would also like to know if this can be implemented from within the last class "class c" onMouseDown function.

[Code]...

View 6 Replies

AS2 :: CS3: Send Back To Previous Depth?

Dec 9, 2008

I've got a bunch of movieclips lying on top of each other like a stack. When you click one, it slides out, and comes forward. When clciked again it goes back and slides back into the stack.inside the movieclips iv'e placed:

Code:
this.swapDepths(1);

along the timeline at a spcific frame.I need to make it get the same depth value as it had before I clicked it when it goes back. Basicly:

Code:

this.swapDepths(same-as-before-the-swap-to-depth-1);

I guess I need som kind og listener to logg the changes made...

View 1 Replies

Movie Clip Depth Always Highest?

May 2, 2010

I'm creating this shooter game. I attached a crosshair mc at the beginning with the depth set to getNextHighestDepth.However I keep adding the monsters mc dynamically when the game progresses, also with getNextHighestDepth. So the monster mc will keep overriding the depth of my crosshair's depth. how to get my crosshair mc's depth always to be on top of everything including the monster mc.I tried getNextHighestDepth()+1000 for my crosshair mc. But it was dumb because the monsters keep getting getNextHighestDepth as well. I assume that monster's depth would be 1001, 1002 and so on...

View 3 Replies

ActionScript 3.0 :: Change The Depth Of An Object?

Nov 9, 2010

I have been trying to change the depth of an object. I have only just started learning AS3, so I haven't looked into this yet.So far I have been using a trial-&-error method to try to get this piece of code to work which I found on a site, but I have not succeeded:

Code:

setChildIndex(example,numChildren-1);

I am putting this code in it's class, and I tried replacing the word example with 'this'. Can someone please help me? When I test the swf it comes up with this in output:

Code:

ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/setChildIndex()
at Foreground/enterFrame()

View 10 Replies

AS2 - Giving A Movieclip A Specific Depth

Feb 15, 2011

I want to give a movieclip a specific depth number, but i cant found a method for this.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved