ActionScript 2.0 :: SwapDepth Duplicating Movieclip?
Jan 12, 2009
I've developed a resource with drag and drop movieclips within a presentation.There are a huge number of drag and drop clips, so I've added a bit of swapDepth code so that the chosen movieclip is always in view. The problem now is that when I go to the next page (which contains a different drag and drop activity), a movieclip from the previous page is duplicated. Is there any solution to this? I've tried an onenterframe unload for the next page, but obviously this deletes the MC permanently making it fairly useless.
View 2 Replies
Similar Posts:
Apr 7, 2009
I have a main file running at the bottom (HD video of myself), and several clickable options (for various stuff on my portfolio). To show my digital work, I have a button that takes me to a frame label on _root. and a frame action that tells it to open a movieclip into a containerMC. All this is working perfectly, but it might be needful background info.
This section of my digital portfolio is a mock up of a mac screen desktop (yes I use a mac) / and I want to show my work as "programs". I expect to have 5-10 programs, 2 for now in testing. With no open "programs" at start, but I want the possibility of multiple open "programs", and when you open a new one or click one that already open but in the back, it automatically comes to the foreground (and does not close the ones already open - just like the desktop actually works). Obviously the "programs" have to be draggable too.
[Code]...
View 7 Replies
Dec 5, 2009
What happens is I've used the the bus and car mcs to drive on both sides of the road in the animation (they will go across the screen then flip over and drive back within their respective mc).When they first cross over they are layered right but because of the timing of each animation, there is a point where both are going the same way on the same side of the road. At this point the bus pulls up higher (to the side of the road to pick people up) and the car passes it. The problem is when the car passes it is registered as being behind the bus (which would be hitting people).So i'm trying to get the car to swapDepths and come to the front Only when driving on one side of the road, so only at a certain frame reference essentially - not the entire mc.
View 3 Replies
Jan 19, 2010
What have I done wrong here? I need a movieClip to fade out, pause, then a new movieClip to fade in.
[Code]....
What I've tried to do is to set the target_MC alpha to 0 and fade out the current mc. Then when the fadeOut has completed to setTimeOut. After this the mcs will swapDepths and the target_MC should fade up to alpha = 0I've attached the flash and xml files. The images were too large.
View 2 Replies
Feb 10, 2011
Here's the deal... I built a dynamic image gallery that runs hoizontally, and the idea is tu duplicate it and, when it reaches a certain point, use it's duplicate, so that there's the illussion of a "never ending" gallery.The problem is that, when duplicating the movieclip, it appears empty, even though I duplicate it after having loaded every picture.
View 8 Replies
Feb 2, 2011
I'm trying to do something that I thought would be quite easy, but now I'm beginning to wonder. The broad description is that I'm trying to load an external .swf into a parent movieclip. (This item must be loaded externally, and can't reside in a library.) Once loaded, I then want to duplicate, resize and rotate the movieclip multiple times.
The problem is that the duplicateMovieClip function doesn't seem to allow me to duplicate my loaded clip, nor does it allow me to place a duplicated item into a parent item (other that at the _root level).
View 1 Replies
Jun 27, 2011
i'm having problems to make the balls from this exemploe duplicate. [URL] (missing a "." after www cause i cant send links yet)
This way:
When someone click on one ball, it duplicate.
View 9 Replies
Jul 9, 2004
I am duplicating a movieclip on the stage in which Flash labels them in order.AKA. ball1...ball2....ball3....ball4...etc.I'm trying to change the color of all of them from another button and so far I have to do it like this: Is there a shorter way?
on (release) {
var visitedcolor = new Color(_root.bb.t1.screen);
visitedcolor.setRGB(0x00FF00);
[code]....
View 2 Replies
Apr 5, 2007
i have this function that everytime i click the screen a box appears.
function box () {
_root.onMouseDown = function(){
movie = _root.attachMovie("mcBox", "mcBox", _root.getNextHighestDepth());
[code].....
View 3 Replies
Jul 9, 2003
I want to have a function to duplicating mc or better to place mc on the stage in sequence, imagine, one after another not all when the movie starts, this is possible whit actionscript? I thought to try to use the set Interval.
View 5 Replies
Dec 3, 2007
I am trying to load an external swf (AS3) in an AS3 application, using basically a duplicateMovieClip() function from the "Tip of The Day" (the loaded swf should appear in several places in the Container - each with its own timeline - that is, I want to be able to play() ant stop() them independently); ofcourse, I'm trying to avoid loading the same file multiple times.
Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="main()" width="500" height="500">
<mx:UIComponent id="spriteHolder"/>
[Code]....
View 3 Replies
Feb 27, 2009
I have a game where you click a button and I want a movieclip to be duplicated in a certain area which is a movie clip named swamp_mc.On the button I am writing:
Code:
on (press) {
i = i + 1;
[code].....
View 7 Replies
Nov 12, 2003
What I'm trying to do, is duplicate a movie clip an x amount of times, based on a variable loaded externally, not the problem though, got that working fine. My problem comes in while I'm trying to reposition the duplicated movies, to line up in a stacked order. It duplicates the movie the number of times I need it, but when trying to call upon the movie clip, which is the a=this["a"+i]; script, nothing happens, the clips don't get repositioned.
[Code]...
View 1 Replies
Dec 13, 2009
I have this script. On the mc duplications i want to onRelease get on the every box a different loadPic(x)[code]...
View 0 Replies
Feb 27, 2006
I have an MovieClip star with a setup var X which is set to 0 for the thing I'm duplicating, namely star
===Star======
onClipEvent(load){
x=0;
}
If I duplicate the clip a bunch of times so I have Star0....N. Is there a way to set the x value here to the i value of the loop for each object duplicated. Such that star0 will have its x=0, star2 has its x=1 and so on.
setProperty wont do it or _root["star"].x=i;
View 1 Replies
Jun 22, 2010
I am loading several images from XML to dynamically generated movieclips (mc_1, mc_2, mc_3...etc.). Then adding all of them into a parent MovieClip - imageContainerMc. So now, imageContainerMc holds mc_1, mc_2... etc. What I want to do next, is to Duplicate the imageContainerMc, and add both the instances on Stage-- addChild(imageContainerMc), addChild(imageContainerMc_duplicate).how can I duplicate a dynamically generated MovieClip?
View 1 Replies
Mar 5, 2010
In Flash CS3 I was able to duplicate any MovieClip from an external SWF by loading the SWF, and then executing the following code:
var targetClass:Class = MovieClipToDuplicate.constructor;
var duplicate:MovieClip = new targetClass();
Note that the MovieClips I was duplicating did NOT have any linkage explicitly defined. Flash would automatically assign a unique class to each MovieClip. Now, in Flash CS4, when I try to do the same thing the .constructor property returns only the "MovieClip" class, such that the "duplicate" variable above is but a blank MovieClip. If I compile the external SWF using CS3, my old code still works. But I want to do it in CS4.
View 4 Replies
Jul 31, 2009
I have this movieclip that i made in flash. How would I go about duplicating it and giving its parts instance names using AS3?
View 3 Replies
Apr 26, 2004
Can I do this in flash? which is the best way to do it? I have a main mc and I want to duplicate it and then move it in specific area..
View 12 Replies
Oct 16, 2006
I having trouble duplicating my movieClip onto another movieClip called "Floor". I can duplicate the floor movieClip but not the item I am selecting in my scrollPane. I don't know what I am doing wrong.
[Code]...
View 1 Replies
Feb 26, 2010
Why does the MovieClip class have no setDepth method? Why should we use swapDepth when a setDepth method is the easier way to set a movieclip's depth? Is it because setting of depth should be done by another class like DepthManager?
View 4 Replies
Oct 11, 2010
How do I set the swapDepth for my UI ScrollBar? (the scrollbar show-up when some external text is being loaded). Or how do I make 'abc' right on top of all other items?
[Code]...
View 3 Replies
Dec 5, 2005
i got some trouble here that I cant seem to find a solution, well, I dont even know what happends here.
The goal: Make a puzzle-like with 54 MCs
What it should do:
- Come to front onMouseOver swapDepth(1)
- Go to back when onMouseOut swapDepth(-0)
This is working...
I cant seem to understand why my MCs are still appearing on another keyframe when I click the button "2"
Btn "1" goes to the puzzle. Btn "2" goes to an empty keyframe but there are some MCs that are still visible when they should not be.
View 7 Replies
Jun 23, 2009
I am having tremendous trouble with swapdepths on a movie. I am quite the lame coder as I am more the designer type but I am trying to get some basics down for a simple RPG.Basically I have 2 layers. the top layer is 9 empty clips in a 3x3 grid I load all the 'objects' into. These loop around so I can build up a map in sections. It loads the next 'set' when the player moves to the next 'section' (the player doesn't move as the background does).the second layer is simply a background with the same idea but has no interactive elements.
The player is on the same layer as the 'objects'. I don't know if layers affect depth information.The problem is that I am trying to make each object within the loaded .swf modular, in that it checks whether or not the player is in its hitzone, and applies certain things. like swapdepths, transparency etc.transparency works a treat, but swapdepths seems to only work on ONE of the objects I have in that sections objects movieclip. It even traces that the player is below the object with getDepth tests...but it doesn't actually go under. Some clips are instances, while others are not...but still, only ONE works properly.
Is there any weird swapdepth rules in regards to changing depth of clips inside loaded movieclips inside a main movie?!I have tried swapping individual objects as well as the parent clip as a whole and neither seem to work.
View 2 Replies
Aug 12, 2011
Can I put one object under two objects?
View 3 Replies
Sep 20, 2011
The tab stays at its place once mouseover takes place. do the mouseover on BEST PROPERTY DEALS tab and you'll see the issue. how to make the animation smoother as i tried but i wasn't able to make complete cirle's animation smoothly as the MC used to come back the same path it took in the first half of animation.
View 0 Replies
Jun 11, 2008
I'm trying to make a few movieclips grow when you rollover them and the shrink back down when you rollout. I tried using swapDepth to make it so each clip would stay on top. But then when I try to instruct its root movie clip to go back to frame 1 (which is blank with a stop command), it remains on the stage. Here's the code for the movie clip to grow/shrink/swapDepths
[Code]...
View 1 Replies
May 13, 2004
I am using buttons inside movieclips, and changing their visual layer by using swapDepth method. But for some reason i loose my rollover button effect when I use swapDepth.
View 2 Replies
Feb 24, 2010
I have a dynamic text box that I need to use swapDepths with and I understand that I should turn it into a movieclip but I get weird results.
View 2 Replies
May 27, 2010
I have 9 movieclips that I would like to when you rollover they zoom in and come to the front and when you rollout they to return to their original positions.I am using as2 and the code that I have is for the swapDepths
1_mc.onRollOver = function() {
1_mc.swapDepths(2_mc);
1_mc.swapDepths(3_mc);
[code]....
View 0 Replies