Actionscript 3 :: Hide All Children Clips Except A Specific One?
Mar 2, 2012How can I hide all children clips except a specific one with actionscript 3 ?
View 2 RepliesHow can I hide all children clips except a specific one with actionscript 3 ?
View 2 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 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 a sliding menu, and need to loadMovies when specific clips are in specific positions. For gallery, for example, the code I'm using is:
if (xTargetSLI = 350){
loadMovie ("gallery.swf", 1);
}
But with that code, gallery.swf loads by itself, regardless of the position of SLI.
I 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 have been looking for a reference for this all over Google and even through the Adobe Forums but I can't find anything.I'm using Flash CS4, AS2. I'm calling an XML document to populate 2 text areas (textArea). In one textArea I need to display the firstChild (or ROOT node) and three childNodes after that. In the other textArea, I need to display the fourth childNode only.I am good to go for the second textArea, the one that only shows the fourth childNode. What I cannot figure out is how to hide that fourth childNode from my other textArea that calls for the same XML file. My code is written below, actionscript and XML.My textArea boxes are named "myText" and "myText2". "myText2" is the one that is working properly. I need to show only the <title> <description> and <price> tags in the "myText" box, not the <link> tag.
Flash AS2
//Set Image PropertiesmyImageBox.html = true;myImageBox.wordWrap = true;myImageBox.multiline = true;myImageBox.label.condenseWhite = true;myImageBox.setStyle("borderStyle","non
[code]......
When Serching for levalid Sting. How can i get that leval page length;
example1: search String="m0_l0_t1" these leval page length =2,
example2: search String="m0_l0" these leval page length =3,
var myxmlL:XML=
<root>
[code]...
I have xml files with many children and then further more children.
like
<level1>
<child id=1 > <nodes....> </child1>
<child id=2 > <nodes....> </child1>
<child id=3 > <nodes....> </child1>
<child id=4 > <nodes....> </child1>
</level1>
Is it possible to get the children nodes of child with id = 1 in AS3
I'm using the following array to add children to the stage:
for(var i=0;i<6;i++) {
var aCherry=new cCherry()
aCherry.y=10
aCherry.x=10+100*i
stage.addChild(aCherry)
}
Now I want to modify each cherry based on another array. Something like this:
[Code]...
Clearly stage.getChildByName("aCherry")[i] isn't correct, but coming from JavaScript this makes the most sense to me and should accurately portray what I'm trying to achieve for you guys reading this. So, how would I actually do this? This being getting an array of children added to the stage under a certain name or class (so an array of cCherry would work too, if necessary), then using them in a way similar to the above loop.
How do you move a child, For example, I use the drawRect command, and have a rectangle, how do I have it move
View 1 RepliesI add to a movieclip various Textfields using addchild.How could I get all Textfields in the movieclip to remove (or edit) them?
View 3 Repliesi embed a video in my html page and i want to hide div after complete the video. and a specific time.my video time is 12 sec.
I am using this function
$('#fvideo').fadeOut(12000);
and html code.
<div id="fvideo" class="video">
flash video
</div>
UPDATE
actually what i want is that
flash video fadeOut time should start after buffering completely.
or is there any way to fadeout that div( containing flash video) after buffering and running(once) successfully.
What is the best way to hide specific (interpolated) color ranges? For example, I have a gradient that goes from blue > cyan > yellow > red. What I need is to hide blue > cyan, yellow > red but leave the cyan > yellow.
var rangeA:Object = {min:0x0000FF, max:0x00FFFF} //hide
var rangeB:Object = {min:0x00FFFF, max:0xFFFF00}; //show
var rangeC:Object = {min:0xFFFF00, max:0xFF0000}; //hide
It is ok to apply different filter for each range.
The movie I am doing uses Kirupa's rollover tutorial to roll an effect off a movie clip. As there are several of these on the page, I am also using swapdepth to put them on the top of the other clips when we are hovering over them. Otherwise the layer order messes things up.[code]...
View 1 RepliesI created a loop that adds the same movie clip 22 times inside of another movie clip and pushed it into an array in order to control it later. But i can't seem to find away to remove those children from the movie clip... is there a way to remove all children of a specific movie clip? I tried to create another loop but i cant remove the children using removeChild(arr[i]);
View 3 RepliesI would like to create a website 'banner' application in flash that uses action script to show or hide different movie clips based on a start and end date.
Originally I would have to manually upload new banners to a website one at a time. But if I had one file that could contain multiple banners I could have them turn on and off based on what day it was. Is there a way to do this with action script?
I have main MC when press it opens up and then has buttons in that MC.if main_MC is open then press it again will close it. Problem is I need to target the buttons inside main_MC but I can't cause it targets main_MC and thus closes the MCI tried doing main_MC.sub_MC.onPress = function ...... but it still targets the main_MC.
View 4 RepliesThe code below adds all the childrens of specific movie clip to the array called arrayBox. The next loop SHOULD loop through all the items inside arrayBox and check if any of those items (those items are all movie clips) is colliding with movie clip which isn't in array called avatar. If so, it should pop up the output and change some variable, but the point is that something with second loop is wrong...
[Code]...
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 have a sliding menu, and need to loadMovies when specific clips are in specific positions.
For gallery, for example, the code I'm using is:
if (xTargetSLI = 350){
loadMovie ("gallery.swf", 1);
}
But with that code, gallery.swf loads by itself, regardless of the position of SLI.
I have 35 movie clips named mcMyObject1, mcMyObject2, etc. to mcMyObject35Each time the playhead enters the frame this code sits on, I want all of these 35 movie clips to be placed on the stage in random orderI want each one of these 35 movie clips to land on one of these X coordinates: 57, 187, 317, 447, 577, 707, 837 and on one of these Y coordinates: 53, 183, 131, 443, 573. (It's a 7 x 5 grid)Movie size is 1024 x 768Here's my code, which doesn't work:
stop();
var myXArray=[57, 187, 317, 447, 577, 707, 837]; //cordordinates for x
var myYArray=[53, 183, 313, 443, 573, 573, 573]; //cordordinates for y
[code]......
I 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]...
In this game attached I need the old Children (rats) to hurt the character when he walks into them, however only the most recently added Child is active in that way... also the rats seem to appear above the character instead of below, is there any way to resolve these issues??
View 4 RepliesI have a Sprite called pageContent. Inside pageContent are 12 more Sprites with unique names, a couple of Buttons, and some TextFields. Inside each of the 12 Sprites I have either one or two TextFields and one TextInput. My question is, since they are children inside a child of pageContent, how can I access them? Here is how I am trying to do it:
[Code]...
In my mind, this should totally work. But surprise, surprise, it doesn't. I have debugged it and it works fine for the first two lines, but when it tries to get numChildren of a Child of pageContent (line 3), I get this error: PHP Code: 1119: Access of possibly undefined property numChildren through a reference with static type flash.display:DisplayObject.
I want to have a rollover effect of a movieclip (mo1) inside a movieclip (mo) of another movieclip (popup1).Is it possible to do that? I try calling it using this code in the frame 1 of my flash, am i doing wrongly?
Code:
popup1.mo.mo1.onRollOver = function() {
popup1.mo.mo1.gotoAndStop(2);
[code]......
Newbie to XML here and I have what I *hope* is an easy problem, but I just don't know the answer. And as I have to try and show this by Monday, I'm sort of stuck. I am trying to pull in information about houses via an xml file. Each house has 1 address, 1 owner, 1 description, and about 6 photos. I have no problem accessing the address, owner, etc, and I can always access the first photo, but whenever I cycle through the photos, I seem to cycle through the first photo for every house, not every photo for each house.
Basically, I need the children <images> to go up by one, without the the parent going up by 1. I am hoping I am describing this well. My code looks like this:
[Code]...
I have a Canvas which has many components inside it and those again, have many components inside them.
getChildren() returns only the top level children. What is the best way to retrieve all the children (children of children of children and so on).
Well, I sorta know how to do this by iterating through the children, but the code is really messy. I'd prefer to use a nice recursive function. Has anyone written this before? Or is there a Util class to do this?
I am trying to pull in information about houses via an xmlfile. Each house has 1 address, 1 owner, 1 description, and about 6photos. I have no problem accessing the address, owner, etc, and Ican always access the first photo, but whenever I cycle through thephotos, I seem to cycle through the first photo for every house,not every photo for each house.Basically, I need the children <images> to go up byone, without the the parent going up by 1. I am hoping I amdescribing this well.My code looks like this:
total = xmlNode.childNodes.length;
totalb =
xmlNode.childNodes[0].childNodes[5].childNodes.length;
[code].....