ActionScript 2.0 :: .swapDepths Not Working - How To Make It Work

Sep 7, 2003

I have a movie clip I am using to display a group of logos i created which are also movie clips. when the user clicks on each logo the logos are supposed to enlarge except, that because of the way the layers are stacked, one of the enlarged logos displays underneath the smaller one. so, someone suggested i use swapDepths. But nothing happens. it won't even enlarge. here's the script:

on (release) {
this.swapDepths("manard");
gotoAndPlay("oataup");
}

"oataup" is a frame label, obviously and "manard" is the name of the movie clip instance I'm trying to swap with. I've never used the swapDepths method before so I'm hoping I screwed something simple up.

View 4 Replies


Similar Posts:


ActionScript 3.0 :: Without SwapDepths Menu List Doesn't Work

Mar 3, 2009

Im working on migrating an old as2 file to as3 and am stuck on a swapDepths issue--Havent had any luck with setChildIndex or swapChildren--Nothing is being dynamically added to the stage and as the clips are nested and consist of timeline layers of textfields and MCs Im not even sure what is a child of what. for some reason on mousing over the menu, the code I have for highlighting the button and showing the text that was appended(on long lines of item descriptions) due to size constraints of the component, is showing up as semi-transparent--I dont understand what is causing it to happen(although I resolved the issue previously with swapDepths)or how to resolve it. The code thats is the issue is in the menuButton MC timeline layer 13...

Here's the link to the file--see button 8--- [URL]

View 10 Replies

ActionScript 2.0 :: SwapDepths In Array Stops Working

Mar 12, 2009

I'm trying to set up an app that moves one movie clip to the top of the screen, regardless of where it is or how deeply it is nested. To do this, I take the full path of the movie clip and go in, movie clip by movie clip, putting the depth of each nested clip on top. This part works perfectly. Afterwards, I want to move everything back to where it was. In the first step, I store the current depths of everything in an array before changing depths. In the second step, I'm trying to change everything back to its original depth, as shown in the array.

The code is below:
_global.videoPath = _root.clip1.clip2;
var pathString = String(_global.videoPath);
var videoPathArray = pathString.split(".");
var depthArray:Array = new Array();
[Code] .....

View 1 Replies

ActionScript 2.0 :: Tabbed Content With SwapDepths Not Working Right?

Apr 2, 2009

I followed this tutorial on making Tabbed Content with swapDepths, but mine isn't working quite right. When you click a tab the text and icon disappear behind the tab. So each tabbed page is an mc and there is a button for each tab that has this AS on it:

on (release) {
_root.btn1.swapDepths(3) ;
_root.tab1.swapDepths(2) ;
}

View 3 Replies

ActionScript 1/2 :: Swapdepths With New Mc From Dynamic Text Still Not Working

Feb 21, 2011

difference but Im using Flas cs5 with AS2. but my clock timer is still behind. Ned, I used your suggestion of putting my dynamic text into a new mc (create sybol method, the only one I know) then I made a new movieclilp named time_mc. I then pasted the actionscript with the 30 minute countdown timer on it. It is still behind. The clouds have to stay on the last depth and the timer has to stay on the top. The rest can go whereever. Not sure what i am doing wrong. I bet Im doing something incorrect but cant figure it out. I kept playing around with codes, but nothing worked. Here is the final non-working code. Working on this issue three days. The timer works if I remove all other layers but it stays hidden once I put them back,

[Code]...

View 4 Replies

ActionScript 3.0 :: Creating Carousel Effect And Working With Swapdepths

Oct 17, 2006

I am trying to create a carousel effect with AS3. It all works good except that I get my swapdepths to work. I have a CarouselItem class

ActionScript Code:
package{
import flash.display.Sprite;
public class CarouselItem extends Sprite{
private var _angle:Number;
public function CarouselItem(){
super();
[Code] .....

I get the depth of the current object and then swap it with the one with the higher index.

View 9 Replies

ActionScript 2.0 :: SwapDepths On Duplicate Movie Clip Not Working

Jul 18, 2010

I have been battling this for 2 days now and can't seem to find any solutions. I am making a flash Statistics chart for my website which pulls the stats from the database and loads them into corresponding arrays in the actionscript. Once all the information is pulled, it goes to the next frame and duplicates the existing stat bars on the flash document depending on how many stats were retrieved. The loaded stats are then calculated to adjust the stat bar heights to fit the grid. So far, everything is working up to this point.Now for the problem... Directly above each stat bar, I have a text field which I want to fill with the value of the specified stat. The stat text fields are duplicated by the duplicateMovieClip function. For some reason, stat text fields are not visible at all even when using the depthManager function I found in my research.[code]

View 2 Replies

ActionScript 3.0 :: RemoveChild Not Working - How To Make It Work

Dec 22, 2009

I'm using CS4/AS3 and am swapping out swf files in a single holder from different buttons. The problem is that the child isn't getting removed when switching from button to button.Here's my code:

var Xpos:Number=0;
var Ypos:Number=150;
var swf:MovieClip;
var loader:Loader=new Loader();

[code]...

View 6 Replies

ActionScript 2.0 :: Preloader Not Working - How To Make It Work

May 29, 2010

A loading bar for my portfolio website is not working at all. Although the same loading bar will work on other Flash projects.After doing some research I have found that loading in MovieClips from the library may be the cause of this. So instead of loading them in from the library, i am now loading them in externally but the problem still persists. how can i un-embed the font? [URL]

View 1 Replies

ActionScript 2.0 :: GotoAndPlay Not Working - How To Make It Work

Jan 14, 2009

my gotoAndPlay does not seem to be working. On frame 1 I have this for testing purposes:

trace("frame 1")

and on frame 2 I have:

gotoAndPlay(2);

and I get "frame 1" traced out continually. It's going back to frame 1 for some reason.

View 2 Replies

ActionScript 2.0 :: Gettotalbytes Not Working - How To Make It Work

May 3, 2010

i am having some issues with the gettotalbytes function as flash wont take it as its function ( which generally show in BLUE COLOR ) so what i am trying to do is not working.

this.createEmptyMovieClip("mymovieclip",this.getNe xtHighestDepth);
this.createTextField("textfield",this.getNextHighe stDepth,10,10,100,10);
if(mymovieclip.getTotalBytes()>0)

[code]....

View 5 Replies

ActionScript 3.0 :: ButtonMode Not Working - How To Make It Work

Jan 19, 2011

what could cause buttonMode to 'not' work properly?? the clip has MouseEvent listeners. I set the buttonMode to true. I have a trace statement inside the roll over event showing that buttonMode is set to true, but for some reason its not showing the hand cursor. the rollover,out, and click events fire as they should too..and i have other objects that work perfectly fine with buttonMode.

View 3 Replies

ActionScript 2.0 :: _parent Not Working - How To Make It Work

Nov 7, 2004

I have a movie clip that has the following code:

on (release) {
_root.rightMenu_mc.gotoAndStop("Animation");
}

It works fine the way it is but I read that it is better to use relatives paths rather than _root all the time but when I change it to _parent.rightMenu_mc.gotoAndStop("Animation"); it doesn't work anymore.

View 13 Replies

ActionScript 3.0 :: EventListeners Not Working - How To Make It Work

Feb 11, 2009

rotateToMouse works. Nothing else even gets as far as tracing. What gives?

Code:
package engine
{
import flash.display.MovieClip;
import flash.display.*;

[code]....

View 6 Replies

ActionScript 2.0 :: Use SwapDepths() To Make The New Active Slide Appear Over Old One?

Jul 27, 2007

I am working on a slide show where the slides overlap. When a new slide is accessed, it slightly overlaps the previously accessed one (which is scaled down and moved slightly to give the illusion that it is being pushed back). The problem occurs when I try to use swapDepths() to make the new active slide appear over the old active one, the 2 movie clips that this function is applied on pause and continually swap depths with each other for the remainder of the movie. I read in the documentation that all tweening stops when this function is called. Is there anyway to bypass this and achieve the effect that I am looking for?


[code]...

View 3 Replies

ActionScript 3.0 :: Functions Aren't Working - How To Make It Work

Jun 25, 2009

I have one function that for some reason, isn't calling the next function. I've been looking over this code all day and I feel like it's probably going to be something really small and stupid but I jsut really need help at this point. The function that isn't working is showUsers().

This is my code:

Code:
import fl.controls.*;
import flash.display.Sprite;
import fl.managers.StyleManager;

[code].....

View 14 Replies

ActionScript 3.0 :: Buttons Stop Working - How To Make Them Work

Feb 19, 2010

I have a container mc called lightBoxCont that I load a class into

Code:
lbx.initLightBox(12, Number(slideIndex), urls, titleText);
lightBoxCont.addChild(lbx);

when the user clicks on a thumbnail the user can close the lightbox by clicking on a button like this

Code:
this.removeChild(lightBoxCont);

This all works (or seems to). If the user then clicks on another thumbnail the light box appears again, but the buttons don't work. These were added in the class lightbox.

Interestingly if I trace teh number of children that lbx has I find that each time the user presses on a thumbnail it goes up. First time its about 30, next time its about 60, next time its 90 and so on.I think this is causing the problem with the buttons not working.

View 5 Replies

Change Swapdepths To Make Sure Layers Above Buttons STAY Above?

Aug 10, 2009

I'm using a really simple bit of code on some fading in/out buttons which overlap each other slightly to ensure that the one with the cursor resting over it sits in front of the others:[code]problem being that this brings the button in front of everything across all layers. How do I change my swapdepths to make sure the layers above the buttons STAY above? - or do I need to add something to the other layers to give them a fixed 'depth'?

View 11 Replies

ActionScript 3.0 :: Width Doesn't Work - How To Make It Work

Apr 21, 2010

I have a button object that I need to scale to align with the variable width of an array of images.However, when I set the width in code, the button does not actually become that width. Tracing out the width gives me the correct value, but on screen.. it's off.

I've proved it to myself by scaling the same button object manually in the properties pane and visually comparing. Both of the buttons below have a width of 410.

Code:
navigatorDown_btn.width = 410;
navigatorDown_btn.x = (stage.stageWidth/2)-(navigatorDown_btn.width/2);
trace(navigatorDown_btn.width); // output: 410

View 4 Replies

ActionScript 3.0 :: Make A Sprite Button With Graphics And Can't Make It Work?

Aug 22, 2011

* I have a flash project called contact

* The document class is ContactClass

I am trying to make a sprite button with graphics and can't make it work. I have successfully added text fields so I know the path is correct. I suspected my code was correct and confirmed it should be, after reading several tutorials showing the process for creating sprite buttons with graphics. Anyway, I imported nearly every class on Earth, but certainly everything which needs to be. Stage is gray and 800x600.The graphics code by itself with appear, but not when linked to the sprite. Also, the sprite won't appear no matter what. Another interesting piece of the puzzle: nothing will trace, not even objects such as textfields which actually appear and function on the stage when I text the code.

public class ContactClass extends Sprite {
public function ContactClass() {
var home_btn:Sprite = new Sprite();[code]....

View 3 Replies

ActionScript 3.0 :: How To Use SwapDepths()

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

ActionScript 2.0 :: Using SwapDepths In MX?

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

ActionScript 1/2 :: SwapDepths With 3d Carousel?

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

ActionScript 2.0 :: Get These Mc's To Swapdepths When Clicked?

Jan 19, 2009

If anyone can get these mc's to swapdepths when clicked!

View 2 Replies

ActionScript 2.0 :: Using SwapDepths With 3D Carousel

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

ActionScript 2.0 :: SwapDepths Without Using An OnClipEvent?

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

ActionScript 2.0 :: SwapDepths On Buttons?

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

IDE :: SwapDepths Without Movie Clips?

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

ActionScript 1/2 :: SwapDepths And Button Rollover?

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

ActionScript 2.0 :: Swapdepths On A Ui Window Component?

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







Copyrights 2005-15 www.BigResource.com, All rights reserved