ActionScript 2.0 :: FMX Attachmovie - Duplicate A Movieclip Into The Root??
Dec 29, 2002
what i want to do is to duplicate a movieclip into the root, but the movieclip i want to duplicate, isn't in the root, instead it is in another movieclip.get it? i hope thats clear...so i heard that the duplicateMovieClip function only works if both movieclips are in 'this', and so i'm guessing i use the attachmovie function. But it doesn't seem to work, how to use this function the way i want it to? i've looked at the flash help thing but its not exactly what i want...
Ok having some issues with this:I create a new movieclip:this.createEmptyMovieClip("setClip1", this.getNextHighestDepth());and then I attach a bunch of the same movieclip from the library to my new clip:in a for loopthis.setClip1.attachMovie("dashLine","dashLine"+i, this.setClip1.getNextHighestDepth());This is all working fine. BUT, I try to duplicate this movieclip:_root.setClip1.duplicateMovieClip("setLeft1",thisgetNextHighestDepth());And it seems to work - I can trace the _x/_y values and such so it sees my new clip but nothing shows up. It's just blank.So my question I guess to start is this:When you useduplicateMovieClip, does it bring with it all of the attached movieclips as well or does it not include the attached clips as well?
i am working on project where i hv to create image gallery. Then i can drag any image from this gallery to some other containers. The image gallery parts prototype is completed and its working fine.bt i am facing the problem of dragging the image. The .as and .fla files are included. In the fla file please fill the array with as much imagesname as you can to check hw it works.Nw the Problem is that i wont able to duplicate my movieclip(thumbnail) on to root?
I'm working on a timeline system which you can see here:http:[url]....I am generating each flag using attachMovie to duplicate a TextFlagMC over and over, giving each one a date and blurb.If there are a lot of them on screen they often overlap.I wrote this code on the 1st frame of the TextFlagMC so that each flag will create itself into TopShelfMC, a shadowed container MC on a higher layer:
onRollOver = function(){//Pop flag ontop of all others TopShelfFlag = _root.Timeline.TopShelf.attachMovie("TextFlagTopSh elf", "TextFlagTopShelf" + FlagNumber, + FlagX)[code]....
and to turn it off when we rollOut, I have this code on the 1st frame of the TextFlagTopShelfMC that just got loaded in the TopShelf layer:
onRollOut = function(){//Pop flag ontop of all others unloadMovie(_root.Timeline.TopShelf["TextFlagTopShelf" + FlagNumber]); }
it works.but often times not if you roll from one button right to another.
I want to duplicate a textbox and still have it in the root, thats why I don't use duplicateMovieClip.. can anyone tell me a cool method on how to duplicate or make input boxes, that actually have seperate var names?
I was thinking making a loop, and the set var name would be "ord" + i... anyone follow? Sorry for being so point
My problem is that when I click the letter movieclip it does create the duplicate as it should and it starts to drag the duplicate mc. However, when I release the clip it doesn't stop dragging? I realized that if I put onMouseUP event instead of onRelease it actually does stop dragging when I release the mouse. I would, however not like to use the onMouseUP event if possible.
I'm sorry if this post breaks forum conventions, but I searched and didn't find a solution in past posts.
I'm writing a function that highlights components of the animation I've created.
It does this by creating a white box on top of the entire stage, tweening it's alpha value from 0 to 80, and creating a new instance of the movie clip to be highlighted on top of that white box.
I run into a problem when I need to highlight components that are movie clips nested within ones on the top/root level.
When I duplicate instances of nested movie clips, they just exist within the movie they were nested in.
I want to pull those duplicated, nested movie clips into the root area so it rests on top of that white box I just mentioned. How do I take a nested movie clip and pull it out of it's parent onto the top/root level?
I'm trying to use attachMovie to attach a movieclip to another movieclip. Both the movieclips are set up as buttons (ie. they have _up, _over, _down, _hit states). The problem is if I define event handlers for both mcs, only the event handler on the parent clip works.
For some reason, the same code works now, without any problem at all. I don't know what happened, or why, but I no longer have this problem Here's the original post: To put simply, I created a MovieClip, put it with addChild() to stage, and when I tried to call this piece of code:
How do you align a dynamic movie clip position with another movie clip which is in the root stage? I tried to get the mc in root x,y position, but the starting point of the class that loads the dynamic MC does not seems to be accurate. (Meaning at the root stage, the x,y is 0,0 but at the dynamic class, its somewhere like 100,20 for the browser area (and it actually vary base on the browser size))
**the other classes I used to run the custom classes below, I have it added this MC to stage
var blocker:stageBlocker=new stageBlocker(); this.stage.addChild(blocker);
Below is the dynamic MC. Should I not add it to its own "stage"?
public class stageBlocker extends MovieClip { private var blocker:MovieClip= new MovieClip(); public function stageBlocker():void {
I have to load one movie clip symbol (with linkage identifier specified) in another swf. Is this possible? Say, in 1.swf, I have a movieclip with identifier "a_id". in 2.swf, I loaded the 1.swf using loadMovie (to one blank movieclip). After that I need to attach the "a_id" to another blank movieclip (in the 2.swf itself)
'm pretty new with flash and right now I'm stuck with a problem that I don't seem to come out off. I'm working on my new site that has 3 sections that each load a movieclip using attachMovie. Now the problem happens when I load the slideshow, its all broken and even if I change the _root to _parent or this, it doesn't work
Is it possible to use duplicateMovieClip to copy a movieClip into another movieclip, or is it only possible to duplicate it inside one and the same containermovieclip?
I am using AS2. The character, a robot, has machine guns that fire off bullets. I am trying to get the bullets to disappear when they hit an enemy. They do dmage, but for some reason they are still there. Here is the code I use to attach and delete them.
My problem is that it only adds one instance of flag_mc to the movieclip. When I press the mouse down again, it removes my old instance and puts a new one. Is it possible to make it leave the old one and add another?
This is driving me nuts... is it impossible to use attachMovie inside a movieclip you used loadMovie on? For example, I have this but it doesn't work out:
Why doesn't this just load the firstImage.jpg through the loadMovie method and then create an attachedImage_mc on the imageHolder_mc (with the secondImage_mc)? All its doing as of now is loading the first image... then if I comment the loadMovie part, it attaches the second image.
EDIT: Just a little more info. Basically I have a movieclip called imageHolder_mc that I created manually on stage. This movieclip calls LoadMovie to load in a JPG, but later on I need too replace the entire content of it with a movieclip from the library (still keeping the imageHolder_mc instance name).
I've used the command attachMovie to add custom movie clips to my flash document but now I want to change the value name (that I defined inside the movie clip as a text) in each movie clip. I found something like : this[uniqueclipname].value.text = "Name"; But I couldn't use it clearly. Is there an alternative for that? Or is there any wrong part in my code?
I used a movieClip to store the attach movieclip, but How to get back the variable from that movieClip container, such as a I set a array in the exiting movieClip
var m_click:Array = new Array(); for (var f=0; f<=this[mc_name+"_qty"]._totalframes-1; f++) { m_click[f] = 0; }
I want the attached movieClip "y_qty" with a button inside to get the m_click for changing each m_click[0]..m_click[1]..value, how to do it?
Adobe Flash CS3 publishing as Flash 8, AS 2.0 I have a movieclip named menu (instance name = mainmenu). Inside of that there is a button named btn_about (instance name = about). On the main stage there is an empty movieclip named empty_mc (instance name = mcholder, linkage id = empty). I want a user to press the button which causes a movieclip in the library named tesst (Linkage name = testid) to load into the empty movieclip (mc_holder).
Here is the code on the button: on (release) { this._parent.mcholder.attachMovie("testid", "tesst1", this.getNextHighestDepth()); } It does not work.
I used a movieClip to store the attach movieclip, but How to get back the variable from that movieClip container,such as a I set a array in the exiting movieClip [code]I want the attached movieClip "y_qty" with a button inside to get the m_click for changing each m_click[0]..m_click[1].. value, how to do it?
I am trying to make this class remove a dynamic Movieclip that was attached on the mainstage using attachMovie(); it wont let me remove the movieclip tho
here is my code
Code: class close_btn extends MovieClip { function onPress () : Void
I have a .fla file that has VerticalMenu.as as the documentclass. In that class, it calls another class called MenuItem.as.Within MenuItem.as, I want to be able to add buttons to the themain timeline (the root), but when I do addChild, it'll just add itto the menuItem object. How do I reference the root fromMenuItem.as to add the child there
I had a movieclip which contained a button in it exported as "mc". Then I attach this movie clip onto the stage using: _root.attachMovie("mc", "link1", 1); But i couldn't find it with AS. I mean, how can i refer to the button inside the movieclip after I attach it onto the stage using attachMovie?
why a ComboBox component wouldn't work if it's in a movieclip brought in with attachMovie? When I click on the combo box, the menu drops down like normal, but no matter what I click on, it goes blank. Just spent a lot of time searching the net for an answer, found a few suggestions but nothing has worked.The combo box works fine if it's placed on any timeline in my main movie, but when it's in a movieclip that is attached with attachMovie, it stops working.