Problem With Depths - DuplicateMovieClip And LoadVars
Hi.
I'm making something to duplicate a movieclip, and make adjustments to each duplication (setting y, x, scale, etc) based on data from a text file loaded in with LoadVars. Everything works fine, except it's not setting the depth correctly.
Heres the code (the fla and txt files are also attached)
Code: var my_lv:LoadVars = new LoadVars(); my_lv.onLoad = function(success:Boolean) { if (success) { for (n=1;n<=this.cnt;n++){ duplicateMovieClip(_root.item, "item"+n, eval("this.d"+n)); eval("_root.item"+n)._y=n*10+50;
trace(eval("this.d"+n));// These two traces should be the same trace(eval("_root.item"+n).getDepth());// but they're not
} } }; my_lv.load("contents.txt"); The txt file lists the depth as d1=1&d2=2&d3=3&d4=4&d5=5&d6=6&cnt=6
So when the code traces the depth of each duplicated item, it should print out: 1 2 3 4 5 6
Instead it prints out: 147457 147458 147459 147460 147461 147462
If I manually set the depth to 1 - 6, it works, but when I go from the text file, it doesn't. It doesnt seem to even be using the data from the txt file, I set the contents.txt to: d1=10&d2=20&d3=30&d4=40&d5=50&d6=60&cnt=6 (10,20,30... instead of 1,2,3...) and it still set the depths to 147457, 147458, etc.
Any ideas?
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 09-06-2008, 02:00 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
DuplicateMovieClip - Depths?
Hi to evirybody! I'm from Italy, my name is Davide.
I'm creating a flash game, when the "hero" sprite collide with an enemy and kills it I want to have a permanent blood stain. I did this in this fashion:
Code:
_root.blood.duplicateMovieClip("bloodx"+count_b, count_b);
_root["bloodx"+count_b]._x = _x;
_root["bloodx"+count_b]._y = _y;
count_b += 1;
Now since every movieclip is instanced on the various level directly (not via actionscript but by "phisically" placing it on the stage). The blood stains stay always on top of every layer. I tried:
Code:
_root["bloodx"+count_b].swapDepths = (-1000);
and
Code:
_root.blood.duplicateMovieClip("bloodx"+count_b, -count_b);
but nothing changes.. am I doing it wrong or simpl actionscript puts every MovieClip instanced via code on top of everything?
Thanks!
DuplicateMovieClip And Depths Question
I'm trying to create a dynamically generated tiled background for a flash game I'm working on, and I have it working perfectly, except that the only way I can get it to work is using _root.getNextHighestDepth(); which puts my background on top of everything I created on the actual flash stage. I tried (with no success) setting the depth to negative numbers, but the movie clips did not show up, all I saw was the black stage background. Is there a way around this?
I'm relatively new to flash and actionscript, and I don't entirely understand how the depth system works
Thanks,
Flam.
DuplicateMovieClip Depths Conflicting
Didnt pay much attention to depths until recently when diffrent mcs began to dissappear. I have several duplicateMovieClip commands, and usually set the depth to i the counter. However this causes problems
Is there a reccomended way of assigning depths to movieclips, I changed it to i + 10 and i + 50 as a temporary fix but can see conflicting occouring.
e.g
Code:
month_mc.duplicateMovieClip("month_mc"+i,i+10);
Any help or idea appreciated
thx
DuplicateMovieClip Depths Problems
Hi Kirupa forums, this is my first time writing here, but I knew where to go since this is place has been extremly helpful to me in the past.
Alright so... I started on making a top-down shooter, and found some tutorials on how to achieve a good aim and shoot actionscript, which duplicates the shot everytime you shoot it.
Well anyways, I tried using the code again for the blood splatter, (My coding is crude and I'm just a novice really, although I can easily understand the code) it works, yet the blood always stays on the top of everything, when I want it below the enemies and the character in play and above the background texture.
The code is all inside the shot symbol called simply "shot", on the first and only frame, and the code for where the blood to be placed is in the blood symbol, called "blood1"
Oh and please don't mind the "graphics" if you can call it so It is simple something I created fast to try the coding.
Oh yea, before I forget, I edit this to tell its Flash 8
You can find my Flash File here. Thank you in advance for your help.
http://www.turboupload.com/download/rtTc6bJYN55J/Send.fla
LoadVars, DuplicateMovieClip And Buttons
Here´s what I´m trying to do
I have a php script fetching my data from MySQL, but to simplify the job I´m using a .txt file with exactly data I need.
I want to get the data, duplicate a MC with a button inside, thats ok so far. It´s duplicating, but I need to create a button.onRelease of these duplicated MCs and it´s not working :(
The data.txt file (From 0 to 10 entries)
&total=10
&id0=825&titulo0=News one&id1=824&titulo1=News Two ....
My Flash file:
Attach Code
var total:Number;
var dados:LoadVars = new LoadVars();
dados.load("dados.txt");
mcbt = this; // caminho dos botoes
dados.onLoad = function(success){
if(success){
var lpath = this
for(i=0; i<this["total"]; i++){
var id = this["id"+i]
titulos = this["titulo"+i];
bt._visible = false;
duplicateMovieClip(_level0.bt, "bt" + i, i*10);
mcbt["bt"+i].newstxt.autoSize = "right";
mcbt["bt"+i]._y = (i*22)+100;
mcbt["bt"+i].newstxt = this["titulo"+i];
btvl = mcbt["bt"+i].btn = id
mcbt["bt"+i].onRelease = function(){
trace(the ID values of txt file)
}
//trace(titulos)
}
}
}
LoadVars & DuplicateMovieClip, Dynamic Text Not Getting Thru
Hi Guys
I've got this problem:
I'm loading variables from a text file(actually it will be loaded from an ASP file, but I've figured that bit out already)
this is working fine
then I want to duplicate a movie clip X times - depending on a variable in the laded variables
This bit is working fine also
Next I want to assign a value from the text file to a dynamic textbax inside teh duped MC
this is where I'm in trouble - text values not showing thru (and I have already embedded the font b4 any1 asks )
I've attached a zip of my FLA (MX - not 2004) and a sample text file)
I've been going over this and over this for 2 days now
can someone with a fresh set of eyes please possible take a look at it for me and let me know where I'm going wrong
All help is appreciated
Thanks in advance
Alex
Preloading Loadvars + Code That Uses The Loadvars
Hey everyone
I can't find out how to do this.
I have a main file with a menu. When a menu button is pressed, and external SWF with the corresponding page is loaded into a container in the main movie. I use the MovieCliploader for this
In all my external files, I have a loadVars that gets XML-output from a PHP-file. In the onLoad handler, I have a buildPage() function that takes the variables and e.g. builds a news page and so on.
My question is how I make a preloader that preloads the loadVars + all the code inside my buildPage function? I mean - on big preloader for it all?
I guess it cannot be done with my moviecliploader inside my main movie?
thanx - Rune
Help LoadVars.send Vs. LoadVars.sendAndLoad
OK, my understanding is that if example 1 works so too should example 2:
Example 1:var my_lv:LoadVars = new LoadVars();
my_lv.overall_score = _root.overall_score;
my_lv.send("score.php", _blank, "GET");
Example 2:var my_lv:LoadVars = new LoadVars();
my_lv.overall_score = _root.overall_score;
my_lv.sendAndLoad("score.php", result_lv, "GET");
My understanding is however clearly wrong as example 1 will pass the variable quite happily to my php script which will update appropriately. In example 2, nothing. Nada. Variables aren't availabe to php and (therefore unsurprisingly) my_lv.onload isn't picking up any return.
Where am I going wrong this time?!
Cheers,
Andrew
[AS1][loadVars] Scope Trouble With LoadVars
Hi everybody,
I'm new on this server !
Is there a way to attach a file to my thread ?
You would find enclosed a ".zip" file in wich there's a ".fla" file, a ".txt" file and 6 ".jpg" images.
Frame 1 of the FLA only has a "Preload" class/constructor found on another site and works well.
Frame 2 launches the graphic interface construction.
The file "externalVar.txt" has one variable "maxVin" with a value of 6.
I would like to know WHY i can't acces this variable from outside of the loadVars object's scope (i would better say from outside of its ".onLoad" methode scope).
In fact, when i trace my variable "maxVinNum" from outside of this function, flash player return "undefined". Even if i declare "maxVinNum" on the _root (_root.maxVinNum).
For information, at the start of frame 2, i have let an instruction in comment :
//var maxVinNum = 6;
When we activate this instruction, then the variable is directely declared and everything works well. This test allow us to verify that scripts are not bugged.
Here is the script of frame 2, some of you may understand quickly what's wrong :
//var maxVinNum = 6;
var vignetteVars = new LoadVars();
vignetteVars.onLoad = function(ok) {
if (ok) {
trace(this.loaded);
maxVinNum = this.maxVin;
trace("maxVinNum = " + maxVinNum);
}
};
vignetteVars.load("externalVar.txt");
//
function buildArray (arrayLength) {
FileArray = new Array();
for (var i=0; i<maxVinNum; i++){
FileArray.push ("v_"+(i+1)+".jpg");
}
trace("FileArray : " + FileArray);
};
//
function buildSlide(){
vinKern = 1;
preloadSlide = new Preloader(load_indicator);
for (var i=0;i<FileArray.length;i++){
//Construction du slide
slide.vignette.duplicateMovieClip("vignette"+i,i);
slide["vignette"+i]._x += i*(slide.vignette._width + vinKern);
// ajoute à la file du preloader
preloadSlide.insert(FileArray[i], this.slide["vignette"+i].conteneur, i,"","","okload");
}
slide.vignette._visible=0;
};
buildArray(maxVinNum);
buildSlide()
stop();
I hope my english is not too bad, and my explaination not too long and understable.
thanks a lot for your help !
LoadVars.send VS LoadVars.sendAndLoad
Last edited by gkcohen : 2004-04-23 at 09:19.
can someone tell me what the difference is with these two. here is my problem. i am trying to submit some info to php script. i have my variables in text file.
if if loadVars.load("textFile.txt");
and then say loadVars.send(url, "_blank", "post") then it will work. but i dont want to load the resulting php page outside of flash. if instead i do loadVards.sendAndLoad(url, dataReceiver, "post") then it will not work. my dataReceiver will return blank, or i will get an error that the variables were not sent.
i guess that you cant loadVar from a text file and then use it with sendAndLoad, is that right?
the reason for using the text file is the real problem. the php script requires a variable 'group_ids[]' with an integer for a value. apparently, flash cant read the variable with the '[]' in it. i have tried different ways to get it formatted, but it wont work. i tried do something like loadVars.group_ids + "[]" = 1 but i get message stating the the object to the left of the operand must be a variable.
my only fix was to use a text file to load this variable. it works, but only when using the send and having a php srcipt popup.
i am not too familiar with php to modify the scipt, and i think that variable needs to be an array.
i dont know what else to do. HELP
gkc
[AS1][loadVars] Scope Trouble With LoadVars
Hi everybody,
I'm new on this server !
Is there a way to attach a file to my thread ?
You would find enclosed a ".zip" file in wich there's a ".fla" file, a ".txt" file and 6 ".jpg" images.
Frame 1 of the FLA only has a "Preload" class/constructor found on another site and works well.
Frame 2 launches the graphic interface construction.
The file "externalVar.txt" has one variable "maxVin" with a value of 6.
I would like to know WHY i can't acces this variable from outside of the loadVars object's scope (i would better say from outside of its ".onLoad" methode scope).
In fact, when i trace my variable "maxVinNum" from outside of this function, flash player return "undefined". Even if i declare "maxVinNum" on the _root (_root.maxVinNum).
For information, at the start of frame 2, i have let an instruction in comment :
//var maxVinNum = 6;
When we activate this instruction, then the variable is directely declared and everything works well. This test allow us to verify that scripts are not bugged.
Here is the script of frame 2, some of you may understand quickly what's wrong :
//var maxVinNum = 6;
var vignetteVars = new LoadVars();
vignetteVars.onLoad = function(ok) {
if (ok) {
trace(this.loaded);
maxVinNum = this.maxVin;
trace("maxVinNum = " + maxVinNum);
}
};
vignetteVars.load("externalVar.txt");
//
function buildArray (arrayLength) {
FileArray = new Array();
for (var i=0; i<maxVinNum; i++){
FileArray.push ("v_"+(i+1)+".jpg");
}
trace("FileArray : " + FileArray);
};
//
function buildSlide(){
vinKern = 1;
preloadSlide = new Preloader(load_indicator);
for (var i=0;i<FileArray.length;i++){
//Construction du slide
slide.vignette.duplicateMovieClip("vignette"+i,i);
slide["vignette"+i]._x += i*(slide.vignette._width + vinKern);
// ajoute à la file du preloader
preloadSlide.insert(FileArray[i], this.slide["vignette"+i].conteneur, i,"","","okload");
}
slide.vignette._visible=0;
};
buildArray(maxVinNum);
buildSlide()
stop();
I hope my english is not too bad, and my explaination not too long and understandable.
thanks a lot for your help !
Depths
Hey, I'm tyring to duplicate multipul movie clips (rockets for my spaceship game), but i want to duplicate them so that the rocket is under the spaceship, i tried duplicating the movieclip then swaping the depth the the spaceship, but then when i go to remove the rocket movie clip, the first rocket that was created doesn't get removed.
I need help with this, i dont know whats wrong
Help With Depths
doctor.hothere.com
I have the links leading to tell target a movie clip. The problem is that I have many links, and I don't know how to use the depth to have the movie clip on top of the others when the button that leads to the clip is clicked. Her's the code I have now.
on (rollOut) {
tellTarget ("Member Pic MC-Disappear") {
gotoAndPlay ("Member Disappear");
_root.depth++;
this.swapDepths(_root.depth);
}
}
on (release) {
tellTarget ("Member Link") {
gotoAndPlay ("Member Link");
_root.depth++;
this.swapDepths(_root.depth);
}
}
on (release) {
_root.depth++;
this.swapDepths(_root.depth);
}
Depths
Hi there,
I know how I have to load an external movie on the second level, but what do I have to do to make sure that the movieclip on the original timeline (now level 1) is on level 2 so I can load an external movie underneath?
greetings
robin
Depths
Got a project going where you can open up a few windows at once. I have the depth problem solved, but I also have a "tooltip" mc incorporated and the problem is that when the windows come to the top (only after they come to the top), my tooltips crash to the bottom and are hidden behind the windows! How can I make the tooltips come to the top regardless of all other level depths (like level 100 or whatever)? I tried a few scripts on the tooltip mc but nothing seems to work. Thanks for any advice.
MC Depths
I'm not to sure about this MC depth thing but I think it's causing problems to a game I'm making.
If 2 movieclips, completely different from each other have been created by different movieclip actions but have been given the same depth, does this mean one will over-write the other?
Also can you assign a depth of -1 for example so appears under a movie clip with a depth of 0?
Thankyou for your reply if you do. Great help.
Depths O_0?
ok, i've got a main interface. pages get loaded into it on button release. the pages represent windows like um... microsoft windows. when i'm loading the pages i use a counter variable for the depths they're loaded into. i.e.
Code:
on (release) {
//_root.home1.unloadMovie()
_root.createEmptyMovieClip("home1", counter);
loadMovie("home.swf", "home1");
container._x = 0 ;
container._y = 2 ;
counter = counter + 1;
}
the counter increments evrytime i load up a new page, on the loaded pages i have this code:
Code:
on (press) {
_root.home1.swapDepths(counter + 1);
startDrag(_parent);
}
from what i've read on senoclears tutorial and various posts here that should work, however it doesn't seem to be working.
also, aside from that, after i close (unloadmovie) a window that has been loaded and load another one ontop (incrementing the counter) if i re-open the window that was closed it re-appears on the origional level it was closed on and not the top level as i (and the counter) expected. and1 have any suggestions?
cheers, squid.
How To (depths)
Hi there,
I´m stuck with a problem and don´t know which is the best way to solve it. I don´t need a ready solution, but maybe just a different way to approach it...
Ok, I´ve got 15 dynamically loaded jpeg stacked on top of each other in levels 200 to 215. Now I want to fade them in and out...
The problem is, the image on the higher levels fade much smoother and faster than the images on lower depths. Fading against the background is awfully slow.
Fading becomes much quicker, if I put a mc which contains just a white square big enough to hide the images just below the fading objects.
This is how I´d do it:
Put the white square on level 218. Load the images which have to be faded on levels 219 and 220 with .swapdepths. Keep track which movie is where and create a routine to swap them back to their original level after use.
Doesn´t sound like a good solution, more like a workaround.
Has anyone another idea???
MCs Depths
ok i use _root.createEmptyMovieClip(i, -10000+i); to make all the MCs i need and i use _root[i].loadMovie(k) to put pictures in the MCs... now that's all fine, but everything alse renders below these pictures, like they were in the top layer... but they are from -10000
now why are they ON everything?
if anyone knows, i'd be happy to be helped
MCs Depths
ok i use _root.createEmptyMovieClip(i, -10000+i); to make all the MCs i need and i use _root[i].loadMovie(k) to put pictures in the MCs... now that's all fine, but everything alse renders below these pictures, like they were in the top layer... but they are from -10000
now why are they ON everything?
if anyone knows, i'd be happy to be helped
Depths
Im working a game, and i've come across a problem. I need some stuff(we will call it A) that is inside of a movieclip higher then something (we will call it B) on a differnet layer in the main timeline. I would normally just move that movieclip (A) up a few layers in the timeline, but there are other parts of movieclip A i need to be lower then Movieclip B, if that makes any sence. Is there a script i can use to tell movieclips which depth to be set at that will ignore where they are on the timeline?
Hope that makes sence.
MC Depths
Is there a limit to the amount of MC depths you can use??
I am making a tile based game, and i am attaching the baddies as new MC's on the grid (each on a separate depth). The game works fine until i add more than 6 badies to the screen.
Cheers
Paul
Depths?
hey,
I have four buttons, then i have four movie clips that have a simple picture transition animation. OK, i wanna make it so when someone clicks button 2, then my movieclip 2 plays ONTOP of the current movieclip. and if they click on button 3, then movieclip 3 would play it's trasition animation ONTO of the current moveclip (movieclip 2) and so on. So bascially, i want my new picture animation to load on top of the current (so while the new animation is playing, i still want the current image (moveieclip) to on the bottom.
Does anyone know how this can be accomplished?
Thanks,
Baljinder
Depths?
Im not even sure if I can ask this right.
I need, when button a is pressed to basically put layer one on top of layer 2
then when button b is pressed, I need them to switch again
Does that make sense?
Depths?
If got a problem with swapping depths...
This is what i've got in mind:
I want to have 3 squares to magnify when you rollover, in each square i want a different text to display when it becomes its largest size...
Because you have to read the text, when the square resizes it has to come on top.
The depth thing i got solved with buttons(from a movie from flashkit), but the problem now is, when i want to change the background or tekst in it, it changes every button...
Is it possible to load an external swf in the button without it having change all my buttons?
I uploaded the fla...I hope someone can help me because this whole thing is the concept of the website i want to create ;-)
Something like this: www.cgvimax.com after the intro...
I know this is to much for me, but i am trying to reach something like it...
I hope someone can teach me this...
Cheers!
[F8] Depths?
if i am adding about two movie clips a frame, (deleting two also..) each one using getHighestDepth, how would i make one movie clip that is always there, always have the highest depth?
sorry if im not making my self cear, im just trying to figure out how to make something stay infront of all the other movie clips..
Help With Depths
Hi,
Using the code
Code:
private function whenMouseDown(event:MouseEvent):void{
this.startDrag();
this.filters = [new DropShadowFilter()];
parent.setChildIndex(event.currentTarget, numChildren-12);
}
Gives me an error i dont understand why parent is defently the right location. the target is right but the depth just does not want to change any ideas?
Depths
Hi,
I have search all around and can't seem to get this right.
I'm using holder.createMovieClip('kit', 1);
This works fine. Now I need to create a movieClip in the next depth up so that when the image changes you can see the image below till it loads over the top.
This is the same image, just a different color.
I'm trying to be able to click on a color button and objects in the image appears to change color.
If I unload the movieClip and create another one, there is a moment when the image area is blank. Can't have that.
Can I load a new one and then delete the old one on the fly?
I suppose it also would not be too bad if they load one over the other except if this bogs the movie after a while.
Now that I am rambling, I hope this makes sense
Thanks for your help
Depths
hi,
Im having problems with depths, I don't need code I just need to know how flash reacts so i can rectify the problem.
A large number of mcs are attatched to the stage (100 or so) -around 30 of the 100 are attached to the same holder movie clip. These 30 are graphics. Of course trees and buildings can either be behind or infront of a character on the stage, so the depths of these are static. The depths of the characters are dynamic, now heres my problem. The character depth changes when it walks every second and sometimes the depth is the same as a tree for example.
1)If an mc is swapDepth() to a depth the same as an MC already on the stage, what should happen?
2) to rectify the problem will swapDepths work in decimals? say if I added .001 to the depths of the characters so they are never the same as the graphics.
3) Another thing also, it loads about 100kb of map data by loadVars() -Occasionally it seems to 'loose' some of the data and error out. Is it better to encorporate this map data into the actual swf file? will this be more reliable?
4) can anyone think of a workaround for my depths problem?
Thankyou
til
Depths
thanx for help on my previous question.
now that i've used some of your code, i've gotten everything relevent to the question completed, but i can't get the boxes i've been working with in back of everything where i need them to be. i have a few mc's on the stage i placed manually and they always go to the back of the newly attached boxes.
here is my code
Code:
_root.onLoad = function (){
var size = 15
for (q=0; q<=64; q++) {
this.attachMovie("box", "box"+q, q);
this["box"+q]._x = q%65*(size);
this["box"+q]._y = 7.5
};
};
i've tried alot of different methods to make it in back, but none work or they are buggy, i need a new solution :/
thanks in advance
Depths
Hi guys, I've got a button on the main fla which I would like to control it's depth in the as file i've got. I thought that by creating a number variable then saying closebtn.z = nameofvariable; would do the job but an error says "1119: Access of possibly undefined property z through a reference with static type flash.display:SimpleButton." What should I do? Thanks
MC Depths
hello,
i need help with finding out which mc is underneath the current one.
here is my code to attach movies, buttons "b1 through b5", and "words1 through words5" is the content. getting attached in "holder" on _root.
Code:
for (var i = 1; i<6; i++) {
_root.nav["b"+i].onPress = function() {
num = this._name.toString().substring(1, 2);
_root.holder.attachMovie("words"+num, "words"+num, _root.holder.getNextHighestDepth());
};
}
once it is attached how could i get the mc on the depth below it?
thanks for help anyone.
Depths.
Hey guys.
Okay...so I am doing a little Flash pop up ad (i hate them btw). I'm using that <param name="wmode" value="transparent"> code...everything is working great! BUT! I have a drag property set on my Flash ad and I also have Flash navigation on my site. Well, when I'm dragging the Flash ad around, it goes behind the Flash navigation. What is the script that I need to put in to swap the depths?
thanks.
Help With Mc Depths
Hello:
On the main timeline I have an itemdetail_mc, inside which is a detailthumb_mc (which loads an external image using onClipEvent(load)) and a watermark wm_mc. The watermark mc is on a higher layer in the Timeline than the detailthumb_mc, but when the external image loads, it loads over the watermark instead of under it. I tried using swapDepths, but this didn't help. Any suggestions?
onClipEvent (load) {
_root.itemdetail_mc.detailthumb_mc.swapDepths (_root.itemdetail_mc.wm_mc);
}
Depths
Hey guys- hope this makes sense...
I have 5 movieclips on the stage- when a corresponding button is clicked, I need the mc to move to the highest depth...
Is there something like swapDepths for multiple objects (something like nextHighestDepth)?
Any help would rule...
Depths, How To?
Hi all!
Great forum and lots to learn, this is my first post here. Now to my problem.
I have a menu in a clipholder and content in another clipholder. The menu is a drop down menu. Can I somehow make the drop downs going over the content clipholder. Some of the stuff in the content has to be over the menu clipholder. Does this make any sense? Hope it does. I saw something about getNextHighestDepth or something but I haven't figured it out.
Big thanks in advance.
Depths
I'm curious to know the relationship of depths of elements placed with flash's layers. I have some graphical UI elements within the application and then I attach buttons and functionality over it, however, I need to do some weaving and get a certain group of loaded MCs under a certain group of staged elements. Using a Negative depth would be easiest - but not to sure if thats possible or suggested. I also just want to know the relationship of "Placed" graphics in terms of the depth that gets assigned to them, so in the future I can manage them better.
Thoughts?
Depths
Hi guys, I've got a button on the main fla which I would like to control it's depth in the as file i've got. I thought that by creating a number variable then saying closebtn.z = nameofvariable; would do the job but an error says "1119: Access of possibly undefined property z through a reference with static type flash.display:SimpleButton." What should I do? Thanks
Swap Depths
hi, can anyone help?
i have 6 movie clips (windows) on the main stage with instance names of... about, news, contact, laboratory, portfolio and arcade.
i want them to swap depths but i can get to grips with it!
please help
thanks in advance
matt
Swap Depths Bug?
After swapping a draggable MC's depth in frame 1 loop between frame 3 and 2. On going to the previous frame the MC is duplicated ( but does not show as an object in Debugger!). Has anyone had this before or is it a bug( or am i just crap!). See code below and try it yourself.
create a MC with Instance name Target. Create a place in a new layer above a object i.e. a box, ( to check swapdepths works).
Frame1:
Target.swapDepths( 100 );
startDrag ("Target", true);
Frame2:
"No code"
Frame3:
gotoAndPlay (2);
Tried it with any loop i.e. frame 15 to 7, and the MC is duplicate when gotoAndPlay is executed.
Please help as i think i am going mad
Thanks
Swap Depths
Can someone help me with swapping depths between different movie levels.
In level 2 I have an mc called "am"
in level 3 i have an mc called "wrk"
in level 4 I have an mc called "rsme"
I load in all of the movies into different levels and each window is dragable, I want to be able to swap the depths of the one you click on to bring it ot the front.
?.swapdepth (?);
Any help would be greatly appreciative and a huge thanks in advance.
Jason
Swapping Depths
I'm looking for a solution to my little problem.
What I am trying to do is to swap the depths of two clips I attach to stage in the runtime
http://galileo.spaceports.com/~skd/scr.swf
'Craft Window' attaches a new 'window' clip to the stage with a name of "newindowX" (where X is the accumulator var) on depth equal to X.
What I want to achieve is on press of the drag bar (A button inside the window clip), I want to switch the depths of the clip on which I activate the button with the clip on top (it's depth is equal to the current value of X), thus bringing the needed clip on top of the stash.
What my problem is - I cannot yet get how to call swapDepths for the clip A by activating the event from inside the clip A (with the help of button, in my case).
Any help would be deeply appreciated.
Swap Depths....swf
Hi there!
Im having a bit of trouble figuring out how to swap depths with seperate swf files. I have a few swf files which are loaded into my main page which is on level 0.
If anyone has the answer I would be very thankful for your help.
If you want to check out my incomplete webpage go to the link below....
Swapping Depths
How can swap depths between more than two movieclips.. Please help
Layer Depths
I have 10 movie clip objects within a flash movie. On an onclick event I require the chosen movie clip to come to the top of the stack.
Any advice would be much appreciated
thanks in advance
Depths Nightmare
I have some button components that each one creates an empty mc to draw a curve on. How do I set the depth, so that every emty mc gets a different depth? They all execute at the same time, and I want the depth to be lower then the component.
As it is now, the empty drawing mcs has the same depth, but this screws up. Click here to have a look yourself--> http://webzone.k3.mah.se/kit01051/mx...interface.html
roll over all the buttons a few times, and you should see the nasty turn the design takes. I need your help, dude, this is ugly. Spanks u very much
Loadmovie Depths
I a want a button to load a movie over the last movie loaded using the "loadmovie" action,(it needs to slide over rather than replace) and then unload the last movie... if that makes sense...
this needs to happen from various buttons but needs to unload the last movie as the main movie just gets bogged down with all the loaded movies...
thanks
Swaping Depths....
These two MC's are on the same layer in the timeline.
Here is what I have made so far.....its a OS simulation....
I am wanting to get the "windows" / MC's to move "infront"
of each other.
Some code of swapDepths would be nice.
Now to my OS simulation....
Its caled GINW : Glad Its Not Windows...
Tell me if you like it.
(It needs flash MX player, so it can save your settings.)
One "Bug":
when "undocking"/"docking" a window,it sometimes moves to the wrong spot....Im tring to fix it.
Swap Depths ?
Does anyone know if swap depths - can make one layer appear as if it's above the next and swap 3 or 4 of them at the click of a button ?? Or something that'll do this ?
|