Questions tagged [addchild]

The ActionScript 3 `addChild()` function

287 questions
34
votes
1 answer

When to use addChildViewController vs pushViewController

I just watched a 2011 WWDC presentation on "Implementing UIViewController Containment" (here's a link to the video) They mentioned both of these ways of adding viewControllers to the screen, and I would appreciate some clarification on best…
RanLearns
  • 4,086
  • 5
  • 44
  • 81
13
votes
1 answer

Adding child document to existing mongodb document

Essentially I am just trying to add a new sub-document to my existing mongodb document that has the following schema /models/server/destination.js // this is the "destination" model for mongoose var mongoose = require('mongoose') var Adventure =…
pwborodich
  • 382
  • 6
  • 22
11
votes
2 answers

What is the difference between addChildViewController and presentModelViewController

I know there are three ways to change the view in iOS 1. [self addChildViewController:thirdViewController]; [contentView addSubview:thirdViewController.view]; 2. First * sVC = [[First alloc] initWithNibName:@"First" bundle:[NSBundle mainBundle]];…
Ian
  • 501
  • 2
  • 10
  • 20
8
votes
2 answers

simple xml add namespaced child

I'm using SimpleXML to create an RSS feed for Google Products and I want to create a namespaced child but when I do for example $item->addChild('g:id', 'myid'); it adds myid instead of Besides I have added at the top
Ilian Andreev
  • 1,071
  • 3
  • 12
  • 18
8
votes
4 answers

Adobe Flash Builder (flex4): addChild() is not available in this class.

I want to load an swf into a flex 4 application in order to use its classes. var ldr:Loader=new Loader(); ldr.load(new URLRequest("file://path/to/fileswf")); ldr.contentLoaderInfo.addEventListener(Event.INIT, loaded); function loaded(evt:Event):void…
ufk
  • 30,912
  • 70
  • 235
  • 386
5
votes
2 answers

addChild(): How can I know when a DisplayObject is actually displayed on the stage?

I've got a large (4096x4096) image loaded into memory, but when I try to use addChild, there is a long delay before it actually gets drawn to the screen. This is expected. However, is there an event I can listen for to know the moment that the…
producerism
  • 344
  • 4
  • 17
4
votes
2 answers

mouseChildren = false not working very well for me

Happy new year btw ! I want to separate event handling from a container and it child. So as you can see, my source code is very simple : package { import flash.display.Sprite; import flash.display.*; import flash.events.*; …
nouatzi
  • 735
  • 4
  • 14
4
votes
1 answer

PHP SimpleXML->addChild - unwanted empty namespace attribute

I'm attempting to use SimpleXML's addChild method of the SimpleXMLElement (actually a SimpleXMLIterator which is a subclass of SimpleXMLElement) to add child elements. My problem is that the source document contains a mixture of elements with…
user573151
4
votes
2 answers

Has someone run across a way to force PHP SimpleXMLElement node names to upper case?

The API integration documents specify that that all node name are case sensitive. I'm using PHP SimpleXMLElement and I don't see a way to force upper case node names. Has someone run across a way to force node names to upper case? $xmlstr =…
3
votes
3 answers

addChildViewController alternative for iOS 4.3

I would like to use the same functionality of addChildViewController, but for the version 4.3 (addChildViewController is only available in version 5). Thanks in advance.
Luis Andrés García
  • 5,852
  • 10
  • 43
  • 57
3
votes
1 answer

add image as child of a CC3Node

I'm using Cocos3D. There i've a list of different CC3Nodes. I want to put an image next to each of it. My problem is: how to create a new CC3Node and add it as a Child.
Adrian
  • 524
  • 5
  • 21
3
votes
1 answer

Variable addChild is not defined?

i have a problem using AS3 - Flash CS3 gives me this Error message: Error #1065: Variable addChild is not defined. Any ideas what's wrong? This is my code: package coa.application{ import flash.display.SimpleButton; import…
Dungeo
  • 177
  • 2
  • 7
  • 16
3
votes
2 answers

Flash AS3 dynamically added children . Problem with naming them and calling each separated

I need to access each children after i dynamically added them to the stage , but i`m having problems figuring out how . On click it adds the image to the stage , and I need to make them glow one at a time , with a for() , but I cant figure out how…
chris
  • 79
  • 1
  • 6
3
votes
2 answers

What does self.addChild Do?

This is sort of a stupid question, but what does the function self.addChild() do? I am familiar with this function, and how to use it, but I am not exactly sure what it adds the child to. For instance, I have created and designed an SKShapeNode…
JustAnotherGuy
  • 259
  • 3
  • 14
3
votes
1 answer

Swift: Use of unresolved identifier 'addChild'

import SpriteKit class GameScene: SKScene { let player = SKSpriteNode(imageNamed: "Gun") override func didMoveToView(view: SKView) { backgroundColor = SKColor.whiteColor() player.position = CGPoint(x:…
1
2 3
19 20