ActionScript 2.0 :: [CS4] Create Empty Movieclip And SwapDepth
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
Similar Posts:
Mar 9, 2009
I tried searching for this, but couldn't find exactly what I am looking for.
I want to create a new instance of a blank movieclip using actionscript and name each instance differently.
View 6 Replies
Jun 11, 2010
trying to make an empty movieclip, but after compile the file i press ctrl+L to see the objects instances on stage, it shows only Level #0: Frame=1. how can I make myMC movieclip???
package {import flash.display.Sprite;import flash.display.MovieClip; public class drawCurve extends Sprite { public function drawCurve() { var myMC:MovieClip= new MovieClip(); addChild(myMC); myMC.name="MC"; }}
[code].....
View 2 Replies
Mar 21, 2004
On frame 1 new fla and I type the following code:
[AS]
createEmptyMovieClip("clip1",0);
clip1.createEmptyMovieClip("clip2",1);
[/AS]
I have tried over and over again to get this to work but it won't! I want to create an empty MC and then create anoth MC within the first!
View 5 Replies
Jan 27, 2009
i am trying to load a list of jpgs in to flash using as 3. eventually i am going to tile them etc. but right now my script goes through my for loop and just replaces the image i previously loaded... in as 2. i of course would change the name and depth of these images as i loaded them but i am of course not using createEmptyMovieClip or loadMovie etc.. so i am a bit lost..
[Code]....
View 3 Replies
Oct 9, 2005
I was wondering how you could move an empty movieclip that is set as a mask?
PHP Code:
this.createEmptyMovieClip("mask", 1);
mask.setMask(square);
[code]......
View 8 Replies
Jan 15, 2007
i'm trying to attach/create a new empty movieclip to load an image into each time my function fires (function has setInterval on it).so far, my code works in that the first time it creates the empty clip and loads the pic in it, measures the loaded bytes and alpha fades in when it's loaded.when the function repeats however, the newly created clip is either not there or i am not referencing it correctly, or there's some problem with the way i'm trying to do this.I don't want to delete the previously attached clip since i'm alpha fading the new one to 100 on top of it.kind of a simple crossfade that way.here's my code:
Code:
startSlides=function(){
this._parent.largePic.createEmptyMovieClip("clipp"+i, 5);
this._parent.largePic["clipp"+i]._alpha=0;[code].....
View 8 Replies
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
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
Mar 21, 2004
OK frame 1 new fla and I type the following code:
[AS]createEmptyMovieClip("clip1",0);
clip1.createEmptyMovieClip("clip2",1);[/AS]
I have tried over and over again to get this to work but it won't! I want to create an empty MC and then create anoth MC within the first!
View 5 Replies
Nov 15, 2004
know how I can resize the stage to match the size of an external graphic/movieclip which is loaded into an empty movieclip,
View 3 Replies
Nov 11, 2004
I am loading an external swf into an empty movie clip by use of a button.The movieclip is a sort of menu that begins with an animation of the menu opening, there are multiple different movieclips I am using with this format.What I am trying to accomplish is this.When another button is pressed, I want the movieclip (regardless of which one is loaded) to either:Go to a specific frame and play a closing animation within the movieclip, BEFORE a new movieclip is loaded. OR reverse the animation BEFORE loading new movieclip.Since there are 4 or 5 buttons all loading different clips, I need all the buttons to work this way regardless of which movieclip is loaded.
View 3 Replies
Feb 7, 2011
I have an XML variable with a bit of content and I want to completely overwrite that content.I thought by calling "new XML" that I'd have an empty variable and could replace the content.Is that not the case?If it's not what method would I use to overwrite the variable content?
View 11 Replies
Oct 28, 2009
I have a timeline and want to create an empty space to put in an additional timeline animation in the middle.
View 4 Replies
Dec 11, 2009
I am trying to create and delete empty movies that I can load external .swfs into. While the below works if I get rid of
var currentLoaded = "my_loader" + myNum;
I can't work out how to dynamically name the empty movies, as the below just comes up with errors. I'm pretty new to AS3 and stuck. Any ideas?
var myNum = 0;
var currentLoaded = "my_loader" + myNum;
function loadNew (myNum){
[code]....
View 1 Replies
Jun 18, 2005
I have an Array Object called extData_arr, that contains data read from a database. Using this data, I'd like to populate my subMenu MovieClips appropriately. I can elaborate on the format of this array if required but basically the problem is this. Now this line seems to work and displays correctly as I expect
status.text = status.text + n + " : " + i + "
";//tracing
but for some reason, on the following line where I try to create empty Clips, flash just doesn't recognize the value of i and therefore refuses to create the clips. Does anyone know why?
[Code]...
View 3 Replies
Jul 13, 2004
c_mc2 = _root.createEmptyMovieClip("main_text", 4);
c_mc2._x = 0;
c_mc2._y = 359;
If i use this method to create an empty clip and then once i am done with the clip i unload the movie which was previously in it, what happens to the clip. Do i have to re-create it if i want to reuse the empty movie clip again with the same name?
View 6 Replies
Aug 5, 2009
I found lots of links to creating 1 moveclip dynamically but not to create multiple move clips. I am trying to create 10 empty movieclips dynamically, but I cannot seem to get my script to work. This is what I came up with and does not work:
var i;
for (i=0; i<10; i++) {
var myMC["myMC"+i]:MovieClip = new MovieClip();
myMC["myMC"+i].name = "mc"+i;
addChild("mc"+i);
}
Why this does not work/how do I make it work?
View 2 Replies
Feb 18, 2009
I am trying to make a photo gallery in as3. I found a tutorial for a scrolling thumbnail panel and found how to convert it to as3.
What I would like to know is how do you get the larger image to display when the user clicks on a thumbnail in the scrolling panel? (I have 8 thumbnails, and 8 larger images).
ActionScript Code:
panel.addEventListener(MouseEvent.MOUSE_OVER, panelOver);
function panelOver(event:MouseEvent):void {
[code]....
View 7 Replies
Jul 3, 2007
I'm trying to have a button rollover create an empty MC (board_loader) that will load a swf in itself (board1.swf) and follow the mouse around for the duration of the rollover. I know its not much, but here's what I have so far[code]...
View 4 Replies
Aug 20, 2008
Ok so basically I have a button that will create a empty movie clip and attach some things into that clip When the button is first clicked. My problem is that when the button is clicked a second time. The clip will reload itself and I need it to duplicate. So if I hit the button 5 times, there would be 5 items on the stage.Here is what I'm doing.
Code:
hold1.onPress = function(){
trace("your hit me");
[code].....
View 1 Replies
Nov 30, 2009
How can I create an empty movie clip where I can set It's name plus a number?
View 2 Replies
Apr 13, 2012
I am trying to migrate as2 to as3 code.The normal solution to my problem involves using the first parameter of the createEmptyMovieClip() as the name of your movie clip. In several instances I have a dynamic value for this first parameter- so my question is How should I go about doing this?
//my code
function someFunction (){
loader_mc = this.createEmptyMovieClip("text"+value, value);[code]......
View 1 Replies
Jun 22, 2009
I'm new here and it's been a while since I've used AS I'm trying to create a MC inside another MC
[Code]....
The code mostly comes from a tutorial I found where the demo works fine. Just my code seems to not stand up to the test
View 4 Replies
May 5, 2006
I tried "attaching" a custom context menu on the 'picture' movieclip (empty movieclip that holds externally loaded pics) but with no luck.
View 1 Replies
Feb 2, 2006
I'm trying to dynamically create an empty text field with as at 560px wide, fill it with a bunch of text (one line) and continuously scroll it from left to right using hscroll and setInterval. I've read all kinds of specs about createTextField and hscroll but I can't get it to work. I ouputted the mytext.hscroll value and it's always at 0;
Code:
_root.createTextField("mytext",10,150,281,560,10);
mytext.multiline = false;
mytext.wordWrap = true;[code]....
View 5 Replies
Feb 21, 2007
I have a movie clip that is dropped onto my main scene, and I have the AS below as the frame's AS.
The concept is simple: Create dynamic empty movieclips, position them, fill them, make them clickable. The code under "//////////////////////////////////////Code below here doesn't work" isn't working. The code worked fine when attempting to do this on my main scene, but I ran across some interface issues that caused me to put them into anorther MC. I understand that I only included the code for the first button, right now I would like to get at least one working.
Code:
for(var i=0; i<=43; i++){
iDepth = i + 200;
this["z_Brickmc_"+i] = this.createEmptyMovieClip("zBrick"+i+"_mc", iDepth);[code].....
View 6 Replies
Mar 3, 2004
I'm trying to create and expand a simple empty box (hairline perhaps) with an Action script to create the same effect as a shape tween. Why not shape tween?! Well I've tried that and the shape tween messes up the rendering. see picture....
View 14 Replies
Feb 23, 2009
I have the following code with wich i create an empty movie clip.
I have a MovieClip in the library named MyMC. How can i add the MC present in the library to the empty movieClip? i Get error # 1067[code]...
View 1 Replies