ActionScript 3.0 :: Hide All Children Of CS5 Object?
Feb 14, 2011I have MovieClip, created with CS5. Is there a way to hide (set visible = false) all it's children (objects which lie on movie clip) within AS3 code?
View 4 RepliesI have MovieClip, created with CS5. Is there a way to hide (set visible = false) all it's children (objects which lie on movie clip) within AS3 code?
View 4 RepliesI have MovieClip, created with CS5. Is there a way to hide (set visible = false) all it's children (objects which lie on movie clip) within AS3 code?
View 1 RepliesHow can I hide all children clips except a specific one with actionscript 3 ?
View 2 RepliesI have an hierachical XML data, and I want to display it as a tree. The XML data is something like this:
<services>
<service name="TestService" endpoint="">
<method name="sayHi">
[code].....
I need to resize a Group using myGroup.height = 0. And it works, but myGroup's children are still visible, I do not know why...
View 1 RepliesI have a viewstack with childrens which I want to show/hide depending on the state the application is
[Code]...
AS you can see I inlude the retail customer view in the retail state and the wholesale customer view in the wholesale state. The problem is that when I run my app they don't appear on neither state.
I'm making a OSX-finder-type file browser in CS4.The Structure for the folder and files is being generated by a PHP in a XML, heres an example:(sorry the xml is not sorted, but the command i'm using in php doesn't sort it)
Code:
<root>
<dir name="images">
[code]....
I'm trying to make one of these hide background buttons. I can't figure out how to hide a object. So when you press hide background, the background object gets hidden.
View 4 RepliesHow can I hide an object? (I'm working on Adobe Flash) I have 2 objects, a cat (1) and a mouse (2).
When the cat "eats" the mouse, I want to dissapear or hide the second object (mouse).
I'm working on a project that has multiple 'scenes' located on each frame. In one scene, if you click on an object it disappears. I did this using the visible = false method. However, anytime you return the scene after, the object is visible again. How would I write the code so that it stays invisible permanently when you click it, regardless of whether or not you leave and later return to the scene?
[Code].....
got a code to show and Hide an object with a button and it's working good. There's the code
[Code]...
I want to introduce my hide/show code to this code but dont understand how to do it. What I want is that if I enter ''image1'' in my Passwordbox, my ''image1'' object show/hide. If I enter ''image2'', my ''image2'' object show/hide. Can someone help me with this?
There is something I have been trying to figure out how to do, I keep running into needing a simpler bit of code to hide all the movieclips except the one that was just made visible. My only idea so far is to manually input all the movieclip names and tell them whether or not to be visible. It works, but it creates a lot of code and is time consumming to change. I hope there is a way to use just one or two lines of code and hide all but the currently selected movieclips.
View 9 RepliesIn Actionscript 3.0, how do I hide the mouse using:Mouse.hide(); to only hide it over a particular area or a particular object?
View 1 RepliesI used to play around with flash during the early days of action script 1.but now i can't seem to find my way around it. Used to be able to add the script to the button itself.here is my problem.I have 2 object movie clip instanceobject_red and object_blueand I have 2 buttonsshow_switch and hide_switchwhat I want to do is to have a toggle button show and hidethe objects on the movie.
View 1 RepliesI am having problems accessing sub-children of my displayObject. Here is my code:private [code]but it's not working.
View 1 Replieshow can i get an objects "main" width, the width whe object whould have widthout all the added children?
View 2 RepliesHow do I get a list of all the children (Sprites) on the stage of my Document Class OR how can I get a list (length) of all the children (Sprites) of a parent (Sprite)?
View 1 Repliessometimes we need clone a object.but if a displayObject has some children and use the function like this:
[Code]...
I want to destroy/remove all the children of an object including grandchildren of those children and so on.
I was thinking of using a recursive loop along the lines "if you have children, check if they have children, if they do, check if THEY have children and so on until they have no children and if so removeChildAt(0) of the parent you last checked.
ActionScript Code:
obj0
|-obj1
|-obj2
[Code]......
A quick second question, we all know that event listeners should be removed when no longer needed but I was wondering about the event.COMPLETE listener for loading say XML or a video file or any loader object. Is there any point removing that listener of is it in effect dead anyway because it has triggered when "COMPLETE" and won't ever trigger again? Isn't it still "listening"?
How do you access a child that has been added to an object?For example if I have a movieClip on the stage and I add a child to it, how do I then access that child?
Code:
var newClip:MovieClip = new MovieClip();
newClip.addEventListener(Event.ADDED, checkClip);
[code]......
On my HTML page, I have <div> with an <iframe>, which references another page, that contains a Flash SWF object. If I set any of these:
display:none;
visibility:hidden;
opacity:0;
filter:alpha(opacity=0);
on the <div> that wraps the <iframe>, the SWF object sometimes remains in plain sight, while the <div>and <iframe> go out of view as expected.
[Code]...
This should work in the latest versions of Safari, Chrome and Firefox on a Mac and in the latest versions of Chrome, Firefox and Internet Explorer on a Windows 7 machine, and it should fail (no errors but the hiding behavior doesn't occur) in Safari on a Windows 7 machine.
It might be pertinent to note that one thing I've noticed about the SWF objects that have passed and failed are that the ones that have failed all revolve around video content whereas the ones that have passed don't. Granted I haven't tested more than a half-dozen objects, but that's quite a coincidence. :)
im building my site now and i want to have background of hexagons that get visible only when the mouse is at certain distance of them, so i found out that i have to use as3, ive read some tutorials and other post and i tried the following code that i found online:
stage.addEventListener(Event.ENTER_FRAME, showDistance);
function showDistance(e:Event):void{
var distance:Number = (circle.x, mouseX, circle.y, mouseY);
[code].....
I can't come up with a function that will collect the names of the children in a object container and put them in a array.
View 4 Repliesinside a MouseEvent.CLICK function, I usually used e.target to address the movieClip that I clicked, but that only work with a movieClip that doesn't have any children (such as text and other symbols) inside. When it has children inside, the e.target return the child inside the Mc but not the Mc itself. The e.currentTarget didn't work, either; it returned [object MovieClip] but not the instance name of the Mc.
View 3 RepliesHow do I remove all children from a display object container? I want to make sure that when I re-enter a particular frame that there are no imageLoaders loaded into my photoGallery.
View 2 RepliesI am really confused on how to keep the parent 'canvas' sprite aligned to the centre of the stage with the 'registration point' changing with it's children being added. I am guessing that some calculation of the initial registration point is needed but I just cant work it out
View 1 RepliesI have a custom class extending MovieClip, and in my code I add a few children to this custom class.When I add my mouse over event listener, it works, but it fires every time the mouse rolls over any of the children too!I only want it to fire once when the display object as a whole is rolled over.
View 1 RepliesIs it possible to get dynamically created children of a display object instance in action script 3?
Example
trace(_view.getChildByName("name")) = returns name of display object (success)
trace(_view.getChildByName("name").getChildByName("name2") = returns error 1061
Would it be possible (Without being extremely inefficient) to loop through a display object and reset their children's ChildIndex based on their y value?
View 1 RepliesI am using AS 3 Flash CS4, WIndows XP SP3. I am unable to use the Mouse.hide(); method in many of my scripts. If I add Mouse.hide() to a preexisting script, I get the following error; line1 1061: Call to a possibly undefined method hide through a reference with static type Class. If I add Mouse.hide():void; to a preexisting script, I get the following error: line1 Label must be a simple identifier Once this has happened, if I then remove ALL lines of script from the file...but leave the Mouse.hide(); [or Mouse.hide():void;], and also remove all objects from the stage, when I run the file, I still get those same errors.
[CODE]...