Questions tagged [addchild]

The ActionScript 3 `addChild()` function

287 questions
0
votes
1 answer

actionscript 3.0 function mouseevent event handler

I have a function that uses a mouse event and it removes and adds things onto the stage: beginBut.addEventListener(MouseEvent.CLICK, bgnListener); function bgnListener (event:MouseEvent) { removeEventListener(Event.ENTER_FRAME, setScreen); …
0
votes
2 answers

calling functions and passing information between views

Thanks in advance for your help! In the main ViewController.m of my project I am adding a customized tableView like so: messageController = [[MyMessagesController alloc] initWithStyle:UITableViewStylePlain]; [self…
RanLearns
  • 4,086
  • 5
  • 44
  • 81
0
votes
3 answers

Applying a value to a new XML element with attributes using PHP's simpleXML

Here is a function (in a class that deals with comments) that creates a comment element function add($id,$message){ $newcomment = $this->source->addChild('comment'); $newcomment->addAttribute('user',$id); …
Felixpitau
  • 21
  • 8
0
votes
1 answer

Actionscript 3.0 addchild

Here's my code, the problem is that it doesn't add the sprite when i call it from my main function in main. package{ import flash.display.*; import flash.events.*; public class gfxs extends MovieClip{ public function gfxs(){ } public…
0
votes
1 answer

Sprite not adding to scene?

I have a strange issue. In my game, I add a "target to the scene in the first level like so: //Adds the "targets" or in this case falling objects, to the scene and spawns/moves them -(void)addTarget { CCSprite *target = [CCSprite…
tyler53
  • 429
  • 1
  • 5
  • 16
0
votes
1 answer

Flash - using multiple event handlers?

so I'm working on a game which uses multiple .as files - and I'm trying to program the game however it keeps kicking back the following error when it reaches line 21 in theGame.as - the error is... TypeError: Error #2007: Parameter child must be…
Andy
  • 823
  • 5
  • 17
  • 37
0
votes
3 answers

removeChild is removing all my Movie clips

I am making a tool which obscures an image with squares. What I want to happen is to have a bouncing ball which hits the squares and makes them disappear. However, the removeChild command isn't working right. I set it up to populate the image…
0
votes
1 answer

Why does this not work? Flash As3, if added child is at frame something?

This is my code help me please its really frustrating! I have a movieclip in my library and added it with AS3 to the stage. That part was easy. But now i want to control that movieclip. If introScene "introClass" Reaches frame 120 then i want to…
0
votes
1 answer

Android add layout childs

I'm creating my own custom LinearLayout, and extending it's class I need to add children to the layout using the addview method, I need to have access on the tag, which is set after the constructor, so please I need to know the best practice for…
0
votes
3 answers

AS3 addChild PARADOX.

Okay so here is a question that is more about method i think. I am fairly new at this and i therefore think a have the wrong approach. I want to make a "game" where every time you click, the stage creates an addChild. After searching trough several…
0
votes
2 answers

How to create a series of class instances in a for loop, as3

In my library I have a bunch of classes named tip1, tip2, tip3, tip4...and so on. Is it possible to create one instance of each on the stage using a for loop? I tried this but it didn't seem to work. var tips:int = 12; for(var i:int = 1; i<=tips;…
user1518911
  • 41
  • 1
  • 4
0
votes
2 answers

Python parent in QTreeWidget

I am working on python plugins.I used QTreeWidget to list items. [listing in qtreewidget][1] this link helped me a lot. My code is: valestimate=QTreeWidgetItem(str(parent_name)) for row in c.fetchall(): …
poonam
  • 748
  • 4
  • 19
  • 40
0
votes
1 answer

AS3: finding an object by it Instance name in a dynamic added child

I am doing an Adobe AIR Kiosk app but I am having a little problem. First step is to generate a webcam container: var bandwidth:int = 0; var quality:int = 100; var camera:Camera = Camera.getCamera(); camera.setQuality(bandwidth,…
0
votes
1 answer

Problem displaying image on the movieclip

Have little bit of problem for my flash apps I have a loader which load the image from the server. I also have a large movieclip that hold a list of small movieclips that are used to preview an image using the loader class. It can display the image…
Simon
0
votes
1 answer

Flash CS6 ActionScript 3 Error #2025

I'm working on a webpage for a class and am trying to work the navigation using ActionScript 3. My understanding of how it should work is that when you click the links at the top, it removes whatever is currently displayed, using removeChild, and…
Steve W
  • 5
  • 1
  • 4