ActionScript 2.0 :: Change The Depth Of MCs That Are Already Positioned On The Stage
Nov 16, 2004
I am trying to change the depth of MCs that are already positioned on the stage. However, there doesn't seem to be a property such as _depth. So can I even change the depth of an MC during the game and if so how would I do it?
View 3 Replies
Similar Posts:
Nov 16, 2004
I am trying to change the depth of MCs that are already positioned on the stage. However, there doesn't seem to be a property such as _depth. So can I even change the depth of an MC during the game and if so how would I do it?
View 3 Replies
May 25, 2009
I've got a looping slideshow. I'd like to place a sliding menu at the bottom of the screen. The problem is I've created the slideshow dynamically, and the images being loaded all inherit a depth greater than 0.
how I can place the sliding menu at the very top of the presentation when it's already on the stage?
View 3 Replies
Jan 30, 2010
have my images positioned randomly on the stage.
View 1 Replies
Dec 26, 2005
I was wondering how "relative alignment" such as on the easybit-site (take the window and resize it) is done? All objects on the stage are positioned always relative to the actual window-size without losing quality, but how???
View 2 Replies
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
Jul 13, 2011
Im trying to change the depth or index of a movieclip when its click. And bring it to the top of everything. The problem is that the movie clip is not added by addChild, but nested in a frame.
so if i try and use any of these:
anyMC.parent.setChildIndex(anyMC, anyMC.parent.numChildren-1);
or public function bringMCToFront($mc:MovieClip){ $mc.parent.setChildIndex($mc, $mc.parent.numChildren-1);}
by it gives me this error: Error #1065: Variable setChildIndex is not defined.
View 6 Replies
Mar 14, 2012
i want when user rollover on any movieclip it comes on top after rollout it goes it's original position but, this code is showing error.ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
private function pan3D():void{
excelmc=thumbswork.excel
officemc=thumbswork.office
googlemc=thumbswork.google
[code]....
View 1 Replies
Jun 9, 2010
I'm adding a bg to the same canvas, but it's overlapping everything added before it.
View 2 Replies
Apr 20, 2010
the question is a bit more involed. I have a dynamic text box, which I've put inside a movieclip. I hae a number of movieclips that I bring in using attachMovie, but my movieclip which contains my text box is underneath all the other movieclips.
I would like to know how I can tell my movie to display above all the other?
View 2 Replies
Oct 6, 2009
right now I have some balls being generated like addChildAt(ball, 0);However what if I wanted to change the order of one specific ball?So make one ball 2 and add a alpha layer inbetween so the other balls cant be clicked.
View 14 Replies
Feb 8, 2011
If i wanted to change the depth of a movieclip using AS3
View 2 Replies
Apr 22, 2011
Obasically I have the codes I need to make my project work but the problem is when I put my drag and drop code with my swap depth on hittest code my drag code stops working heeres the codes:
code for swap depth on a hit test:
Actionscript Code:
newDepth = 2;Object.swapDepths(newDepth);
Code for drag and drop:
Actionscript Code:
object.onPress = function(){object.startDrag();}object.onRelease = function(){object.stopDrag();}
View 4 Replies
Aug 22, 2009
I've got a spiral
-----------------
function spiral(centerX, centerY, radius, sides, coils, rotation){ with(this){ moveTo(centerX, centerY); var awayStep = radius/sides; var aroundStep = coils/sides;// 0 to 1 based. var aroundRadians = aroundStep * 2 * Math.PI; rotation *= 2 * Math.PI; for(var i=1; i<=sides; i++){ var away = i * awayStep; var around = i *
[code]....
and I want some movie clips to appear infront as well as behind it, but right now it always appears on the bottom layer. Is there a way to attach the drawing to a movie clip or something so I can change it's depth?
View 4 Replies
Apr 15, 2009
I have a cube with depth = 0 that acts as a double sided plane.[code]...
We can't use depth as a property of the cube, so how can I change the depth of the cube?
View 1 Replies
Mar 7, 2005
How can I do so the textfield will be OVER the movieclip I just created with: createEmptyMovieClip("Line",1);
View 2 Replies
Nov 13, 2006
this is a simple one. on Frame XX i want to have symbols on layers 1,2,3 (for sake of argument) at differnt depths. thats the tag to change the depth of multiple symbols?
View 7 Replies
Sep 3, 2007
I know when you assign an empty movieclip or a movieclip to the stage via actionscirpt you have to set a z depth on the layer.
Is it possible to change the depth of the movie clip? If so how?
View 1 Replies
Mar 10, 2009
Is there a way to change the depth (index number) of a movieClip when I click on it to drag. Example:Say I have three circles. Each circle has a MOUSE_UP and MOUSE_DOWN eventListener. When one is clicked It will bring it to the front so when I drag it will be above the two other circles.
View 7 Replies
Mar 25, 2010
I have a stack of 3 Mcs, 1, 2 and 3, one over the other, at the same layer.
I want to make an action, that makes the top level MCs, when clicked, to go under the other 2 MCs, and so on.
Is it possible? I tried to make it, but discovered that it's not possible to define negative depth for a MC.
View 3 Replies
Jan 27, 2011
Im having a dynamic textfield in on the main timeline which loads an external text file. Im also using addChild on the main timeline to display a mc. The problem is that the textfield is always behind the mc!! how can i change the depth of the textfield?
View 2 Replies
Feb 23, 2011
I have about 85 movie clips on stage and they all have startDrag with MOUSE_DOWN.here is the thing I need the active one to come forward to the top of all others.I tried using:
setChildIndex(e.currentTarget, 85)
on the mouse over function but its not working its giving me an error 1118: Implicit coercion of a value with static type Object to a possibly unrelated type flash.displayisplayObject.
View 2 Replies
Mar 24, 2010
Here is the problem I have: after I change the index of one movieclip using this code
oldIndex=getChildIndex(DisplayObject(e.target));
setChildIndex(DisplayObject(e.target), numChildren - 1);
when I give the object its old index
setChildIndex(DisplayObject(e.target), oldIndex);
and go to another frame of the movie, this element I have changed the index of stays on top of all elements on the new frame. My question is am I doing something wrong and if not, what can I do so that this element stays only in the frame it is placed.
View 1 Replies
Sep 14, 2010
I'm trying to sort MCs on stage that belong to different instances of different objects.
[Code]...
is there a simple way to use the Depth Management methods to control their sorting order? Right now, all I know how to do is place objectTypeB either in front of or behind all members of objectTypeA.
View 3 Replies
Jun 26, 2007
I'm looking to create a rotating set of images, simulated to look 3D... that can rotate either left or right, reactive to someones mouse location.
The path of the images would look like a flat oval, and as the images came to the forefront, they would be at full scale, have the lowest position (high _y), have the highest depth (appear in front of everything else) and be dead center _x.
As they slide left or right, they would reduce everything by a relative 50% to the final shift (scale, _y, and depth) until they got to the end, moving in an upward arc following the oval path. When they got to the end, and kept rotating beyond (move in the opposite _x. but appear to follow the flow of the arc), continuing to decrease in scale, _y, and depth.
View 1 Replies
Jun 26, 2011
why changing the index or depth of the movieClip breaks the the timeline animation of this movieClip !!
View 7 Replies
May 11, 2004
putting a movieclip into highest depth without knowing which clip is in the highest depth
View 2 Replies
Jan 15, 2010
I'm using a used code of a slideshow. I figured everything except how to place the slideshow in the center of the div popup tag. This is the actionscript 2.I managed to move the pictures in the center where it says:[code]
View 1 Replies
Jan 27, 2011
First of all - I'm new to Flash.. I'm trying to load an external image as a background and the url is loaded with flashvars
[Code]...
When the swf is compiled the image is not posisioned at 0,0 and it has been scaled down.. it has not the original dimensions
View 1 Replies
Jul 15, 2009
I have an as class file that places some sprites at various positions around the stage, what I would like to then do is add event listeners to these sprites and do something starting from the x/y of that sprite (not the mouse x/y).
I'm populating an array with the created sprites and later looping through and assigning the event handler to the sprites but I can't seem to get any thing of any use out of them.
I'm calling the following function in a loop, each time I'm adding the returned point to an array (pointsArray) and then calling addChild.[code]...
View 5 Replies