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
Similar Posts:
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
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
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
Jun 23, 2009
I have tried repeatedly to take the examples in setChildIndex and instead of using sprites I want to control the order of 2 buttons on the stage so that when I roll over one of the buttons it comes to the top.
Here is the code I have so far which is from the example given in the on-line documentation:
[Code]...
View 3 Replies
Jul 21, 2010
I am new to as3, and trying to create empty movie clip
var mystage = stage.getChildAt(0);
var mc:MovieClip = new MovieClip();
mystage.addChild(mc);
But, where I have to set depth and the instance name, when I trace the mc.name. It shows as "instance1". I need to set depth and to name the mc.
View 2 Replies
Jun 9, 2010
I am placing several AS3 buttons (actual buttons not event-laden MCs)on a Flash stage and want my enlarged rollover images to always come to the front of all other dormant buttons.My script-fu is weak,but piecing together the advice from several helpful posts I have generally learned how to set the childindex on a rollover event to be high enough to go to the fore.I plugged in the appropriate language in my action frame and was psyched to see that the coding worked...but only briefly.After just a few clicks (it seems that whenever a button is hit for the second time), not only did the childindex trick stop working, but the buttons (which act to send the user to labeled frames later in the time-line) stopped working altogether.It seems that the issue is definitely related to the setting of the childindex, because when I remove those event listeners/commands,the buttons all work fine for an infinite number of clicks (but the enlarged rollover images are stacked in one static sequence, blocking each other out).Is there something inherently incorrect about this approach?Something simple that I am overlooking? Some way to reset the process on each click so it does not get gummed up (I tried re-setting childindex #s to 0 on rollout or on click, but it did not help)?
I have had it suggested that rearranging the order is destroying ability to recognize mouse events...but not sure if this is correct, what it would mean.The code that I am using for each button (for setting the depth and for redirecting on click) is below,
View 3 Replies
Apr 12, 2007
i have a movie clip on the stage, and i need its depth to always be higher than everything, but other movieclips are being duplicated constantly. How do i do this?
View 2 Replies
Sep 8, 2006
How do you set a variable so that other layers can retrieve that variable.
PHP Code:
nick.onPress = function (){
set.my_txt = "nick";
gotoAndPlay(2);
trace(get.my_txt); // This does return "nick"};
// Then in another layer after the animation :trace(get.my_txt);
// this returns undefinedmaintextarea.text = get.my_txt + "'s Portfolio";
View 10 Replies
Jul 18, 2007
Is there a way where I can compile or build different frame rates into the various layers I create using an action script?? I.e. If there are say six layers running in a particular player, each layer should be running at a different frame rate, independent of each other
The problem am facing is am playing multiple media content in multiple layers (masked, so that it appears as if all the layers are playing in the same level) and each media content played in different layers needs to be played at a different frame rate to get a good visual effect!
View 4 Replies
Aug 23, 2009
I have a flash file with several layers, each composing of a single movie clip which slides in over the layer below it. The movie clips are nothing more than static images. I would like to make it so that each "slide" links to a different URL.I am new to AS3, and I am just getting back on the flash wagon with this little banner rotating project, so I'm a bit confused with why layers, and timeline positioning seem to be effecting the links.I found a few tutorials online, and can manage to make one link on the bottom layer work, but when I try to expand the code and the file to create links from different movie clips on different layers, I run into problems. when I add the action script for the other buttons, the movie will fail to play by it's self on load. I can get this to work with ode:this.gotoAndPlay(1)at the top of the ActionScript But none of the other links work.Here is what I am using for more than one link:
Code:
backpacks.addEventListener(MouseEvent.CLICK, myButtonFunction);
function myButtonFunction(event: MouseEvent) {
[code].....
View 1 Replies
Jan 11, 2010
I need to covert multple layers with multiple frames in one scene into a movie clip. I then need to dump this movie clip into another scene. I need to do this many, many times. What is the easiest, fastest way?
View 1 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
Jun 22, 2010
I am creating a Flash project that involves loading 4 external .swf files (from a library of files), via MovieClipLoader, into one frame of the root timeline, creating a finished layout. Each of these external files sits on its own layer (1 to 4). I want to be able to print ALL 4 layers from this one frame, at once, on one piece of papercan this be done?if so could someone give me example of what the script might look likeI can print just one of the layers using:
on (release) {
printnum(1,"bframe");
}
View 1 Replies
Sep 17, 2010
I'm illustrating a growing corn plant and want to start close up to the seed, then "zoom out" as the plant grows to 7'. Is there a way to link multiple layers, re-size multiple layers, or something else to achieve this result??
View 2 Replies
Aug 13, 2009
I purchased a flash home page template that had menu buttons at the top that I decided not to use. I removed the buttons, but now there is a 125 pixel blank horixontal space at the top of the stage. I tried resizing the horizontal size of the stage hoping the artwork would move up and eliminate the blank area, but the stage sizes from the bottom up. The layers get cutoff at the bottom and the blank space is still at the top.
The movie is quite complex with many layers and 450+ frames. Have attached the swf file to illustrate how the top of the stage is empty after I removed the menu buttons. Is there any way to get all of the layers to move up by 125 pixels so that they fill in the blank space without having to do each layer one at a time?
View 2 Replies
May 23, 2010
Adding frames across multiple layers...that's what I want to do. I do not want to add frames one layer at a time if I can help it as I have a good 20 layers going and I'm bound to miss one or something. Now if I am in a tween layer adding frames I know what that does...but it will add more frames of what ever is going on at that point in that layer...right? (Ex. empty space...you will be adding more empty space...next layer has a tween...you are adding more tween...right?)
View 1 Replies
Nov 9, 2009
I've created a movie, and have decided that I want to change the timing of one element in the middle of it. I have searched and searched but can't find any way to change not only the length of time this element stays on screen, but also all subsequent action, all of which is on different layers.
Surely I don't have to manually move each element on each layer individually? I've been trying to select multiple layers and move the frame I want, hoping that the frames on other layers would also move by the same amount - but no luck.
View 4 Replies
Feb 9, 2010
I'm having an issue where Flash is gets stuck displaying multiple layers of text simultaneously when the cursor is moved quickly through the circle of buttons and out of the .swf frame. When the cursor is moved at a moderate speed everything is functioning correctly. Below is the link to view the working .swf.[url]...
View 3 Replies
Oct 2, 2011
I'm making a simple drag-and-drop style dress up game, and I want to know if it's possible to combine multiple movie clips on different layers so that they can be gragged as a single object in the game, but retain their seperate layers. For example, if I make a hat and I want the front part of the hat to be on a layer above the doll base's head, and the back of the hat to be on a layer behind it, but the hat has to move as a whole when dragged.
View 2 Replies
Nov 2, 2009
Is it possible to have multiple layers in a flex mxml document?What I actualy want is a panel with a form in it, but with a movieclip as a background.
View 1 Replies
Jul 19, 2011
I'm creating some sort of flash video site. It consists of a several HD video's. The background video is 1920x1080. In front of it there is an object witch is also a video, but it it is stopped at first frame. When mouse is over this object - I play the video.
And here's the thing - when I firstly move cursor to the object - it plays like 5-6 fps. From the moment when video plays single time - it starts to go smoothly.
I use FLV files as videos and a sequence of PNG as an object on the video. FLV and PNG is 1920x1080. Flv and PNG's are loaded in the SWF file directly from library.
Here's the questions : Is there some sort of file buffering when the files are firstly displayed? Will it be better to load video from External files?
View 2 Replies
Aug 26, 2011
How can one build multiple UI layers with flex and flash? Note, i use amfphp framework for my back end.
View 1 Replies
Feb 11, 2009
I have several images that contain medium/large areas of transparency that receive mouse events. I also have images underneath them that occupy part of their transparent area. Is there to make an images mouseover not be affected by the transparent area.ex. Image1 over Image2. Image1 has a button click and mouse over events, but image2 need click events as well but is obscured by Image1's transparent area..
View 1 Replies
Jul 25, 2011
I would like to know how flash handles multiple HD video layers. We're planning a project:
- Flash document size 1920x1080
- In the background will be multiple HD videos(probably StageVideo that I will make show and play at certain events - like transition to the menu category)
- In the center of the screen will be a fancy menu object that consists of a PNG sequence's.(6 sequences)
- And a FLV HD Video in the foreground with alpha(maybe some visual effects).
The question is : Is it possible to make something like this without the users to experience lags?
View 3 Replies
Mar 23, 2009
I'm basically making a animation of someone breathing, with multiple layers. What I want to happen when a user clicks the animation is for it to switch to the next layer seamlessly (skin>muscles>skeleton). Each layer has the same 60 frames. For example, if the skin layer's currentframe was '37' i'd want the muscle layer to start at '38' when clicked.Below is some of the code I already have. I can trace the currentframe of the original mc, however the attached movieclip refuses to gotoAndPlay to that number?[code]
View 1 Replies
Jun 11, 2009
For a Majour project school assignment i am trying to create an interactive map for a hypothetical theme park, and i'll cut to the chase, i need a script that allows the player to drag the content of two or three layers around the screen upon mouse click, similar to this example:
[URL]
I will have a layer for buttons (probably called Buttons) and a layer for the map graphic (Probably called Map), similar to this tutorial:
[URL]
If anyone could produce, or has a script lying around that could do this; i would really apreciate it.This assignment has a large impact on my UAI (universities admission index).
View 9 Replies
Jan 21, 2010
I can can select the anchor points as "white" quickly, but I can't get them to be "black" without doing it layer by layer, which is tedious. What I want is way to select lines that are in different layers and get the points I selected in a way similar to the regular selection tool or free transform tool.
View 2 Replies
Oct 27, 2009
CS3 -> CS4 transition newb here who's getting increasingly frustrated with the new motion tweens; however, for this project, I'm working in a 3D space and require using them, so I'm dealing with this bit by painful bit. I found the tip about Split Motion, but first question: how do you apply Split Motion across several layers at the same time? I have six different tweens, and in CS3, I used to be able to shift-click or click-drag across frames and apply a command to all of them (for example, hit F5 to add frames), but Split Motion is requiring me to right-click on each and every layer. This is really laborious, and I worrySimilarly, I tend to add custom keyboard shortcuts to each of my Flash versions for commands I use frequently and don't want to right-click a menu for (such as "add motion tween") - however, I can't seem to find where to create a custom shortcut for either that, or Split Motion.
View 1 Replies
Jan 24, 2010
I am talking about anchor points on a line, not a keyframe. They are also called "handles". I can select the anchor points as "white" quickly, but I can't get them to be "solid"without doing it layer by layer, which is tedious. What I want is way to select lines that are in different layers and get the points I selected in a way similar to the regular selection tool or free transform tool. Here is an image of what I'm trying to do, but more easily. The lines are on separate layers, but when I select them with the subselection tool I have to go layer by layer selecting the points. I'm trying to look for a very quick way of doing it. When I do select all with the subselection tool on, the anchor points are only "white" and not "solid" as shown below.
View 8 Replies