Movieclip Stacking Problem
Hi there
I got a problem here. Well I have this a flash file which is my main(level 1). there is a button which open up a new pop up flash window(level 2). actually its a pop up jpeg opening using flash. but how do I make it in such way that the main flash which is at level 1 will not be affected? Meaning even when my mouse is over the jpeg the background which has buttons can be clickable from it. how do I make it such that level 1 is disabled???
another qns how do I make a close button for that jpeg window?
thanks a million!
Ultrashock Forums > Flash > ActionScript
Posted on: 2003-08-11
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
MovieClip Stacking
Hello All,
I am trying to figure out how to stack movieClips on the _y coordinate.
I know that using the duplicate Movie function it will allow you to stack the movieClips on the x axis (on top of each other).
What I want to do is duplicate a box a number of times depending on the amount in a XML doc. Once the movieClip is duplicated, I want each one to stack vertically on each other using the y coordinate.
Any suggestions would be great! Thanks!
Lostcook :)
Controlling The Movieclip Stacking
Hi guys,
I created 3 tabs and made them as movieclip. My objective is to create tabs in flash, pile them over the other and just change their stacking order when the user clicks their tab. Thou i was successful changing their stacking order the problem is when i click the same tab or when i click the same tab twice. When you click the same tab twice it goes over the other tab then under the other tab again. How can I make it possible that when the tab will remain over the tab unless the user click the other tab
Here's how my actionscript goes:
on (press) {
tab1_mc.swapDepths(tab2_mc);
}
Preventing External Swfs Loaded Into A Movieclip Image From Stacking
So I've been building a webpage that contains 5 "content" sections each loaded on their own swf files into a movieclip called loader_mc when I click the corresponding button. So far, my code works to load the swf's into a movieclip entitled loader_mc when I click on the respective buttons but when I try to change sections, that's where things unravel.
The "samples" section streams video, and when I leave the "samples" section, the audio is still streaming even if I'm looking at the "about" page (or any of the other for that matter). It seems as if my swf's just keep loading one on top of another (not what I want), where what I want to accomplish is to have the swf files replaced upon clicking a button with whatever swf is appropriate to the section I've just clicked. That way dynamic content doesn't sound or appear to be playing even when the user is supposed to have made it "go away". Below I've pasted the code that I think you'll all need to see in hopes you may be able to assist me in tweaking my code to get it to operate.
Here's where I defined my variables:
var contentLoader:Loader = new Loader();
var aboutURL:String = "z_about.swf";
var aboutRequest:URLRequest = new URLRequest(aboutURL);
var samplesURL:String = "z_samples.swf";
var samplesRequest:URLRequest = new URLRequest(samplesURL);
var contactURL:String = "z_contact.swf";
var contactRequest:URLRequest = new URLRequest(contactURL);
var linksURL:String = "z_links.swf";
var linksRequest:URLRequest = new URLRequest(linksURL);
var homeURL:String = "z_home.swf";
var homeRequest:URLRequest = new URLRequest(homeURL);
And here's an example of one of my buttons codes for the Click event:
function linksClick(event:MouseEvent):void
{
zMenu.links_words.gotoAndPlay("click");
contentLoader.load(linksRequest);
loader_mc.addChild(contentLoader);
}
Does anyone have any idea where I might have gone wrong? I've made it this far mostly through tutorials, but I think I'm in a little over my head at combining the things I've picked up without forgetting important elements. Any help is greatly appreciated.
Stacking .swf's
Is it possible to rearrange the stacking order of .swf once they have been loaded?
I can't determine which movie is going to be called first, but I want them all to be preloaded. So therefore I need some way of shuffling them around.
Z - Stacking
Here's the deal guys -
3 different MC's: "print","web","multimedia"
these are NOT instances of the same clip; they are different clips altogether -
So how can I get this z-stacking to work using swapDepths() so that the clip in the back comes to front while the front clip recedes without going all the way to the back?? I've looked at numerous tutorials for this - obviously they all involve arrays - the only problem is all the tutorials use one MC for the general window. I have separate MC's, so how can I set up the array to cycle this way???
Week-long issue
Stacking
Question? Is there a way to make one flash movie and expand it to 100% in the publish settings & then have another one to stack on top of it that will not expand to 100%? I want to do this to stretch a background and not morph photographs.
Thanks in advance for answers.
Stacking Mcs One Above The Other
Hello,
I am trying to attach a movieclip (a rectangle shape) from the library incrementally (i++) by cliking on a button.
My problem is I am not able to stack the latest attached movieclip exactly on top of the last attached movieclip. The movieclip has a height of 25.
What is that not correct? Here is the code:
var p = 1;
btn_rectangle.onPress = function() {
var b = _root.Knowledge_mc.Know_Assesments_mc.attachMovie( "rectangle_mc", "rectangle1_mc"+p, _root.Knowledge_mc.Know_Assesments_mc.getNextHighe stDepth(), {_x:b._x, _y:b._y-25});
p++;
Stacking
i'm just making a basic game where sand falls from the top by using th following code:
onClipEvent (enterFrame) {
num++;
_root.sand.duplicateMovieClip("sand"+num,num);
_root["sand"+num]._visible = true
_root["sand"+num]._x = _root.car._x
_root["sand"+num]._y = _root.car._y
}
How can i get the particles (sand) to stackup on each other. Thanks in advance
TOP OF STACKING ORDER POP UP
I'm building a Flash Site which makes use of Pop Up html pages to hold the content, however I want the pop up box to remain on top of the stacking order.
See the following:
http://javascript.internet.com/page-...op-window.html
I've tried to implement the script but just can't get it to work!
How do I do this in Flash?
Please help!
Regards
PADDYWALL esq
Stacking Instances
Does any one know how to stack multiple instances on one layer so when i click on one of the multiple instances, it comes to the top and the same will happen to the others when i click on them?
Stacking External MC's On Top Of Each Other
I want to load an external MC to my main MC. But I want it to go over the previous loaded MC.
here is the process: click any of the navigation buttons which loads an external MC - click another button and it preloads another MC over the previous one and unloads the current MC AFTER the new MC's transitions (loader animation) - click on another menu and it loads a new MC over the current again, load the previous MC and it goes on top still, it looks like it stacks everytime you click any of the menus
A good example of what I am talking about is www.nikewomen.com. There is a tab on the left where it opens up panels that you can click. Press any and it preloads a new movie on top of the current. Press another and it preload again on the current loaded movie. Also check www.nikebowerman.com it has the same effect.
Hope someone can help. Thanks to anyone who responds.
syfer707
Stacking Swf In Html
My .swf file (integrated just below an expanding external.js menu in my html document) blocks the menu when expanded. Is there some way to control the stacking order of either .swf or .js so the menu appears 'on top' of the .swf file?
Stacking Order - How?
I'd like to know if it's possible to make (force) a MC to be displayed over another one.
I use the attachmovie method...
thanx
Stacking Levels Up
Real quick...what I would like to do is...assign a +1 level code to my movie clips so the selected movie clip always plays one level higher than the previous. Creating a stack. Anyone have experience with this?
Stacking Div Over A Flash
hi are there any new ways of stacking a div over another div that has a flash movie in it. so the movie will be running under a div.
i know there is a way to do it with iframes but just wondering if there are any new developments for this issue that comes up a few times a year for me.
-best
kvn
[CS3] Falling & Stacking
Hey all,
I'm looking to create a falling objects effect (colored boxes in this case) that when they hit the bottom of the stage begin piling up on each other. Once the stack gets to a certain point the bottom row sinks down to create a continued looping effect.
Any ideas on the best way to achieve this?
Much thanks!
Stage Stacking
Hey everybody! I have an image of a Cloud that I have made into a Class so that way I can generate multiple instances of it on the stage and I've noticed that every Cloud that is generated appears on top of everything else no matter where I put the "addChild" statement in my TimeLine code, how do I fix this?
[CS3] AS2 How Do I Stop MC's From Stacking?
I'm working on a project where triangles are filled with different colors and patterns. The problem I am running into is that each time the triangles are filled, the previous fill is still behind the new fill, which makes the file run really slow as the fills stack up. I tried a few things in an attempt to fix the file, but can't get it to work. I have attached a mini version of my Flash file. The code I am using for the fill all buttons is below:
PHP Code:
on (release) {
tileBG_all = function () {
for(i=0;i<=58;i++){
tile_width = 34;
tile_height = 34;
//
x_max = Math.round(340/tile_width);
y_max = Math.round(170/tile_height);
for (x=0; x<=x_max; x++) {
for (y=0; y<=y_max; y++) {
bg = _root["Tri"+i]["c"+i].attachMovie("square4", "bg"+x+y, _root["Tri"+i]["c"+i].getNextHighestDepth());
bg._x = tile_width*x;
bg._y = tile_height*y;
}
}
}
};
tileBG_all();
}
All the fill buttons are the same. The only thing that changes is the movie that is attached, for example "square4" changes to "square5". I don't have much of a handle on actionscript, but from reading previous forum posts I thought that maybe loading the movie clips on the same level would be the solution. I tried changing
PHP Code:
getNextHighestDepth()
to
PHP Code:
_level10
and when that didn't work, tried changing it to
PHP Code:
getNextHighestDepth(10)
which also didn't work. I'm not sure how to approach this problem. Does anyone have any suggestions?
Another less pressing thing is that I also wanted to be able to have a random fill button. I got it to work at some point way before the current version of the file when I wasn't using movie clips as my fills, but don't know how I would even get started on doing the same thing at this point. Does anyone have a suggestion?
Any help would be appreciated.
Stacking Multiple Swf's + Php
Hello, thanks for reading this post. Hopefully you can help me out.
Let me start my explaining the problem. I have a index.php file in which i have created an embedded object using the SWFObject. In this object i call for flvplayer.swf with the file variable movie.swf?id=1. I have the movie.swf receive the id and pass that on to getmovie.php. This php file returns a variable URL back to the movie.swf. Now, I want movie.swf have the URL played in the original embedded object in the index.php file.
Why so difficult? To protect the URL of the actual content. Now, here's my code...
index.php
Code:
<script language="javaScript" src="scripts/swfobject.js" type="text/javascript"></script>
<div id="movie">
<span class="text1 wit">
<strong>Flash player is niet geinstalleerd</strong>
Om deze video te bekijken is Flash player 7 vereist. Wanneer de player niet automatisch installeerd kunt u via onderstaande link de player downloaden:<br />
<a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Download Flashplayer</a>.
</span>
</div>
<script type="text/javascript">
var so = new SWFObject("flvplayer.swf", "mymovie", "260", "215", "7", "#ffffff");
so.addVariable("autoStart", "false");
so.addVariable("volume", "true");
so.addVariable("id", "1");
so.addVariable("file", "movie.swf");
so.addParam("wmode", "opaque");
so.write("movie");
</script>
movie.swf
Code:
myVars = new LoadVars();
myVars.load("http://localhost/mediame/getmovie.php");
myVars._path = this;
myVars.onLoad = function(success) {
if (success) {
this._path.url = this.url
locatie = myVars.url;
_root.createMovieClip("v_mc", _root.getNextHighestDepth());
_root.v_mc.loadMovie(locatie);
} else {
trace("error loading page");
}
}
getmovie.php
Code:
<?php
$vars = "url=NL20_Chelsea_HetCentrum2.flv";
echo $vars;
?>
I know the problem is somewhere in movie.swf. Can anyone tell my how to play LOCATIE into the original MyMovie object in index.php?
I don't have the post the source of flvplayer.swf because everybody knows that..
Layer/stacking. How Would I Do This?
Hello,
I have 6 boxes on my stage.
This is what I'd like to do.
When a box is clicked it "grows" to fill the stage covering the other boxes, and then plays it's content. When it gets to the end of it's content it "shrinks" back.
This would happen with each box.
My problem is that the way I've tried to do it, the boxes don't cover each other. They grow under the other boxes!
The reason this happens is because I have my boxes in different layers so they they are under each other.
I'm not advanced enough in AS to do this the AS way as I've seen it done with gallery's.
Is there a way to do it my way but stick in some code to tell the movie that is clicked to move to the top?
This is my AS for the box:
PHP Code:
panel1.onPress = function(){
panel1.gotoAndPlay("grow");
}
I guess i'm after something to stick in there that will move "panel1" to a top layer. Is that possible?
The simpler the better if that's possible.
Thanks for any help.
Falling & Stacking
Hey all,
I'm looking to create a falling objects effect (colored boxes in this case) that when they hit the bottom of the stage begin piling up on each other. Once the stack gets to a certain point the bottom row sinks down to create a continued looping effect.
Any ideas on the best way to achieve this?
Much thanks!
Can't Keep Movieclips From Stacking
I'm trying to call movieclips from the library to the stage. To do so, I have a list of questions in a list. As a user clicks on the questions, the movieclip associated with it will be placed (at the top of a list) on the stage.
This part seems to be working. The problem is that all of the movie clips on the right side are being stacked on top of each other... instead of actually displaying in a list (one below the other).
I've attached an example image and the actionscript. Does anyone know what I can do?
ActionScript Code:
//Create listener object
var listListener:Object = new Object();
listListener.change = function () {
trace(aList.selectedItem.label);
};
//Add listener.
aList.addEventListener("change", listListener);
var listListener:Object = {};
var i:Number = 0;
listListener.change = function ():Void {
var newName:String = aList.selectedItem.label;
if (aList.selectedItem.data == 1) {
var mc = _root.attachMovie("dragged","mc"+(++i),i)
}
mc.inText = newName ;
if (aList.selectedItem.data == 2) {
var mc = _root.attachMovie("2","mc"+(++i),i)
}
mc.inText = newName ;
mc._x = 190 ;
mc._y = 5 ;
};
//Add listener.
aList.addEventListener("change", listListener);
Stacking Boxes
Hi i made this small flash program where your supposed to stack boxes. But right now I cant make it so that the other box will fit right on the 1st box. I believe theres something wrong with the collision detection. Here is the actionscript for box2 which falls right after box1 (supposed to land on it).
ActionScript Code:
onClipEvent(load){
velocity = 0;
gravity = 2;
friction = 0.01;
floor = 400;
}
onClipEvent(enterFrame){
velocity += gravity;
velocity -= friction*velocity;
_y += velocity;
{if(_y>floor){
_y = floor;}
}
if(this.hitTest(_root.box._x, _root.box._y, true)){
friction=1.00;
}
//or it's opposite:
if(_root.box.hitTest(this._x, this._y, true)){
friction=1.00;
}
}
can someone help me so the 2nd box will land on the top of the 1st box, not in the middle of it? here is my zip file also:
Interactivity VS Stacking
Hi,
an MC A is interactive, above is place an MC B who s not interactive.
PROBLEM : where MC B is placed, interactivity of the MC below (A) is disabled. How to avoid that ?
exemple :
http://www.tapiocadesign.com/interactEmpilement.fla.zip
Merci, Sylvain.
Stacking External Mc
Hi,
On my scene i have a button, and on press it calls an external swf.
this swf is covering the whole scene but the button underneath is still sensible(but not visible).
why?
I have assigned a _level to this external swf...
So how can I do so that the button underneath is not reacting on mouse over?
Hope I described my problem well...
Thx for helping
Stacking Blocks
I want to have a bunch of blocks fall from the sky like rain then stack up when they hit the floor of the stage. anyone know how I would go about this?
I'm going to start by creating the blocks and then jamming them into an array from there i can control their falling speed but I don't know where to start as far as the collision detection. I was initially thinking of using a hit test to stop the blocks when they hit each other but quickly realized that if they hit each other mid flight they would stop where they were
Stacking Buttons
I'd like to combine a slider with buttons. I did slider this tutorial:
http://www.kirupa.com/developer/mx/slider.htm
Now, I'd like to place buttons beneath the slider, so when I drag the dragger and in doing so roll over a button that lies beneath, that button will react. However, it seems that when the slider is active, the buttons don't react.
Furthermore: can I stack same-size buttons on top of each other, and still get the lower buttons to react when hovering over the top button? By having two same-sized buttons exactly placed over each other, activate both with 1 click? Any help much appreciated!
Falling & Stacking
Hey all,
I'm looking to create a falling objects effect (colored boxes in this case) that when they hit the bottom of the stage begin piling up on each other. Once the stack gets to a certain point the bottom row sinks down to create a continued looping effect.
Any thoughts on the best way to achieve this?
Much thanks!
Stacking Order...
Hi all,
I have quite a bit of experience with animation, but I'm a total noob when it comes to actionscripts. I'm currently doing a project at work and I want to learn how to change the stacking order of movies. The transition from one page to another involves the previous page being "wiped over" by the selected page. For example, if I'm currently at the "home" page, and selected "about us" page, all the elements on the home page will be covered by the about us page. So the way I want it to work is whatever page is selected should always be on top of the page you are currently on.
Would appreciate any help, tia.
Stacking Movies
Ok, I have a stack of movies (six, one ontop another) on the stage.
I'm trying to make it that when you mouse over a button elsewhere on the stage it makes #1 the top movie clip- and subsequently if clicked would play that #1 movie clip. THen a second button moused over would bring movie clip #2 to the top and ready to be played.
Any ideas on how to control this?
I've been messing with setProperties til I'm blue in the face, but you can always seem to see one of the clips ontop of the one that is getting played.
I attempted swapDepths- but this didn't seem to work either.
Suggestions appreciated.
-M
Stacking External Mc
Hi,
On my scene i have a button, and on press it calls an external swf.
this swf is covering the whole scene but the button underneath is still sensible(but not visible).
why?
I have assigned a _level to this external swf...
So how can I do so that the button underneath is not reacting on mouse over?
Hope I described my problem well...
Thx for helping
Stacking 2 Swf Files
I'm having an issue with two separate swf files on same page. they overlap and one should animate under the other (set up so by z-index of their respective divs). The bottom one however keeps jumping on top, covering what I want to be in front...
how do I handle this?
MouseListener With Stacking
Last edited by David_King : 2006-01-30 at 08:44.
Hello, fellow ASheads (hawhaw, I will never tire)
If (like me) you get sick of adding and removing listeners, getting old ones still running in the background no matter what you try, and general poo-ness. You may want to give this little bit of code a stab. I know, I know, I should write it as a class, but it just emerged from a project. Does what it sez on the tin:
Edit: which isnt immediately apparent... OK, so its basically a function called setMouseFunction() that you can pass various things to to help manage your mouselistener object. The mouseListener bit is the ONLY listener, but it calls everything in the stack built up by the aforementioned function. And the last bit is just a dummy function!
ActionScript Code:
/***************** setMouseFunction *******************
Sets a function for the mouseUp or the mouseDown.
Variables are as follows:
mouseEvent "Up", "Down"
myFunction a STRING of the function to call
myFunctionParams The Parameters to pass to it
stacking "push" -> adds event to the stack
"unshift" -> adds it to the start
"overwrite" -> overwrites all events
******************************************************/
MOUSE = new Object ();
MOUSE["downStack"] = new Array();
MOUSE["upStack"] = new Array();
//
function setMouseFunction (mouseEvent, myFunction, myFunctionParams, stacking) {
//
// Get the right stack:
myEventStack = MOUSE[mouseEvent.toLowerCase()+"Stack"];
//
// Add it to the stack:
if (stacking == "push") {
myEventStack.push ([myFunction, myFunctionParams]);
} else if (stacking == "unshift") {
myEventStack.unshift ([myFunction, myFunctionParams]);
} else {
myEventStack.splice(0);
myEventStack.push ([myFunction, myFunctionParams]);
}
}
// EXAMPLES:
setMouseFunction ("down", func, ["string a", {a:1, b:2}], "push");
setMouseFunction ("down", func, ["string b"], "push");
setMouseFunction ("down", func, ["string c"], "unshift");
setMouseFunction ("up", func, ["string d"], "push");
setMouseFunction ("up", func, ["string e"], "overwrite");
/****************** mouseListener *********************
The listener that calls the required functions, in
order. Simple
******************************************************/
editListener = new Object();
editListener.onMouseUp = function () {
for (s=0; s<MOUSE["upStack"].length; s++) {
var theFunction:Function = MOUSE["upStack"][s][0];
theFunction.apply(this, MOUSE["upStack"][s][1]);
}
}
editListener.onMouseDown = function () {
for (s=0; s<MOUSE["downStack"].length; s++) {
var theFunction:Function = MOUSE["downStack"][s][0];
theFunction.apply(this, MOUSE["downStack"][s][1]);
}
}
Mouse.addListener(editListener);
/**************** the real functions ******************
These are the functions that are called by the
mouseListener, could do Dragging, Dropping, etcetc
******************************************************/
// Haha, what a way to start it off, a fake one:
function func (myStr, myObj) {
trace ("myStr: "+myStr);
if (myObj) {
trace ("myStr: a:"+myObj.a+", b: "+myObj.b);
}
}
Dissect, and Disseminate!
DK
Alterationsupdated for Codemonkeys comments
altered the while loops on the listener to go in the correct order, :s
Stacking Order Of Movies
i have two movies that are running at the same time and i want to change the stacking order depending on which one is clicked on. they are obviously both viewable at the same time and i would like one to go on top of the other when clicked. any ideas? i've tried using movieclip.swapDepths(), but with no luck.
Stacking SWF Files In HTML.
Is there a way to have one SWF file display directly above another SWF?
I have both files running in a HTML page now I just need to find a way to layer them.
Thanks!
Layer/stacking Question
Hi,
I want to have 6 boxes on my stage (thumb nails lets say).
When you click on one it grows in size and covers the stage and other boxes (and plays its content). You click it again and it shrinks back.
Click another box, it does the same.
Here's my problem...
The way I've done it is have the boxes on stage (as movie clips) on different layers.
Each box has it's grow shrink tween.
Trouble is i cant figure out how to get them to cover the other boxes as each box is on a layer UNDER the other box!!
I need the box that's clicked to be on the top layer.
How your you do this?
Maybe I should post this in the AS forum.
Thanks for any help.
Stacking/Balancing Game
Hi guys,
Just a quick post to see if anyone has seen anything similar out there in terms of source files to Ferry Halim's Pig Game. I am making a similar style game, which should stack objects on button press and balance accordingly, with the stack collasping if the objects are not stacked properly.
Any help with this would be much appreciated.
Cheers,
James
Stacking Flash Layers
I want to display a text layer over 2 flash layers, i've set the first flash layer to transparent, so the second flash layer displays fine, i now want to put a 3rd layer that contains just text on top of this, does anybody know if this is possible?
Stacking Many Objects In The Stage
Im trying to make a slide show of many pics (sliding from right to left) but there is a problem. They wont fit in a straight line when stacking them in the stage. There is just not enough room to stack them all in, and then make the sliding! What can i do?
I have attached the sample but i haven't put it all to be working properly, i have just added the extra samples i wanted, so you can get an idea when the fitting is beginning to become a problem!
FormItems Stacking When I Add Component
Hi all,
I am using FlexBuilder 3 Beta 2, and am (relatively) new to Flex.
I have a custom component and am trying to add that into a form as part of a form item.
The issue is that when I include this component it messes up the entire form:
a) the component doesn't show up and neither does the textInput also in that formItem - so the entire formItem doesn't show up (no border appears)
b) the other form items (each with only a textInput) are stacked on top of each other.
But when I just take out the item everything shows up fine. This component is derivation of the Slider Class, and I haven't really overwritten any code.
I could hack it I'm sure but would like to find out what's going on. ???
Any ideas or tips anyone has would be greatly appreciated.
Thanks
Levels/Layer Stacking In AS3
Hi everyone,
I have action script set up to make some balls rotate on an elipse using Action Script 3. The code looks like this:
ActionScript Code:
var angle:Number = 45;
var originX:Number = 360;
var originY:Number = 200;
var radiusX:Number = 360/2;
var radiusY:Number = 32;
var steps:Number = 60;// Here you can declare how many steps a round trip should be made of
var speed:Number =3.1415/steps;
photo_mc.addEventListener(Event.ENTER_FRAME ,moveButtons);
// remember to vary this one like 0 for the first button 72 for second 144 for the third one and so on. of course only if you plan to use 5 buttons the formula is 360/numberofbuttons I added increments of ten to evenly space them all...
photo_mc._order = 360/5+10;
illustration_mc.addEventListener(Event.ENTER_FRAME ,moveButtons);
illustration_mc._order = 360/5+20;
interactive_mc.addEventListener(Event.ENTER_FRAME ,moveButtons);
interactive_mc._order = 360/5+30;
contact_mc.addEventListener(Event.ENTER_FRAME ,moveButtons);
contact_mc._order = 360/5+40;
home_mc.addEventListener(Event.ENTER_FRAME ,moveButtons);
home_mc._order = 360/5+50;
addEventListener(Event.ENTER_FRAME,controlButtons );
function moveButtons(e:Event) {
e.currentTarget._anglePhase = angle+e.currentTarget._order;
e.currentTarget.x = originX + Math.sin(e.currentTarget._anglePhase) * radiusX;
e.currentTarget.y = originY + Math.cos(e.currentTarget._anglePhase) * radiusY;
}
function controlButtons(e:Event) {
angle+=speed;// with 30fps and speed set to 1 ; the buttons will travel around in 12 seconds
if (angle>=360) {
angle -=360;
}
}
Trouble is, when the circles are moving to the right they should always be on the top, and when they are moving to the left they should always be on the bottom.
I think you would need to use levels to get this all to work right, but I am not sure quite how.
I also don't want to have to do this for every circle individually. I think what I want to do is say:
Quote:
When the x coordinate is moving left, level = 0
When the x coordinate is moving right, level = 1
Does anyone know how to do this? Or is there a more efficient way to get it to work.
Thanks!
-Rich
Stacking Order Issue
Hello, I have a random effect which I need to go BEHIND other elements on the timeline... this actionscript plays infront of everything. How do I get it to play behind other elements? See my problem here: http://www.buzzbbp.com/
amount = 10;
mWidth = Stage.width;
mHeight = Stage.height;
for (var i = 0; i<amount; i++) {
thisFlake = this.attachMovie("flake", "flake"+i, i);
with (thisFlake) {
_x = Math.random()*mWidth;
_y = Math.random()*mHeight;
_xscale = _yscale=_alpha=40+Math.random()*60;
}
thisFlake.yspeed = Math.random()*2+.2;
thisFlake.increment = -0.025+Math.random()*0.05;
thisFlake.radian = 1; //declare for actionscript 2.0
thisFlake.onEnterFrame = function() {
this.radians += this.increment;
//trace(this.radians);
this._x += Math.sin(this.radians);
this._y += this.yspeed;
if (this._y>=mHeight) {
this._y = 0;
this._x = 0+Math.random()*mWidth;
}
if (this._x>=mWidth || this._x<=0) {
this._y = 0;
this._x = 0+Math.random()*mWidth;
}
};
}
Form Aplication Stacking
Is it possible to have the root level screen play on top of the other screens rather than behind it?
I want to have a screen that stays on top of all the other screens that you look through to see the content of each screen (like looking through a door to see the room behind it).
I'm just not sure what to even look up to research so I can learn this.
I'm much more familiar with the Forms Application side of flash that the traditional side.
Stacking Order Of Duplicated MCs
I have a Flash piece that duplicates a random number of MovieClips (using duplicateMovieClip) and randomly places them. You can see it here:
http://litmusbox.com/staging2/
Trouble is, the duplicated MCs are being placed on top of other artwork. The duplicates appear on top of the text on the left side of the page. The original MC which is being duplicated resides on a layer that is under this text. However, its duplicates are being placed on top.
See my code attached. I'm not sure how "depth" applies here. From what I can tell, the only time one refers to "depth" is when you're duplicating a movie clip, and that movie clips that have not been duplicated have no way of assigning them depth. I've assigned the new MCs to have a depth of "itr-100". I'm assuming lower depth means lower stacking order. However, these duplicated MCs are clearly appearing on top.
Any ideas?
Attach Code
onEnterFrame = function () {
// create new block
thisName = "block" + itr;
duplicateMovieClip (_root.block, thisName, itr - 100);
// determine location of new block
_root[thisName]._x = (random (19) * 50) + 25;
_root[thisName]._y = (random (5) * 50) + 25;
}
Stacking Movie Clips
I am using Flash 8 and here is the presentation I am working on:
[L= [L=http://www.elanwebservices.com/clinical_discussion/presentation.html]]http://www.elanwebservices.com/clinical_discussion/presentation.html][/L] [L=http://www.elanwebservices.com/clinical_discussion/presentation.html[/L]]http://www.elanwebservices.com/clinical_discussion/presentation.html[/L][/L]
When you click on each slide button number, everything progresses along without problem. When you click a previous button, things still work fine. But when you start clicking randomly, especially buttons 4 and 5 and then back to 2 and others, the text from one slide begins to stick and show up on other slides and then all the text starts sticking so you have a mess.
How can I prevent this?
I have set all the movie clips of the entire presentation to a visibility of 0 on each slide except for the movie clips I want to display. For example, on slide 5 I have the following ActionScript:
var logo2 = new ImageViewer(this, 3, 572, 32, 193, 49);
logo2.loadImage("images/logo2.jpg");
var egfr_3 = new ImageViewer(this, 6, 40, 149, 350, 360);
egfr_3.loadImage("images/egfr_3.jpg");
// display references in front of the compass image
topDepth = 40;
slide5text_mc.onEnterFrame = function() {
this.swapDepths(_root.topDepth);
++_root.topDepth;
};
container_mc2._visible = 0;
container_mc4._visible = 0;
container_mc5._visible = 0;
container_mc7._visible = 0;
container_mc8._visible = 0;
container_mc9._visible = 0;
container_mc10._visible = 0;
references_mc._visible = 0;
slide2text_mc._visible = 0;
slide3text_mc._visible = 0;
slide4text_mc._visible = 0;
slide6text_mc._visible = 0;
slide7text_mc._visible = 0;
slide11text_mc._visible = 0;
The images are no problem. It's the slide text I converted into movie clip symbols that I am having trouble with.
How can I prevent the slide text movie clips from stacking up on each other?
Thanks in advanced for your expertise (something that I am lacking presently).
John
Changing Stacking Order
Hi there, first time ever on a forum so please forgive me.
I have an FLA with a section in it where I need to swap between images (one over the other and so on, which I have done using swap depth) what I want to know is if there is a way to make the transition from one pic to the other smoother by using alpha from 100% to zero, thus revealing the picture beneath.
Does anybody out there know how this is done.?
Stacking SWF Files In HTML.
Is there a way to have one SWF file display directly above another SWF?
I have both files running in a HTML page now I just need to find a way to layer them.
Thanks!
Multiple Xml Gallery Stacking... Can It Be Done?
I'm stumped... Does anyone know if it's possible to load 2 independent xml galleries into a single movie using 2 empty containers. See example (link below). What i'm trying to achieve should become clear? I imagine changing the content for the 2nd gallery but for now am pulling from the same library...
Thanks in advance – Dax
Source files:
http://catchymedia.co.uk/example.zip
|