Swapping A Dynamic Movieclip's Depth Beneath A Static Set Of Graphics?
Flash 8 - AS 2.0 Ok kiddies. I've been toying with AS and trig. and have a little wiggly worm that half-heartedly responds to the mouse just as I want. It's created by looping 30 times through a for loop and using attachmovie() like this. for(i=0; i<30; i++){ attachMovie("mcCircle", "mcCircle" + i, i, {_x:mx[i], _y:my[i]});} As you can see for their depths I have used the increment of the for loop. So I have 30 clips with depths from 0 to 29. On the other hand, the graphics which have been statically placed on the stage have these depths. instance7:-16352mcThought:-16355instance6:-16357mcCode:-16360instance5:-16362mcAural:-16365instance4:-16367mcVisual:-16370instance3:-16372mcHome_WF:-16374mcHome:-16377instance2:-16379instance1:-16382 What I need is to place the mcCircle clips underneath some of the objects on the stage. Imparticularly, the menu bar at the top of the stage and the logo at the bottom while staying on top of the background. I just want it to look like it's going behind these two graphics. I've tried a number of things and have ran out of ideas. By the way - the bottom of frame 27 of the actions layer has the code that is outputting the depths in the Output panel in Flash. Many thanks,John
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Dynamic Graphics On Movieclip
Here is another issue i am facing
Say i have 2 movie clip
contentmc (which is part of a template)
page1.swf
so i make contentmc load a page1.swf.
After the thing is loaded, the fla that has contentmc also has 2 options , painting mode and normal mode..
if the user clicks on painting mode, the user cant interact with page1.swf, if he is in normal mode, he can interact with the interactive elements in page1.swf such as movieclip buttons whatever...
but i realise that after i go into painting mode once, i cant seem to interact even if go back to normal mode.
currently i am using the following to control the paint:
function init():void {
paintSize=1;
paintColor=0x000000;
paintAlpha=1;
mc.graphics.lineStyle(paintSize,paintColor,paintAl pha);
contentmc.addEventListener(MouseEvent.MOUSE_DOWN, paintonMousedown);
contentmc.addEventListener(MouseEvent.MOUSE_UP, paintonMouseup);
contentmc.addChild(mc);
contentmc.mouseChildren=false;
return;
}
function paintonMouseup(e:MouseEvent):void {
contentmc.removeEventListener(MouseEvent.MOUSE_MOV E, paintonMousemove);
return;
}
function paintonMousedown(e:MouseEvent):void {
mc.graphics.moveTo(contentmc.mouseX, contentmc.mouseY);
contentmc.addEventListener(MouseEvent.MOUSE_MOVE, paintonMousemove);
return;
}
function paintonMousemove(e:MouseEvent):void {
mc.graphics.lineTo(contentmc.mouseX, contentmc.mouseY);
return;
}
is there anyway i can "re-interact" with the page1.swf without losing the paint?
thanks
Murtaza
Swapping Graphics
is there a way for an image to switch when the user drags it into a grid? for example-I have a 3-d shelf on the bottom-but when the user-puts in on the grid-I want it to show up as a straight line.
any ideas?
Graphics Swapping Places.
Hi all,
Im wondering if anyone could help me out here, I want to make praphics or images swap location, e.g. If I have 4 squares that are in a 2x2 box shape, I want to be able to select one sqaure then select another sqaure and make them swap positions, I would like this transition to be able to work vertically and horizontally.
Any help would be greatly appreciated as I am a newbee to actionscripting.
Cheers
Craig
Depth Swapping
Hi all. I have a question about a problem I'm having getting some action scripting to work right.
I have a main page that I use buttons with loadMovie commands to load outside .swf files into it as MC instances. I've had no problem getting depthswapping to work with the MC instances. When I click on one, it pops to the top of the others fine. But, when I click to load another, it doesn't seem to know what the currect value of my _level incrementing variable is. The new MC instance loads beneath the last window I clicked on to bring above the rest.
Here's the various code I'm using:
For the load button in the _level0 timeline:
on (release) {
//establish location for starting position of
//loaded MCs for cascading windows based on
//"target" value
target = target + 1;
if (target > 4) {
target = target - 4;
}
depth = "_level" + z;
z = z + 1;
loadMovieNum ("green.swf", z);
test = depth; //displays this value to test output field
}
This scripting increments the depth z and loads the green.swf to _levelz. There is an OnClipEvent in the green.swf that repositions the green MC instance based on the value of the target variable producing a window cascading effect when multiple windows are opened. This cascading works fine.
The green.swf is just a plain rectangular window with a window wide drag handle. The scripting on it is:
on (press) {
_level0.z = _level0.z + 1;
_root.swapDepths( _level0.z );
depth = "_level" + _level0.z;
greentest = depth;
startDrag ("_root.green");
}
on (release) {
stopDrag ();
}
Why would the depthswapping work fine from instance to instance of this MC, but when I load a new instance it appears under whichever window I happened to click on last?
I know this is a pretty detailed question to ask on a message board like this. This is just a little "how does it work project" I was messing with so I just have a couple files I've dummied up to work out the mechanics of it. I'd be happy to email anyone my source files to take a look at as my explanation of the problem might leave something to be desired.
Thanks for any and all help.
Depth Swapping
Here's the deal:
*I have four layers
Layer 1: Backround
Layer 2: Box 1
Layer 3: Box 2
Layer 4: Box 3
Box 1 is in the center, Box 2 is the back left, and Box 3 is in the back right.
If I click a button in box1, lets say [SwitchtoBox2] button, box 1 and box 2 switch places, but in an animation where 2 moves to the left and box 1 then goes where box 2 started from, then box 2 moves to where box 1 started from. So I can't use the On (Release) event, the depth switching has to be automatic. Any ideas?
Here is the Link
-Thanks
Help - How To Do Swapping Of Depth ?
Hi, Can someone help me!?
How can I press the Button1 and it will automatically increase the depth in the loadmovie(). (So I can display as many Popup in different depth using the loadmovie function)
Thankx..
Help With Depth Swapping Please?
Hello, I'm making a game where there are two objects falling from the top of the screen, and the one closer to the bottom need to be above the one closer to the top (they overlap you see) also, they move at variable speeds so they will occasionally have to swap and then may need to swap back depths.
depth swaping has ALWAYS confused me and if someone could give me an example or a link i would really appriciate it
Depth Swapping Help
is this site using the depth swapping method?
http://www.alycium.com/
I am trying to do the effect of having one MC move from infront of another MC to behind an MC just like they do on the Alycium site.
please help.
Thanks
Depth Swapping
is it possible to swap the depths of externally loaded movies? if so, what is the best way to do it?
thanks!
Depth Swapping
is it possible to swap the depths of externally loaded movies? if so, what is the best way to do it?
Depth Swapping
is it possible to swap the depths of externally loaded movies? if so, what is the best way to do it?
thanks!
Depth Swapping
is it possible to swap the depths of externally loaded movies? if so, what is the best way to do it?
Depth - Level Swapping
Hi people
Im trying to make a objects rotate around eachother.
I know I need to swap the depth levels.
I just need to get the z co-cords sorted?
but how do I find the depth of a MC?
ok I know I swap depths SO I suppose I could make a dummy MC to store it as a temp?
Are there other ways?
Thanks
Bazburg
=)
Depth - Level Swapping
Hi people
Im trying to make a objects rotate around eachother.
I know I need to swap the depth levels.
I just need to get the z co-cords sorted?
but how do I find the depth of a MC?
ok I know I swap depths SO I suppose I could make a dummy MC to store it as a temp?
Are there other ways?
Thanks
Bazburg
=)
Depth Swapping And _Y Property
I can't figure out what's wrong with this code, for some reason it just doesn't work. I'm trying to swap the depths of two movieClips when one MC has a greater _Y value than the other MC.
Here's the code:
<B>onClipEvent (enterFrame) {
if (_root.bad._x>_root.good) {
_root.bad.swapDepths (_root.good) {
}
}
}</B>
Rpg Maps... Depth Swapping?
I am working on a role playing game, final-fantasy styled.
I'm at the point where I'm designing the map system.
I'm wondering how I should proceed in order to be able to design it properly, effectively and accuratly. I dont have a problem with collision detection against walls that stops the character from moving. I'm woring about how to make the character behind and in front of certain objects.
The first way I found is to create a boolen zone and perform a subroutine. Whenever the character collides with this zones, the alpha effect of the character is set to 0, then when he leaves that zone, its set back to 100.
The problem is if he hides behind a table, he still goes transparent and it doesnt produce the right effect. This effect can be seen here : http://www.shade.ca/games/rpg/Map.html
The second solution seemed like the right one but I cant get it to work. It was to make a mask for every map and use this mask over the character+make the mask move as the background moves.. but it seems the mask is bound to the character and follows him around the scene.
The last solution seems to be depth swapping and working with horizontal stripes. Can someone help me through this?
Thanks a lot!!!
Depth Swapping Problem :(
Hi - Im trying to swap the level of a movieclip of mine using
anyMovieClip.swapDepths(depth);
but I can seem to to swap it to any other level than 1
I would like it to be on the second layer down (which I guess would be 2, but it always goes on top of everything else!
would anybody have any idea why this would be?
thanks alot for your help
Depth Swapping Or Somethin Like That
Here's the deal:
*I have four layers
Layer 1: Backround
Layer 2: Box 1
Layer 3: Box 2
Layer 4: Box 3
Box 1 is in the center, Box 2 is the back left, and Box 3 is in the back right.
If I click a button in box1, lets say [SwitchtoBox2] button, box 1 and box 2 switch places, but in an animation where 2 moves to the left and box 1 then goes where box 2 started from, then box 2 moves to where box 1 started from. So I can't use the On (Release) event, the depth switching has to be automatic. Any ideas?
Here is the Link
Depth Swapping Problem
Okay I have a project in Flash, and I want to make a realistic type of depth swapping, anyways does anyone know why this code isnt working?
function DepthSwapping(obj1,obj2)
{
if(obj1._y < obj2._y && obj1.getDepth() > obj2.getDepth())
{
obj1.swapDepths(obj2);
}
if(obj1._y > obj2._y && obj1.getDepth() < obj2.getDepth())
{
obj1.swapDepths(obj2);
}
}
and my call to the function is this:
for(var i=0;i<iEcnt;i++)
{
DepthSwapping(this,Map["Character"+i]);
}
Swapping Depth Of Two Overlapping Mcs
i dont really know where to start to code this but i would like to have movieclips that may overlap individually brought to the front on mouse over. I think it would involve swapping depths but i'm not sure how to do it.
Issues With Depth Swapping
Hello,
I continue to have an issue with a flash project. I am trying to swap depths with a movieclip so that the tween appears on top of other layers. The swapDepth works fine, but when returning to the main movie, the onRelease function no longer works.
The code is:
this.loudon_button.onRelease = function() {
duplicateMovieClip(loudon_button, "louder", 6);
loudon_button.swapDepths(louder)
loudon_button.gotoAndPlay("_end");
}
When returning from the MC to this I have tried removing the louder Movie, and swap depths back again. Neither work. When I click, the move becomes a placeholder, just another graphic.
Anybody know why the onRelease function no longer works? It still has the rollOver and RollOut functions working, but after clicking these don't work either.
Thanks,
Techmaniac
Swapping Depth Of MovieClips On Stage
Hey. I'm making a interactive Calendar. The Calender had to be resized and this that some information boxes were lost and I now have to get them back in. I made 2 test movieclips to test there work fine, but wen I play the movieclip "De Stichting ReVaBo" I see the movieclip "Meedenken?" above it. What i want is that if I play the movieclip "De Stichting ReVaBo" I don't want the movieclip "Meedenken?" above that & if I play the movieclip "Meedenken?" I don't want the movieclip "De Stichting ReVaBo" above that.
Does Anyone knows a solution?
Depth Swapping Getting Confused When I Use The Tutorial. Is There A Better Way In MX?
Hi there.
I've been following and working with a lot of tutorials on this site, and they are usually pretty good. There is one though, which I am only partially satisfied with. The results are not perfect, and can in fact cause a very unsightly glitch. First, I'll link you to the tutorial:
http://www.actionscript.org/tutorial...hs/index.shtml
Now I will link you to the site that I'm building:
http://www.drexle.com/
It's just what it looks like. You can create windows by clicking the icons on the "desktop" or by opening them via the little pull-out menu bar and I want these dynamically created windows to be able to swap depths when you click on the blue bar at the top of said window.
My problem is that when I follow the directions supplied by that tutorial, one of two weird things often happens. The less bad thing is that when you click on one window to bring it forward. Let's say you have three windows open at once and you click on the lowest window, it will send the one that was on top to the very bottom instead of simply bringing the one on the bottom to the top. But wait, it can sometimes get even worse! You see, sometimes, clicking on one of the windows brings it to the second highest depth instead of the highest depth. This is very bad for obvious reasons... it doesn't help to keep the window you want to view trapped beneath some other window.
Is there a better way to change depths in MX? I'm very frustrated with this.
Can You Think Of An Easy Way To Convert This To AS3? '3D' Depth Swapping.
ActionScript Code:
swapDepths(Math.round(this._xscale) + 100);//this is for a pseudo-3D effect, the standard cliche carousel.//It keeps things visually layered properly.
... thoughts?
So, I guess the obvious first thing is that _xscale is now scaleX, but the bigger question is - now that we can't arbitrarily set things to non-existent depths, this needs to be much more precise.
Ideas? I'm like [---] far from just jamming a bunch of empty sprites in there.
edit: Got it working with the following:
ActionScript Code:
private function setDepths(e:Event = null):void{ _items.sortOn("scaleX", Array.NUMERIC | Array.DESCENDING); for(var i:int = 0; i < numOfItems; i++) { setChildIndex(_items[i], numOfItems) }}
Swapping Depth Problems, Urgent
Hi,
I?m making a commersial banner for a poker company online, and what?s supposed to happend is that the dealer grabs cards from his deck and give two to each three persons on the table. Next he swings a card up in the air which becomes really big, and the news is on that card. My problem is that when one card after anoter dissapears from the top of the deck they land under the players? hand. I?m talking about the six cards that are not news now. When the card with the news on is sent up it goes underneath everything else so I figured I need a swapDepths function, but all the tutorials explain only the swapDepths function with a mouse action to set it off, but I need some sort of onEnterFrame because the user shouldn?t need to interact. Please help!
I?m sorry, but I can?t post the .fla file because this is a project I?m doing for a major firm, and I?m not allowed to give anything to anyone else.
Dynamic ComboBox Is Giving Negative Depth To Attached MovieClip?
Hi guys, I've got this new problem where I'm trying to remove a container movieclip i've attached the first time the function is run, but I try to remove it and replace it again, but the second time around it gets a negative depth and all goes to hell. any ideas??
Code:
function populateBasket(){
trace("B4 REMOVE:" + basketRows.loader.container.getDepth());
basketRows.loader.container.removeMovieClip();
trace("AFTER REMOVE:" + basketRows.loader.container.getDepth());
basketRows.loader.attachMovie("~container","container", 0);
trace("AFTER ATTACH:" + basketRows.loader.container.getDepth());
for(i=0;i<items.length;i++){
var myMC = basketRows.loader.container.attachMovie("~basket_row","row" + i, i);
myDropDown = myMC.cbcontainer.attachMovie("ComboBox","qtyCB", 0);
myDropDown.setSize(43,22);
myDropDown.addItem({label: "1", data: 1});
}
};
populateBasket();
mybtn.onPress = function(){
populateBasket();
};
output when swf loads:
B4 REMOVE:undefined
AFTER REMOVE:undefined
AFTER ATTACH:0
output when I press the button:
B4 REMOVE:0
AFTER REMOVE:-32769
AFTER ATTACH:-32769
Swapping A Movieclip On The Fly
Hi all,
I currently have a game where the user gets to choose the type of horse he wants to ride. The way I have it structured so far is that each horse is it's own movie clip with the animation and code inside of that. The horse currently resides on the main timeline. Basically what I'm looking to do is swap out the horse movieclip with whichever horse the user decides on in the game. It would be the exact same functionality of clicking on the swap button in the properties panel because I need to keep the same instance name.
Anyone out there done this before?
Dynamically Swapping A Movieclip...how?
hi
In a flash animation (actually it's a report, but's it's animated so i call it an animation) i have a situation where i have many pages, grouped in chapters (naming conventions) with each page having a number of "figures" (graphs, equations, etc) on them. I have two combo boxs, one to choose between what chapter you want, and one to choose what page of the current chapter.
so, the text is a movieclip named "text_c1_p1" where the c1 determines what chapter [so c1 is chapter 1, c2 is chapter two, etc] , p determines what page [same thing as with the chapter] with an instance name of "text"
and the figures are also movieclips named "graph_c1_p1_1" , instance name "figure1" where the the last number determines what number figure it is
I want it so that when you change the chapter or page, the text and figures will swap with the version corresponding to the chosen chapter or page.
Say you change to "chapter 1, page 3" have a script saying
swap "text" with text_c1_p3
(same for the figures) and for the new text to retain the instance name "text".
First of all is this possible? and if so, how?
thnx for help
Dynamically Swapping Symbols In A Movieclip
Hey guys,
What I'm trying to do here is dynamically change a symbol displayed in a
movieclip based on the value of a registry key.
I created a movieclip called customer_logo, which has five keyframes, each
with a different image. When the registry key "LogoChoice" is valued at 1,
I'd like the first frame of the movieclip to show. When the key is valued at
2, I'd like the second frame to show, and so on. The instance name of the
movieclip on the stage is "logo."
Here's the code I put in my actions frame on the stage.
if (LogoChoice==1){
logo.gotoAndStop(1);
}
if (LogoChoice==2){
logo.gotoAndStop(2);
}
if (LogoChoice==3){
logo.gotoAndStop(3);
}
//this will continue for however many other frames there will be in the
movieclip
There are also stop commands (ie. Stop(); ) in each frame of the movieclip.
When I test this code, however, just the first slide of the movieclip
appears, no matter what the registry key is. I'm using the .swf file in
conjunction with MultiMedia Builder, and I've tested my method of calling on
the registry, and it works. It seems that my problem is with the lines
"logo.gotoAndStop();" but I don't know what I'm doing wrong.
Thanks in advance!
-Chris
Movieclip On Top, And Swapping Movieclip
I have a symbol on the stage that I'm using as a custom cursor.
The two problems I have are listed below:
1. I need the custom cursor to be above everything. At the moment it is below the box that is on the screen.
2. I want the custom cursor movieclip to change, when I'm dragging the movieclip (dragThis).
Regards,
Glen Charles Rowell.
Code:
import flash.ui.Mouse;
import flash.events.MouseEvent;
import flash.net.navigateToURL;
import flash.net.URLRequest;
stage.addEventListener(Event.ENTER_FRAME, moveMouse);
function moveMouse(Event) {
Mouse.hide();
cursor.x = mouseX;
cursor.y = mouseY;
}
var board:Sprite = new Sprite();
stage.addChild(board);
board.addChild(dragThis);
board.graphics.lineStyle(1,0);
board.graphics.beginFill(0xCCCCCC,0.7);
board.graphics.drawRect(0,0,200,300);
board.graphics.endFill();
board.x = 100;
board.y = 10;
dragThis.x = 50;
dragThis.y = 50;
dragThis.addEventListener(MouseEvent.MOUSE_DOWN, startMove);
function startMove(evt:MouseEvent):void {
stage.addEventListener(MouseEvent.MOUSE_MOVE, pointMove);
}
function pointMove(e:MouseEvent):void {
dragThis.x = goodX(board.mouseX);
dragThis.y = goodY(board.mouseY);
e.updateAfterEvent();
}
stage.addEventListener(MouseEvent.MOUSE_UP, stopMove);
function stopMove(e:MouseEvent):void {
stage.removeEventListener(MouseEvent.MOUSE_MOVE, pointMove);
}
function goodX(inX:Number):Number {
if (inX < 0) {
return 0;
}
if (inX > 200) {
return 200;
}
return inX;
}
function goodY(inY:Number):Number {
if (inY < 0) {
return 0;
}
if (inY > 300) {
return 300;
}
return inY;
}
Swapping Dynamic JPGs
I'm building a band site in Flash MX. I have an area on the page where I will have a blank movie clip that I want to pull jpgs from a folder on the server. Here is the tricky part (well for me at least). I want the image to change to another image in the folder every 20 secs. I need the movie clip to just constantly be looping through the images in the folder swapping them with another every 20 secs. How do I do this?????
Dynamic Symbol Swapping
I need to make an image gallery for a web site. The site will contain approx. 60 small images that will link to their larger counterparts (the enlarged image will appear next to the thumbnails, as a transparent to opaque motion tween.)
Is there a way to create one motion tween (i.e. a tween containing a placeholder image symbol that would change from transparent to opaque)that all 60 images can call on when it's thumbnail is clicked (i.e. the thumbnail's larger counterpart will replace the placeholder image symbol)? Any suggestions? I'm pretty new at this and have spent hours trying to figure this out. HELP!!! Thanks
Can I Underline Static Text In A MovieClip?
I have created a movieClip that is just a bunch of text that will scroll in a scrollPane. I have got that to work. Now I want to create links with some of the text, that too works fine. Now I want to underline the text that represents the link. Should be easy by my reckoning, but I can not figure it out. I do not wish to redo the whole twelve movieClips in dynamic text using HTML if I can help it. Any ideas?
Joe Shultheis
Dynamic Text Variable Swapping
Hello, I load text into a dynamic text box with a scrollbar without a problem. The first variable that the text box calls is myVar1. I have next and previous buttons that I would like to add and decrement myVar's. I need some guidance on performing this action. Anyone up for it? Much help is appreciated.
Here is my FLA and Text file with the variables inside.
http://www26.brinkster.com/wirez/_KL/
Thanks again.
Swapping Dynamic Text Fields
Hello all. I currently have five buttons across the page, underneath of which sits a dynamic text field. I want to make it so when each button is clicked, the dynamic text field switches to the correllating field to that button, though remaining in that place. How is this done, or is it done at the end where the xml data feed is? (or whatever is best to use!)
Cheers
- Dilby
Dynamic Image Index Swapping
Im dynamically loading external images via an XML file and creating 4 scrolling image galleries on one screen. When the user scrolls over any image, the scales are tweened and everything works...except one thing. I need the individual images to come to swap indexes to 0. I've tried swapChildren, swapChildrenAt, setChildIndex, etc.. but i've come to find out that when tracing: event.target.parent.getChildIndex(event.target); I get an index number of 0 for every image, therefor, nothing can be swapped to the top. What am I missing here?.. Heres a code excerpt:
ActionScript Code:
for(var i:uint = 0; i < xmlData.logos.pic.length(); i++)
{
thumbLoader = new Loader();
thumbLoader.load(new URLRequest( xmlData.logos.pic.thumb[i]));
thumbClip = new MovieClip();
thumbClip.logoValue = logoValue++;
thumbClip.addChild(thumbLoader);
thumbClip.addEventListener(MouseEvent.MOUSE_OVER, overThumb);
thumbClip.addEventListener(MouseEvent.MOUSE_OUT, outThumb);
thumbClip.addEventListener(MouseEvent.CLICK, showBigImage);
//TweenLite.to(thumbClip, 2, {alpha:.5});
thumbClip.x = 95 * i + padding;
thumbClip.scaleX = thumbClip.scaleY = Math.random()* .4 + .9;
thumbClip.rotation -= Math.random() * 20 + 350 ;
logoHolder.addChild(thumbClip);
}
and my listener:
ActionScript Code:
function overThumb(event:MouseEvent):void
{
trace(event.target.parent.getChildIndex(event.target));
TweenLite.to(event.target, 1, {scaleX: 1.3, scaleY:1.3});
event.target.parent.swapChildrenAt(0, event.target.parent.getChildIndex(event.target));
}
Thanks in advance...
Movieclip Load Location And Static Variables
Hi
When I use the "loadMovieClip" it actually loads the (0,0) point of the new movie, to the center of the clip... is there any way to go around it beside changing the movie itself and playing with the _x property?
and another question...
is there a way to keep a static variable for all the frames? right now Im using dynamic text and modify it. but I bet I just missed the right way to do it.
Thanks in advance,
Niva
Mask Using Movieclip.graphics?
i have an mc with a design created on the stage. I am trying to create a circular mask that will "reveal" the design in the mc. So far i am working with something like :
// mc & ang are public vars
Code:
private function addedMC(ev:Event):void
{
this.addEventListener(Event.ENTER_FRAME,doCircle)
}
private function doCircle(ev:Event):void
{
//the design to be masked
var c:MovieClip=this.getChildByName("c") as MovieClip
c.mask=mc
var line:Graphics=mc.graphics as Graphics;
var toX:Number=Math.cos(ang)*300;
var toY:Number=Math.sin(ang)*300
line.beginFill(0,1)
line.moveTo(0,0)
line.lineStyle(1,0,1);
line.lineTo(toX,toY)
line.endFill()
ang+=.01
}
the issue is that when i comment c.mask=mc, i can see the fill doing the circular motion i want, but upon utilizing c.mask=mc, the design does not show at all...any thoughts on why the mask is not working?
When Clicking - New Movieclip With Graphics
Hi
I just made a background in Flash which is a graphic symbol.
it's orange from start.
when clicking on a button I want it to change, to turn blue for example.
Let's say I have two buttons and two backgrounds; orange and blue.
My plan is to put these two graphic backgrounds into movieclips, layer 1, and then add a script to each button.
When clicking on the blue button, the blue background/graphic is loaded.
Does anyone have the a good script for this?
best regards,
Skaatar
Graphics Over Movieclip Kills Interactivity?
Here is an i am facing
Say i have 2 movie clip
contentmc (which is part of a template)
page1.swf
so i make contentmc load a page1.swf.
After the thing is loaded, the fla that has contentmc also has 2 options , painting mode and normal mode..
if the user clicks on painting mode, the user cant interact with page1.swf, if he is in normal mode, he can interact with the interactive elements in page1.swf such as movieclip buttons whatever...
but i realise that after i go into painting mode once, i cant seem to interact even if go back to normal mode.
currently i am using the following to control the paint:
function init():void {
paintSize=1;
paintColor=0x000000;
paintAlpha=1;
mc.graphics.lineStyle(paintSize,paintColor,paintAl pha);
contentmc.addEventListener(MouseEvent.MOUSE_DOWN, paintonMousedown);
contentmc.addEventListener(MouseEvent.MOUSE_UP, paintonMouseup);
contentmc.addChild(mc);
contentmc.mouseChildren=false;
return;
}
function paintonMouseup(e:MouseEvent):void {
contentmc.removeEventListener(MouseEvent.MOUSE_MOV E, paintonMousemove);
return;
}
function paintonMousedown(e:MouseEvent):void {
mc.graphics.moveTo(contentmc.mouseX, contentmc.mouseY);
contentmc.addEventListener(MouseEvent.MOUSE_MOVE, paintonMousemove);
return;
}
function paintonMousemove(e:MouseEvent):void {
mc.graphics.lineTo(contentmc.mouseX, contentmc.mouseY);
return;
}
is there anyway i can "re-interact" with the page1.swf without losing the paint?
thanks
Murtaza
Movieclip Depth.
I don't want to have to set the depth of new movies. I just want it to be tacked on to the end, in other words, placed at the highest set depth plus one. How can I do this?
Movieclip Depth
Hiya,
may be missing something obvious, but can I read a attachched movieclip's depth? I need to sort the stacking order to get a 3d effect, but I need to compare depths & distances before i can tell whether or not to use swapDepth.
TIA
Keith
Movieclip Depth
I need to set the depth of a movie clip above the rest. Is there a way to do this right off the bat? (not using swap)
My setup:
I'm doing a duplicateMovieClip like the water effect by ef-Hans available here on flashkit.
but when the the dup happens it occurs above everything else on the timeline. So i need it to occur below one movieclip which includes buttons and text.
Is this clear?
Thnx
Movieclip Depth
Hi,
I have 7 duplicated movieclips with the instances:
home, profile, welcome, about, updates, flash and games.
I also have an Array with 7 values:
Order = new Array("home","about","welcome","updates","profile" ,"games","flash")
The 7 values in the Array are the same as the 7 movieclip instances. What I want to do is order the movieclips in the order of the Array. So that Order[0] is on top, and Order[6] is on the bottom. I know this'll probably involve swapdepths but how do i do it?
Depth Of MovieClip
there is some confusion related to the depth of movieClip the code written below is working fine, means duplicating the movie clip 98 times,
onClipEvent (load) {
this.attachMovie("block","block1_mc",1)
for(i=2;i<100;i++){
block1_mc.duplicateMovieClip("block"+i+"_mc",i)
mymc=eval("block"+i+"_mc")
trace(mymc)
}
}
but if i change
this.attachMovie("block","block1_mc",1)
to
this.attachMovie("block","block1_mc",10)
the code above does not duplicate after depth 10,
please help me to come out from this confusion.
[F8] Movieclip Depth
Is there a way to change the depth of mcs created using attachMovie to a depth that is lower than something already on the stage?
MovieClip Depth Help
I've had this game in progress for a couple weeks now and I'm having trouble getting the game border to be at a higher depth than the game pieces. The gameboard was just placed at the highest layer and the game piece movieClips are being instantiated from the library using attatchMovie. I attatched the swf so you can get a visual. Any help is appreciated.
Movieclip Depth Bug
When placing a movieclip with a textfield behind (with lower depth) another movieclip with a bitmap, the movieclip with the bitmap should cover the textfiled completely right? Well, it only covers the textfield 96%, the textfield kind of interferes with the bitmap, its possible to kind of see the shape of the text through the bitmap.
When using the "low" quality setting the problem dont happen. I figure there is a bug in the smooth operation in the rendering process.
Everything was created dynamicaly with actionscript 2 (flash 8). The textfield is with embedFonts=true and the bitmap was created with BitmapData.
Anybody seem similar problem? Any comments apreciated...
Thanks
Mario
Edited: 02/19/2007 at 02:30:51 PM by Marcanti
Set The Depth For A Movieclip
How can I set the depth for a movieclip.
Actually I want my popup to always come on the top and there is some problem using swapdepth.
Would it help setting the depth of movieclip to be something like 10000??
|