The ActionScript 3 `addChild()` function
Questions tagged [addchild]
287 questions
1
vote
3 answers
ActionScript AddChild to Stage from Class
I am trying to add an object to my main stage via the addChild() method. Normally, when working within the FLA itself, using addChild(myObject) works just fine. However, it does not work within an external AS class.
All of the other tutorials I have…

Oliver Spryn
- 16,871
- 33
- 101
- 195
1
vote
1 answer
how delete created children, and restart animation
I have made the following code to create and drag letters, sorry if it is very dirty, but I am just learning AS3, I need you to help me complete the code to delete the created letters and restart the animation, with a…

Smart Software
- 13
- 2
1
vote
2 answers
How to remove child with same name if in same location or collision? AS3
So, in my script I have given the user the ability to make unlimited amount of a certain movieclip.
var square = new Square();
sqaure.x = mouseX;
sqaure.y = mouseY;
addChild(square);
However, I would like to have the script remove any extra…

Koden
- 353
- 1
- 13
1
vote
0 answers
addChild not working when children vc not in same storyboard as parent vc
I'm learning and trying a lot at the moment and so I tried to do a custom tab bar instead of using the UITabBar. For that I used this tutorial https://guides.codepath.com/ios/Creating-a-Custom-Tab-Bar and everything is working well when my child…

TGDev
- 33
- 4
1
vote
1 answer
Clone items when clicked (Html5-canvas)
I'm new with html5-canvas and I'm facing some problems. The code below will clone an object when is clicked on it and it can be dragged too. But it only works once, and when I click the object again the clone will move back to its original origin.…

Zhao
- 19
- 2
1
vote
1 answer
How to recall SKLabelNode
I am making a game with SpriteKit.
I am trying to add a SKLabelNode (pointsLabel), and I have got it to work if I don't set label.isHidden = true. However, I want the Label to be hidden until touchesBegan, but it seems like I can't recall the…

Jakob Nielsen
- 73
- 3
1
vote
2 answers
Detecting when an object gets added to a movieclip
Alright, so I'm trying to figure out when a child is added to a movieclip "x", and handling/detouring this operation from within this "x" movieclip.
I tried overriding addChild and addChildAt at with no prevail. The movieclips that are placed on the…

Qix - MONICA WAS MISTREATED
- 14,451
- 16
- 82
- 145
1
vote
1 answer
AS3 Change textfield inside movieclip added from library
I'm trying to do the following:
I have an empty movieClip in my stage called zonaCentral_mc. I use a function that has this code:
zonaCentral_DescripcionProceso = new…

Albert R
- 125
- 5
- 19
1
vote
0 answers
UE UMG, when I addchild use C++, slot lost Slot properties I designed in blueprint, how can I keep it?
When I designed one Slot properties in blueprint, it works just when I put it on another blueprint directly.when I dynamic create one and addchild to another widget use C++, Slot properties designed in blueprint are not works, I need to set it by…

CrazyStone
- 11
- 1
1
vote
0 answers
Flash 9 full-screen addChild error
I am having issues with Flash 9 player while in full-screen mode. In my case addChild method of DisplayObject behavior is wired while "Press Esc to exit full screen mode" is shown. There are no problem in normal stage mode or after "Press Esc.."…

samfromlv
- 1,001
- 1
- 10
- 17
1
vote
0 answers
Add Child View Controller to Navigation controller
I try add child view controller multiple. i want to add search controller to home controller as child view controller . that's work good hear is my code :
func ShowSearchController() {
let secondViewController:SearchController =…

ava
- 1,148
- 5
- 15
- 44
1
vote
1 answer
Manipulating alpha property vs adding/removing node
If I want a node or nodes (in this case a "panel" with two "buttons" - e.g.: a node to represent the panel, and two more nodes on that panel to represent buttons) to appear and be available to call actions (with the buttons using touchesBegan()), I…

punated
- 51
- 6
1
vote
1 answer
SimpleXml PHP addchild before any child
I know how to add child nodes with SimpleXml and PHP but i have a problem with the orders of those child elements.
Lets say i have this xml structure
album
gallery1
gallery2
gallery2
.
.
.
galleryN
/album
This is how it…

AXheladini
- 1,776
- 6
- 21
- 42
1
vote
0 answers
AddChild to use external SWF has disabled my buttons I had on original Flash file
I have a Flash file (a website header with 5 buttons for 5 links to webpages).
On my actions layer, I added an external SWF file using the addChild object.
Note that I have very basic knowledge of ActionScript and I had to take some help from Google…

SmIqbal
- 99
- 1
- 13
1
vote
0 answers
SpriteNode position changes after adding/removing to parent
Details of program:
by looking at this picture(https://i.stack.imgur.com/QOZ53.png), what I'm trying to do is have the spaceship circle the planet. I achieved this by making a line node and changes its anchor point to the top and then position it to…

Rohit Kumar
- 51
- 1
- 7