ActionScript 3.0 :: Access A Movieclip Child?
Sep 24, 2011I want to access a my movieclip child but it doesn't work [code]...
View 4 RepliesI want to access a my movieclip child but it doesn't work [code]...
View 4 RepliesI've got a dozen movie clips on stage, each with 3 children, and each of those have 8 children, as example named u01-u08.
Is it possible to access u01 directly without the parent names? like a wildcard? like the xml way of getting to nodes with a .. ?
sort of like: stage..u01.alpha = .5;
I am trying to add a child in a movie clip and perform basic operations on the child but I cannot get access to the child.
It loads the child to the movieclip "FLine1MC" but it says FLine1MC.ClipArt1 does not exist when I try to change the x location.
function AddArt1(evt:MouseEvent): void {
var ClipArt1Request:URLRequest = new URLRequest("images/mypic.gif");
var ClipArt1:Loader = new Loader();
ClipArt1.load(ClipArt1Request);
FLine1MC.addChild(ClipArt1);
FLine1MC.ClipArt1.x = 550;
}
Anybody know what's my error?
By that token, is there a way we can check the exact path of an object?
I am developing a shopping cart for my web store. What I am trying to do is initially a store front is rendered where a user selects the products and adds them to a shopping cart. The "cart" is a vector that holds all of the products selected. The user is then sent to a review page where he/she can review their order. It is then communicated to a PHP page for the final checkout and what not.[code]...
View 9 RepliesBasically, I want to access a movieclip child created in a function called 'main' in my 'main' class that links to the fla.
Code:
var player:Symbol3 = new Symbol3();
addChild(player);
[code].....
i made thumbnails dynamically and i waana access it's child movieclip
var totalThumbs:Array=new Array()
var ThumbMC:MovieClip()
var childThumb:MovieClip()
[Code].....
This is probably super simple, but for me.. not!I am loading external swf into my main swf.How do I access a movieclip within a child. This is my code:
function loadFolio (event:MouseEvent) :void{
var request:URLRequest = new URLRequest("folio.swf");
contentLoad.load(request);
[code]......
Is there a way to access the child of a selected movieClip in JSFL.
ie i can access the selected movieClip using fl.getDocumentDOM().selection[i]. Now i also want to access the child of this movieClip.
My aim is to give instance name to all the movieClip in an FLA
I've dynamically created a whole bunch of movieclips.
I've given each clip a name based on a variable number:
mc.name = "mc"+i;
I've also use addChild to add a couple of dynamic text fields to each movieClip, named myText1 and myText2.[code]...
I created a child that will be added on runtime. How do I access a movieclip on the mainstage from within the child?
View 1 Repliesi have problem with swfLoader in flex, when i close following code in click method i can easly add many swf to main application
<mx:VBox id="content" width="100%" height="100%" ></mx:VBox>
public function doIT():void
{[code]....
when i close adding those swfs in loop i have the same error, it looks like child apps couldn't access certain objects that were instantiated by another child app, so what can i do?
I've seen some discussion on how to load a child swf using swfLoader and accessing it's variables but I am wondering if it is possible to do this without adding any code to the child swf.Either accessing public vars or listening for funciton calls would work fine
View 2 Repliesi have a parent movieclip mcA and i want to add another movieclip mcB (child movieclip) inside mcA such that the extra part of mcB is hidden. The size of movieclip remains same as of mcA
For ex:-
mcA = 300x300
mcB = 400x400
then only 300x300 of mcB movieclip is visible and rest of the part is hidden.
I have a mainSwf in which I load an external swf, which loads an external swf.( a child of a child). I am trying to set the framerate via AS3 for the childs child by using stage.frameRate= 15;
It doesnt work when the children are loaded into the mainSwf. how to access the stage of a child's child? I have tried root, Movieclip, this but can not get it to work
how to remove all child of a movieclip if no of child are not known
View 2 Repliesi've made a simple example here to show you my problem. I have basically created a stage object ("box"), with the nested children, box->b->c. I have exported box for as, with class "box" and base class movieclip. Now i create 4 instances of my box class and add an eventlistener to the nested child c. When i later on try to remove the eventlisterner for myinstance.b.c i get: TypeError: Error #1010: term is undefined and has no properties.at DocumentClass/removeSomething(). Here is my code:
package
{
import ....
[code]....
The error is as follows:1119: Access of possibly undefined property shiftX through a reference with static type flash.displayisplayObject.shiftX is declared in the first line of the movie clipFirst i check to see if the child doesnt exist and if it does I access it like so:getChildByName("ball"+ccc2).shiftX)
View 4 RepliesI am adding a movieclip in a class I will call class B that is added to a class I will call class A. In class B I am adding the movieclip like this:
var thumbHolder:MovieClip = new MovieClip();
thumbHolder.name = "thumb" + loadingCount;
MovieClip(root).slideMenuHolder_mc.slideMenu.thumbs_mc.addChild(thumbHolder);
trace("after: thumbHolder.name is: " + thumbHolder.name);
In class A, I can do something like this:
thumbs_mc.alpha = .3;
But if I try to do something like this, I get an error, even though the trace above traces out the names correctly. thumbs_mc.thumb1.alpha = .3;
On the main timeline I've got a movieclip, inside this movieclip I have some elements. Can I manipulate those elements from the main timeline through AS3? How?
View 3 RepliesI have a cloud named cloud2_mc and in its timeline i have a cloud layer, and an actions layer. I took the cloud and made it into a a Movie clip clip with an instance name of embeddedcloud_mc in this Movie clips timeline i have a 50 frame animation of the cloud breaking appart and disapating with a tween and i have a stop(); function on frame 1 of this layer.
What I want to happen is, when the cloud2_mc movie clip is clicked to play the animation of the cloud breaking appart. the cloud2_mc has a trajectory moving slowly accross the sceen continuously when the cloud2_mc reaches the side of the sceen it loops again. When the animation is clicked i would like it to continue across its path but, when the cloud2_mc reaches to left hand side of the screen i want the embeddedcloud_mc to reset its timeline and go back to its original state where the cloud has not broken appart.
My question is, how do I access an embedded movie clips timeline to tell it to play an animation on its timeline as well as, how do i make the same object restet its timeline to frame 1?
I am adding movieclips (myBall) to the stage by the click of a button. There is a base class applied to myBall which allows it (and its children) to be dragged and dropped. Within the base class on mouse down, along with startDrag, the movieclip is being brought to the top index. I would like to be able to refer to this movieclip in my document class. The point of doing this would be to apply a function to the last clicked movieclip (finding what movieclip was last clicked would happen by applying the function to the movieclip (myBall) with the highest index).[code]...
View 7 RepliesI have a container with text and a button and an image.
When i Mouse over the button i want to be able to tell the text inside the container to change its TextFormat to another.
How do i tell the text to do so, i though it would be something within the MouseEvent like,
event.target.parent (someway to access other child).setTextFormat()
is their a simple way to access another child from within the same parent?
I'm using the code bellow:[code]The problem I'm getting and I can't figure it out in AS3, is how to call the "mcExt" from another function, outside the function where the mc is created.tried MovieClip(root).container_ mc.window_mc.mcExt.gotoA ndStop("exit"); and it does not work.
View 1 RepliesI am creating a fullscreen (no scale) site, so I am placing the position of my movieclips by referring the stage.[code]...
that code sets the x property of the movie clip fine when stand alone but when loaded into another swf it has trouble accessing the stage.
How can I access the height and width of the stage from a child swf? I have already tried both parent and root which give no errors, however they are not tracing proper values and are throwing everything in the wrong place
I have movieclip which contains child movieclip. when child movie clip finish to play i want to run a function in a parent movieclip. so I made a custom event dispatcher in the first frame of the child movieclip:
[Code]...
I have load child swf in parent swf, from child swf i am trying to run my parent swffunction I am trying this code
MovieClip(parent).testfun()
but this code is giving error.
TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Loader@2b1aa061
[code].....
below shows how to add child in a movieclip. ebd.target.addChild(info_grd); there is button named my_btn inside the movieclip info_grd.I would like to remove movieclip info_grd.parent
View 2 RepliesCan any tell me how can I access a sub-child of a MoivieClip using [ ] operator?
View 2 RepliesI have an mc called parent_mc.. inside that is child_mc... now if i do in AS2
parents = new Array();
childs = new Array();
parents = [parent_mc];
[code].....
Having this litle code, how do I access the erro textArea?[code]...
View 1 Replies