The ActionScript 3 `addChild()` function
Questions tagged [addchild]
287 questions
0
votes
1 answer
Error #1034 with Childs
EDIT:
Wow, I didn't realize I was doing so many things so terribly wrong. This is the first code I’ve ever written by myself, without using things the school supplied. Guess I tried to bite off more than I could chew then after so few lessons.
I…

Chantal
- 3
- 2
0
votes
1 answer
AS3 - Adding an object to a MovieClip Container from a class
I'm kind of new to adding using classes in AS3, so far i've just been doing everything on frame1 of the movie. I figured I should eventually learn classes so here goes :) When I add objects onto the screen, I like to group them together in container…

Tiffany Rehsif
- 33
- 1
- 9
0
votes
1 answer
How do I pass reference of an initialised object from one class to another class, to add (addChild) to display list?
I created this simple example
because I was using a more complex class, a menu item that I wanted to initialise all the settings in the Main class and then add it in in the Game class (and updating it) when needed (both classes are separate)
Class:…

bikutaa
- 33
- 1
- 7
0
votes
1 answer
as3 addChild into scaled movie clip & keep same scale and position
ATTEMPTING:
Loading a movie clip (NoScale_mc) into a scaled movie clip (Scaled_mc).
ISSUE:
When I load the movie clip NoScale_mc into Scaled_mc it obviously scales too.
QUESTION:
How can I keep the NoScale_mc in THE EXACT SAME POSITION and THE…

Papa De Beau
- 3,744
- 18
- 79
- 137
-1
votes
1 answer
Trouble with Abstract classes and their children in Java. Really confused
Hi I'm really new to java and having some issues. I have a question and I'm not sure how to phrase it so I'll try to give an example.
First lets say I have three classes that share the same package.
First lets say I have the following Abstract…

mjam94
- 25
- 4
-1
votes
1 answer
AS3: Can't create Movieclip class instance?
I'm just learning how to use classes in AS3 using some very basic code and I'm tearing my hair out trying to figure out how to do the simplest thing.
I've made the document class the 'Test' class (essentially my main class), and all I'm trying to do…

Brojack
- 3
- 2
-1
votes
2 answers
addchild with animate cc by Actionscript 3 language
How to with "addchild(page2)" animate showing with Tweening!
This is my simple class of actionscript to make that,MovieClip did not play animation when using addChild(), do you have any suggestions?
my page1..3 are MovieClips!
package
{
import…

S At
- 422
- 5
- 15
-1
votes
1 answer
addChild with looping and different height properties
I'm building an application with flash as3.0.
This my code.
function onCompleteLoadTimeline(event:Event){
var result:Object = JSON.parse(event.target.data);
var yPos = 0;
for (var i:int=0;i<=2;i++){
tpostArr[i] = new t_post();
…

Rizal Nurul Huda
- 73
- 6
-1
votes
1 answer
Using same class name but adding different mc dynamically
I have three movieClips are mc1, mc2 and mc3.
It is simple to add a movie clip from library dynamically with its class name. This method requares different class names for all movieClips that I want to add. The problem is "control.as" file. I need…

Erkan Çamyar
- 9
- 5
-1
votes
1 answer
How to add child (sknode) in a Switch Statement in swift spritekit
I'm making a litle game, and I need to have random columns runing from right to left.
I'm using a switch statement. In each case I am adding a diferent child node, but it doesn't work.
All g1, g2.. here..
var y = true
do{
var x =…

Moises Rodan
- 61
- 9
-1
votes
3 answers
Flash AS3 Mysterious Blinking MovieClip
This is the strangest problem I've faced in flash so far. I have no idea what's causing it. I can provide a .swf if someone wants to actually see it, but I'll describe it as best I can.
I'm creating bullets for a tank object to shoot. The tank is…

Ben
- 107
- 1
- 12
-1
votes
1 answer
AS3 addChild after set time
For a game we are creating we need to have a movieclip 'pop up' after a certain amount of time, usually somewhere between 10 and 20 seconds. If this movieclip appears, the timer needs to be paused while the movieclip is active and the timer needs to…

Arjen de Jong
- 1,051
- 1
- 7
- 15
-1
votes
1 answer
Spawning a random number of movieclips - function doesn't work?
I am trying to figure out how to spawn a random number of cells, but every time I run the program, I always end up with one cell only.
How come the number of cells spawned is always 1 when it can go up to 50? (since I made the p variable a random…

user3123633
- 19
- 7
-1
votes
1 answer
As3 preload/render a single movieclip before addChild to stage
I have some problems. I want to preload a single movieclip instead of preloading the whole project. Is there a way to that.
Concept Game.
Intro Displayed - Intro removed - Title Dislplayed - Title removed "after pressing on screen"
[[[[[[[PRELOAD…

user1492440
- 31
- 4
-2
votes
1 answer
Actionscript 3 addChild ignored every second attempt
I'm working on a game in Actionscript, and the following code is contained within a function that checks whether or not a key has been pressed on the keyboard. You can ignore all of the other variables, as the only thing that's important is…

Brojack
- 3
- 2