ActionScript 2.0 :: Tracing Current Level & SwapDepths?
Jan 25, 2003
I have a main swf that loads 6 movies. And I know how to stack movies in levels and how to target different levels from wherever the user may be. But the trouble is the level/movie on top has to visually overlap the level/movie underneath. And this has to happen dynamically because, say my main movie points to A, B, C, D, E, and F. If I go to B from F, I need to see part of F until I see B. So if I tell Main to open ABCDEF on 1 that works fine. But I can't simply tell A to open B on level 2 because ABCDEF needs to stack on top of the former ABCDEF. Does that make sense? I've been living this for five days and it hardly makes sense to me.
Take my word for it, ABCDE & F need to overlap in a way where I can't just set their levels as one higher than the next.
[Code]...
View 4 Replies
Similar Posts:
Sep 16, 2004
Is there a way to link to one level below the current level? Instead of saying _root.level1.level2.level3, something like: ../level3 ?
View 4 Replies
Nov 30, 2007
I am trying to create a dynamically generated MC with creatEmptyMovieClip(), and all works well. But looking the list of objects/variables in the show I can't seem to detect at what _level the clip is generated. I am using getNextHighestDepth() to set the level (see code below).
Ultimately what I am hoping to happen is that each successive MC will be generate OVER (or on the _level above) the existing MC. Currently it looks like the existing MC is replaced when the new MC is generated.
My next question would be (once I get this lot working) how do I then remove the MC that is under the newly generated MC. I imagine the RAM or processor wont mind if a few _levels of MCs are stacked up and this wont be running up more than about 20 _levels max. But for the purpose of best practice.
Code:
howImg_mc.createEmptyMovieClip("container_mc", this.getNextHighestDepth());
howImg_mc.container_mc.attachMovie(newImg, "howImg", this.getNextHighestDepth());
View 1 Replies
Apr 9, 2009
Is there any way of getting the current active index position from an array? As an example, something like this:
j=0;
current = myArray[index];
my_btn.onPress = function(){
[code].....
View 3 Replies
Mar 26, 2007
is there a way of checking what level a clip is on currently?
for example, in theory
if(_level.current==1){
blah blah;
}
View 8 Replies
Nov 6, 2010
I need to trace the current level number that I am working on. So say I have 3 swf's loaded onto different levels (_level0, _level1, _level2, _level3), and each has a button, so when I press the button in level1, the number will trace 1, press button in level2, number will be 2, etc.
View 1 Replies
Aug 31, 2008
i was just wondering if anyone can point me to a right direction or help me out. I have this game with "balls" coming from down and going towards up and i was just wondering how can i make more and more of them come depending on the current level.
I guess all of them are going to be copies of the same "mc" but can anyone me copying them.
View 1 Replies
Apr 22, 2011
im trying to create a level select screen so the buttons unlock as you complete a level, so far i have this on each button:
on(release){
if(this.number <= currentItem){
gotoAndPlay(3);
}
}
[Code]...
View 0 Replies
Aug 26, 2010
I have two layers in my FLA both with empty movie clips as follows:In mc_Empty1, I attach a faded background movieclip as I wait for mc_Empty2 to load a SWF. Once the SWF is loaded into mc_Empty2, I want to remove the faded background movieclip from mc_Empty1. When I load the SWF from the main timeline, the onLoad() function works and removes the faded background from mc_Empty1. However, when I load the SWF from mc_target, the SWF loads, but the onLoad() function does not. Here's my AS2 code:
//Loading SWF from main timeline
mc_Empty1.attachMovie("mcFadedBg", "mc_FadedBg", 1);
mc_Empty2.loadMovie("My.swf");mc_Empty2.onLoad = function():Void{ trace("loaded"); //This works removeMovieClip(mc_Empty1.mc_FadedBg); //This works}
[code]....
I know I'm targeting properly because the SWF loads as it should, but the onLoad() function does not.
View 3 Replies
Oct 2, 2010
This is making me a little kooky today. I thought I could defined a library path in PREFERENCES > ACTIONSCRIPT > ACTIONSCRIPT 3.0 SETTINGS then that library would be available to all AS3 FLA files, but that doesn't seem to work for me. If I use the PUBLISH SETTINGS and define the library path everything is fine.
Is there something that I could have done to disable the application level class path functionality? I guess I'm trying avoid having to set the library path for every new FLA I'm making.
View 1 Replies
Dec 26, 2011
I'm doing a bigger aplication in flash (as2).Image, there is a main "home" flash with several menu buttons.Clicking these buttons, I load external swf into an empty container in this "home" flash.[code]clicking buttons in this second level, will load external movies into an empty container in this SECOND LEVEL swf.This works fine, but now, coming to the THIRD LEVEL (don't think there will be more in the future) problems come up, some scripts won't work.Now (I'm a as2-beginner) I think, loading external swf ALLWAYS into containers in the first "Home" flash should solve the problem.But I don't know, how to load an swf from the third level into a container in the first "home" level.In the "home" level, I have a "close" button, that will unload the container content.I need to go to a certain scene "content_2" in the home swf, too.
View 7 Replies
May 9, 2004
i have game im doing, and i want it to jump to level 2 upon completing the first level, but the problem is, the level 2 is a seperate swf, i've tried to use
Code:
on (release) {
loadMovie("level2.swf",2)
}
View 3 Replies
Dec 2, 2009
I have called main.swf into a container in index.swf.
myMCL.loadClip("main.swf","container"); is an action on my Index.fla timeline.
I have my navigation on index. (i wanted it to go on main, but the nature of the animation meant it had to go on index)
I need to call "home.swf" into "main.swf" from the navigation button in Index.swf.
When I had the navigation on "main.swf" this was my code to call "home.swf" into the page.
on (release) {
Preloader_mc.gotoAndStop("home");
}
("home") is the label name where the preloader is for home.swf
how to call the preloader for home into main.swf from "INDEX.SWF INSTEAD OF MAIN.SWF"
View 5 Replies
Feb 2, 2010
I have a file1.swf which loads file2.swf into it. Within file2.swf i have a button that when clicked needs to remove file2.swf and load file3.swf into its place.
View 2 Replies
Mar 16, 2011
how to use swapDepths(). I know the alternative way is swapChildren(), swapChildrenAt();I need to know, how to use swapDepths();
View 2 Replies
Apr 2, 2004
I wanted to swap the depths of two movieclips one located in _level0 the other located in _level2! I can get it to work when the MC's are on the same level but not when thier in different levels.
This is the code I've tried...
Code:
_level2.buttons.swapDepths(_level0.caption);
View 1 Replies
Jan 14, 2009
Situation:
- We have a Flash application located on a SAP EP (let's say ep.x.com)
- We have a SAP ABAP Application (Webservices) on a SAP WebAS
server (abap.x.com)
- Clarification: This is not about Flash islands / but a normal Flash application communicating with WebAS ABAP via WebServices
Problem: Due to the changed security policy in Flash 10 this scenario does no longer work.
- A crossdomain policy file on root level cannot be deployed on root level
- The WebServices http/s headers cannot be modified, since the WebServices are generated by the WebAS IDE.
Comment: Technically there is a way to patch a WebAS ABAP,but this is not a practical / acceptable way in a normal SAP WebAS infrastructure.
Conclusion:- The above scenario (Flash from EP content / WebAS ABAP as backend) is a quite normal scenario in the SAP world.
- SAP / Adobe always features the close relationship between their technologies.
Question:- What could we do?
- How does the Visual Composer works around that problem?
View 1 Replies
Feb 19, 2010
I did the 3d carousel tutorial from gotoandlearn.com and I manage to create a background color that will load once you click an image with a movie clip called dim . However this movieclip dim keeps appearing atop my icons. I tried Swapdepths to change the orders but its not working.
[Code]...
View 17 Replies
Jan 19, 2009
If anyone can get these mc's to swapdepths when clicked!
View 2 Replies
Feb 20, 2010
I did the 3d carousel tutorial from gotoandlearn site and I manage to create a background color that will load once you click an image with a movie clip called dim. However this movieclip dim keeps appearing atop my icons. I tried Swapdepths to change the orders but its not working. On function released. I want the var dim to be behind the var t:Movieclip =home. in the preview the movie clip dim with the alpha of 80 appears on top the var t that has the carousel images.
Code:
import mx.utils.Delegate;
import mx.transitions.Tween;
import mx.transitions.easing.*;
var numOfItems:Number;
var radiusX:Number = 300;
var radiusY:Number = 75;
[Code] .....
View 0 Replies
Jan 6, 2006
I have 2 images that I want to swap places on a certain frame in my animation. I've been messing with it for quite sometime now and I can accomplish one of two things. Either the animation goes smoothly and the images don't swap depths or the images swap depths and the animation hangs.
View 6 Replies
Nov 14, 2007
I have a banner I'm working on and it has 28 icons that are button symbols. Each one when you mouse over, has a label animate out of it. All of these icons are in very close proximity and when you mouse over, the label usually goes behind the other icons.Now usually, with movieclips I attach this:
Code:
MC.onRollOver = function (){
_root.x += 2;
[code].....
View 2 Replies
Jun 16, 2009
I'm filling my stage with a tile overlay (transparent .png). I want it to overlap an Embedded Video that's also on the stage. How can I get the tile overlay to be on top of the video instead of underneath?
[URL]
View 1 Replies
Nov 5, 2004
I have a movie that's 500x400 px in level 0 and has lots of thumbnails with pictures that I want to open. the thumbnails open a 500x400 px movie above the other but on level 1. the problem is that when the new movie loads on level 1, the thumbnails on level 0 (that are now hidden by the new movie) are still active, and if i click anywere in the movie on level 1, it trigger an action from level 0. Is it possible to load a movie to level 1 that deactivates the movie in level 0 without unloading it?
View 1 Replies
Dec 2, 2010
I'm currently working on a project (AS2 in CS5) that contains a lot of small dots that are set up as buttons with rollovers. This has been problematic since the rollovers will sometimes appear behind some of the other buttons.
I did a forum search and found information about the swapdepths function that can be applied to buttons by using the following code:
[Code]...
This code solved the overlap problem, however... now when i roll out of the button, the "roll over" state remains visible (instead of returning to its original state)
View 4 Replies
Oct 7, 2004
The problem i have is that i want to use the ui window component (in order to keep file size down, and it just works well) but i want to use multiple windows on the stage. It was simple to get them to open with PopUpManager.createPopUp and to intialise the close button with deletePopUp(). Now heres the big but i can't get a swapdepths function to work.I have added in an event listener for the close button and the swapdepths but only one fuction will work at a time, ie i can get the swap depth to work but you can't drag the windows or close them, or you can drag and close one window but the other will not do anything until the top one is closed.i know that it's a swapdepth problem but i can't work out where to put the swapdepth in the code to make all fuctions work at once.The code is below
var myq1:MovieClip = PopUpManager.createPopUp(_root, Window, true, {closeButton:true, title:"Question 1", contentPath:'q1'});
myq1.setSize(600,450);
[code].....
View 1 Replies
Aug 6, 2002
My movie has several scenes. In one of them I have to swapdepths of some mc's. The weird thing is that when I go on to the next scene, the mc's that were on top of the stackingorder are showing up on top of the next scene. I've tried about everything I could think of, but the mc's keep popping up on the other scene's.
View 1 Replies
Jun 2, 2005
I am having a problem and hope someone can help. I've created two mc's. One called "mcSkinned" and the other called "mcSkeleton". Each of these mc's has an mc inside of it that acts as the tab (so when the tab is clicked, the focus changes for either mcSkinned or mcSkeleton). The names of the tab mc's are:
mcSkeletonTabBackground
mcSkinnedTabBackground
So this means that mcSkeleton has mcSkeletonTabBackground in it and mcSkinned has mcSkinnedTabBackground in it.I've placed each main mc (mcSkinned and mcSkeleton) on the main scene and added the following code to an "Actions" layer on the timeline:
mcSkeleton.mcSkeletonTabBackground.onPress = function():Void {
mcSkeleton.swapDepths(this.mcSkinned);
};
mcSkinned.mcSkinnedTabBackground.onPress = function():Void {
mcSkinned.swapDepths(this.mcSkeleton);
};
Now, I know that I've done something wrong. Because if it worked, I would not be on here begging for help. Can anyone please let me know how I am screwing this up? have two tabs change depths when clicked on their tabs. I do not want these mc's to be draggable on to change z-depths.
View 6 Replies
May 13, 2004
I have a function to fade in and out four movie clips. This is the code:
Code:
function fadeSub(l) {
for (k=0; k<but.length; k++) {[code]....
I have buttons inside the sub_mc's that aren't working because of the depths. How doI integrate a swapDepth in the fadeSub function?
View 6 Replies
Oct 7, 2004
i have been trying to work this out for some time and i can't find any info about this on the web.The problem i have is that i want to use the ui window component (in order to keep file size down, and it just works well) but i want to use multiple windows on the stage. It was simple to get them to open with PopUpManager.createPopUp and to intialise the close button with deletePopUp(). Now heres the big but i can't get a swapdepths function to work.I have added in an event listener for the close button and the swapdepths but only one fuction will work at a time, ie i can get the swap depth to work but you can't drag the windows or close them, or you can drag and close one window but the other will not do anything until the top one is closed.i know that it's a swapdepth problem but i can't work out where to put the swapdepth in the code to make all fuctions work at once.[code]
View 1 Replies