Error #2025: The supplied DisplayObject must be a child of the caller.

Hi All,
I would very much appreciate any help with this.
I am working on a flash piece that will play 4 videos, depending on the button pressed. First button will launch first video, 2nd - 2nd video and so on. Once the Video is done playing, close_btn, learn_more_btn and replay_btn appear, in addition to an ending image that is different for each of the videos( BoxLivePic, BoxSleepPic and BoxFeelPic). So - actually 4 things appear once the movie stops playing and the last image depends on which buttons was clicked...
My issue is, when I click the close button( andI'm sure same will apply for the other 2 buttons), I get the error below:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
    at flash.display::DisplayObjectContainer/removeChild()
    at AER1_r5_fla::MainTimeline/closeVideo()
I understand is that it's because each Picture is not actually added to the display list, unless the proper button was clicked.. however, I don't know how to fix that! I hope this makes some sence - Below is all of my Code... Thanks a bunch in advance:
import com.greensock.*;
import com.greensock.easing.*;
import com.greensock.easing.CustomEase;
import com.greensock.loading.VideoLoader;
import flash.display.Sprite;
import com.greensock.events.LoaderEvent;
import flash.display.MovieClip;
import flash.display.SimpleButton;
import flash.events.MouseEvent;
//Last Buttons Variables
var close_btn:Button_close = new Button_close();
var learn_more_btn:Button_learn_more = new Button_learn_more();
var replay_btn:Button_replay = new Button_replay();
//Last Pic Variables
var BoxLivePic:Box_Live_Pic = new Box_Live_Pic();
var BoxFeelPic:Box_Feel_Pic = new Box_Feel_Pic();
var BoxSleepPic:Box_Sleep_Pic = new Box_Sleep_Pic();
// Video Variables
var Video_Breathe:VideoLoader = new VideoLoader("Breathe_Video.f4v",{container:this,
                                            x:0, y:0});
var Video_Live:VideoLoader = new VideoLoader("Live_Video.f4v",{conainer:this,
                                             x:0, y:0});
var Video_Sleep:VideoLoader = new VideoLoader("Sleep_Video.f4v",{conainer:this,
                                             x:0, y:0});
var Video_Feel:VideoLoader = new VideoLoader("Feel_Video.f4v",{conainer:this,
                                             x:0, y:0});
// Video complete Event Listeners
Video_Breathe.addEventListener(VideoLoader.VIDEO_COMPLETE, donePlaying_breathe);
Video_Live.addEventListener(VideoLoader.VIDEO_COMPLETE, donePlaying_live);
Video_Sleep.addEventListener(VideoLoader.VIDEO_COMPLETE, donePlaying_sleep);
Video_Feel.addEventListener(VideoLoader.VIDEO_COMPLETE, donePlaying_feel);
OverwriteManager.init(OverwriteManager.AUTO);
//Buttons Invisible
breathe_mc.learn_btn.visible = false;
breathe_mc.video_btn.visible = false;
live_mc.learn_btn.visible = false;
live_mc.video_btn.visible = false;
sleep_mc.learn_btn.visible = false;
sleep_mc.video_btn.visible = false;
feel_mc.learn_btn.visible = false;
feel_mc.video_btn.visible = false;
//Custom Eases
CustomEase.create("myCustomEase", [{s:0,cp:1.14999,e:1.4},{s:1.4,cp:1.65,e:1}]);
CustomEase.create("myCustomEase2",[{s:0,cp:0.97,e:1.22},{s:1.22,cp:1.47,e:1}]);
var timeline:TimelineLite = new TimelineLite({onComplete:showBreathe});
addChild(removeChild(better_mc));
TweenLite.to(better_mc,2,{alpha:1, y:186.6,ease:Bounce.easeOut});
timeline.appendMultiple([
    TweenLite.to(breathe_mc, 1, {alpha:1,y:117,ease:CustomEase.byName("myCustomEase2")}),
    TweenLite.to(live_mc, 1, {alpha:1,y:117, y:37, ease:CustomEase.byName("myCustomEase2")}),
    TweenLite.to(sleep_mc, 1, {alpha:1,y:77, ease:CustomEase.byName("myCustomEase2")}),
    TweenLite.to(feel_mc, 1, {alpha:1,y:77, ease:CustomEase.byName("myCustomEase2")})],1,TweenAlign.START, .2);
function showBreathe():void
    breathe_mc.learn_btn.visible = true;
    breathe_mc.video_btn.visible = true;
    TweenLite.to(breathe_mc.learn_btn, .5, {alpha:1});
    TweenLite.to(breathe_mc.video_btn, .5, {alpha:1});
    TweenLite.to(breathe_mc, 1, {y:77, ease:CustomEase.byName("myCustomEase")});
    //Show Text
    TweenLite.to(breathe_txt_mc, 1,{alpha:1});
//Event Listeners
breathe_mc.addEventListener(MouseEvent.MOUSE_OVER, breatheOpen);
live_mc.addEventListener(MouseEvent.MOUSE_OVER, liveOpen);
sleep_mc.addEventListener(MouseEvent.MOUSE_OVER, sleepOpen);
feel_mc.addEventListener(MouseEvent.MOUSE_OVER, feelOpen);
//Event Listeners for Playing Video
breathe_mc.video_btn.addEventListener(MouseEvent.MOUSE_DOWN, breathe_play_video);
live_mc.video_btn.addEventListener(MouseEvent.MOUSE_DOWN, live_play_video);
sleep_mc.video_btn.addEventListener(MouseEvent.MOUSE_DOWN, sleep_play_video);
feel_mc.video_btn.addEventListener(MouseEvent.MOUSE_DOWN, feel_play_video);
// Event Listener for Close Video
close_btn.addEventListener(MouseEvent.MOUSE_DOWN, closeVideo);
//Functions for VIDEO and LEARN MORE buttons
    function breathe_play_video(event:MouseEvent):void {
    Video_Breathe.load();
    this.addChild(Video_Breathe.content);
    function live_play_video(event:MouseEvent):void {
        Video_Live.load();
        this.addChild(Video_Live.content);
    function sleep_play_video(event:MouseEvent):void {
        Video_Sleep.load();
        this.addChild(Video_Sleep.content);
    function feel_play_video(event:MouseEvent):void {
        Video_Feel.load();
        this.addChild(Video_Feel.content);
function closeVideo(event:MouseEvent):void {
    Video_Breathe.unload();
    Video_Sleep.unload();
    Video_Feel.unload();
    Video_Live.unload();
    removeChild(close_btn);
    removeChild(learn_more_btn);
    removeChild(replay_btn);
    removeChild(BoxLivePic);
    removeChild(BoxSleepPic);
    //removeChild(BoxFeelPic);
// Last Breathe Buttons Added to Stage
function donePlaying_breathe(e:Event):void {
    addChild(close_btn);
    addChild(learn_more_btn);
    addChild(replay_btn)
    close_btn.x = 313;
    close_btn.y = 183;
    learn_more_btn.x = 434;
    learn_more_btn.y = 183;
    replay_btn.x = 554;
    replay_btn.y = 183;
// Last Live Buttons
function donePlaying_live(e:Event):void {
    addChild(BoxLivePic);
    addChild(close_btn);
    addChild(learn_more_btn);
    addChild(replay_btn)
    close_btn.x = 43;
    close_btn.y = 183;
    learn_more_btn.x = 164;
    learn_more_btn.y = 183;
    replay_btn.x = 284;
    replay_btn.y = 183;
// Last Sleep Buttons
function donePlaying_sleep(e:Event):void {
    addChild(BoxSleepPic);
    addChild(close_btn);
    addChild(learn_more_btn);
    addChild(replay_btn)
    close_btn.x = 313;
    close_btn.y = 183;
    learn_more_btn.x = 434;
    learn_more_btn.y = 183;
    replay_btn.x = 554;
    replay_btn.y = 183;
//Last Feel Buttons
function donePlaying_feel(e:Event):void {
    addChild(BoxFeelPic);
    addChild(close_btn);
    addChild(learn_more_btn);
    addChild(replay_btn)
    close_btn.x = 313;
    close_btn.y = 183;
    learn_more_btn.x = 434;
    learn_more_btn.y = 183;
    replay_btn.x = 554;
    replay_btn.y = 183;
// Functions Breathe
function breatheOpen(event:MouseEvent):void
    TweenLite.to(breathe_mc, 1, {y:77, ease:Elastic.easeOut});
    TweenLite.to(breathe_mc.learn_btn, .5, {alpha:1});
    TweenLite.to(breathe_mc.video_btn, .5, {alpha:1});
    //Close Live
    TweenLite.to(live_mc, 1, {y:117, ease:Elastic.easeOut});
    TweenLite.to(live_mc.learn_btn, .5, {alpha:0});
    TweenLite.to(live_mc.video_btn, .5, {alpha:0});
    //Close Sleep
    TweenLite.to(sleep_mc, 1, {y:77, ease:Elastic.easeOut});
    TweenLite.to(sleep_mc.learn_btn, .5, {alpha:0});
    TweenLite.to(sleep_mc.video_btn, .5, {alpha:0});
    //Close Feel
    TweenLite.to(feel_mc, 1, {y:77, ease:Elastic.easeOut});
    TweenLite.to(feel_mc.learn_btn, .5, {alpha:0});
    TweenLite.to(feel_mc.video_btn, .5, {alpha:0});
    //Show Pic
    TweenLite.to(pic_breathe_mc, .5, {alpha:1});
    //Hide Other Pics
    TweenLite.to(pic_live_mc, .5, {alpha:0});
    TweenLite.to(pic_sleep_mc, .5, {alpha:0});
    TweenLite.to(pic_feel_mc, .5, {alpha:0});
    //Show Text
    TweenLite.to(breathe_txt_mc, 1,{alpha:1});
    //Hide Other Text
    TweenLite.to(live_txt_mc, 1,{alpha:0});
    TweenLite.to(sleep_txt_mc, 1,{alpha:0});
    TweenLite.to(feel_txt_mc, 1,{alpha:0});
// Functions live
function liveOpen(event:MouseEvent):void
    TweenLite.to(live_mc, 1, {y:77, ease:Elastic.easeOut});
    live_mc.learn_btn.visible = true;
    live_mc.video_btn.visible = true;
    TweenLite.to(live_mc.learn_btn, .5, {alpha:1});
    TweenLite.to(live_mc.video_btn, .5, {alpha:1});
    //Close Breathe
    TweenLite.to(breathe_mc, 1, {y:117, ease:Elastic.easeOut});
    TweenLite.to(breathe_mc.learn_btn, .5, {alpha:0});
    TweenLite.to(breathe_mc.video_btn, .5, {alpha:0});
    //Close Sleep
    TweenLite.to(sleep_mc, 1, {y:77, ease:Elastic.easeOut});
    TweenLite.to(sleep_mc.learn_btn, .5, {alpha:0});
    TweenLite.to(sleep_mc.video_btn, .5, {alpha:0});
    //Close Feel
    TweenLite.to(feel_mc, 1, {y:77, ease:Elastic.easeOut});
    TweenLite.to(feel_mc.learn_btn, .5, {alpha:0});
    TweenLite.to(feel_mc.video_btn, .5, {alpha:0});
    //Show Pic
    TweenLite.to(pic_live_mc, .5, {alpha:1});
    //Hide Other Pics
    TweenLite.to(pic_sleep_mc, .5, {alpha:0});
    TweenLite.to(pic_feel_mc, .5, {alpha:0});
    //Show Text
    TweenLite.to(live_txt_mc, 1,{alpha:1});
    //Hide Other Text
    TweenLite.to(breathe_txt_mc, 1,{alpha:0});
    TweenLite.to(sleep_txt_mc, 1,{alpha:0});
    TweenLite.to(feel_txt_mc, 1,{alpha:0});
// Functions sleep
function sleepOpen(event:MouseEvent):void
    TweenLite.to(sleep_mc, 1, {y:37, ease:Elastic.easeOut});
    sleep_mc.learn_btn.visible = true;
    sleep_mc.video_btn.visible = true;
    TweenLite.to(sleep_mc.learn_btn, .5, {alpha:1});
    TweenLite.to(sleep_mc.video_btn, .5, {alpha:1});
    //Close Breathe
    TweenLite.to(breathe_mc, 1, {y:117, ease:Elastic.easeOut});
    TweenLite.to(breathe_mc.learn_btn, .5, {alpha:0});
    TweenLite.to(breathe_mc.video_btn, .5, {alpha:0});
    //Close Live
    TweenLite.to(live_mc, 1, {y:117, ease:Elastic.easeOut});
    TweenLite.to(live_mc.learn_btn, .5, {alpha:0});
    TweenLite.to(live_mc.video_btn, .5, {alpha:0});
    //Close Feel
    TweenLite.to(feel_mc, 1, {y:77, ease:Elastic.easeOut});
    TweenLite.to(feel_mc.learn_btn, .5, {alpha:0});
    TweenLite.to(feel_mc.video_btn, .5, {alpha:0});
    //Show Pic
    TweenLite.to(pic_sleep_mc, .5, {alpha:1});
    //Hide Other Pics
    TweenLite.to(pic_feel_mc, .5, {alpha:0});
    //Show Text
    TweenLite.to(sleep_txt_mc, 1,{alpha:1});
    //Hide Other Text
    TweenLite.to(live_txt_mc, 1,{alpha:0});
    TweenLite.to(breathe_txt_mc, 1,{alpha:0});
    TweenLite.to(feel_txt_mc, 1,{alpha:0});
// Functions feel
function feelOpen(event:MouseEvent):void
    TweenLite.to(feel_mc, 1, {y:37, ease:Elastic.easeOut});
    feel_mc.learn_btn.visible = true;
    feel_mc.video_btn.visible = true;
    TweenLite.to(feel_mc.learn_btn, .5, {alpha:1});
    TweenLite.to(feel_mc.video_btn, .5, {alpha:1});
    //Close Breathe
    TweenLite.to(breathe_mc, 1, {y:117, ease:Elastic.easeOut});
    TweenLite.to(breathe_mc.learn_btn, .5, {alpha:0});
    TweenLite.to(breathe_mc.video_btn, .5, {alpha:0});
    //Close Live
    TweenLite.to(live_mc, 1, {y:117, ease:Elastic.easeOut});
    TweenLite.to(live_mc.learn_btn, .5, {alpha:0});
    TweenLite.to(live_mc.video_btn, .5, {alpha:0});
    //Close Sleep
    TweenLite.to(sleep_mc, 1, {y:77, ease:Elastic.easeOut});
    TweenLite.to(sleep_mc.learn_btn, .5, {alpha:0});
    TweenLite.to(sleep_mc.video_btn, .5, {alpha:0});
    //Show Pic
    TweenLite.to(pic_feel_mc, .5, {alpha:1});
    //Show Text
    TweenLite.to(feel_txt_mc, 1,{alpha:1});
    //Hide Other Text
    TweenLite.to(live_txt_mc, 1,{alpha:0});
    TweenLite.to(sleep_txt_mc, 1,{alpha:0});
    TweenLite.to(breathe_txt_mc, 1,{alpha:0});

This error means that you are trying to access an object on display list that (object) is not there.
For example, if close_btn instance is not added as child, the following line will throw this error:
removeChild(close_btn);
One of the ways to remedy this is to confirm that the object is added:
if(contains(close_btn)) removeChild(close_btn);

Similar Messages

  • ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.

    Evenin' all.
    I'm creating a Flash application split up into scenes. One of the scenes is divided into sections of ten frames with keyframes at 1 (home, 10, 20, 30, 40, 50, 60, 70, 80 and 90. Frame #1 is the menu and contains the buttons to skip to each section using the gotoAndStop(); command.
    However, I want to be able to skip to #1 from any point using Next/Previous buttons. I have declared the buttons in frame 1 of scene 1 as follows:
    I have declared the buttons in frame 1 of scene 1 as follows:
    Code:
    var nextButton:Button = new Button();
    var prevButton:Button = new Button();
    var homeButton:Button = new Button();
    At each point, I use addChild(nextButton) to add the buttons to  the stage, and when the buttons are clicked it removes them as follows:
    Code:
    nextButton.addEventListener(MouseEvent.CLICK, goNext);
    function goNext(e:Event):void
          removeChild(videoPlayer);
          removeChild(prevButton);
          removeChild(nextButton);
          removeChild(homeButton);
          gotoAndStop(20);
    Now, all the 'Next' buttons work but none of the 'Previous'  buttons work, when all they do is gotoAndStop() ten frames backwards  rather than ten frames forwards, I keep getting this error message:
    Code:
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
         at flash.display::DisplayObjectContainer/removeChild()
         at Prototype_fla::MainTimeline/goBack()
    The same is happening with the Home buttons, which skip from whichever frame the user is on to the menu. The Next buttons are the only ones working consistently.
    Please help, this is really stressing me out, I'm on Flash CS4.
    Cheers

    You can`t remove the target of your event while it is "active"
    you wrote....
    nextButton.addEventListener(MouseEvent.CLICK, goNext);
    function goNext(e:Event):void
          removeChild(videoPlayer);
          removeChild(prevButton);
          removeChild(nextButton);
          removeChild(homeButton);
          gotoAndStop(20);
    instead you should write sth. like:
    nextButton.addEventListener(MouseEvent.CLICK, goNext);
    function goNext(e:Event):void
      // to be sure that there`s actualloy sth. to remove
          if(videoPlayer!=null){
          removeChild(videoPlayer);
         //similar  
         removeChild(prevButton);
          removeChild(homeButton);                
          e.currentTarget.removeEventListener(MouseEvent.CLICK, goNext)     
          removeChild(e.currentTarget);     
          gotoAndStop(20);
    this is probably similar in your other function, too

  • Unexplainable exception:  "The supplied DisplayObject must be a child of the caller"

    What am I missing in the following code?  How is the indicated exception possible?  It seems to me that it simply "can't happen", yet it reliably does.
    I'm checking to see if a component is a child of "this", and if it is, I attempt to remove that child.  The remove faults.  Any thoughts?
                if (tf != null && this.contains(tf) == true)
                    this.removeChild(tf);   // Generates exception "The supplied DisplayObject must be a child of the caller"
                    tf=null;

    Check out the documentation for contains().  I suspect that tf isn't actually a child of this, but rather a grand child, or great grand child, ... .

  • Error #2025:The supplied DisplayObject must be a child of the caller - Removing Object from Array

    Hi guys, I'm pretty new to as3 and I'm trying to make a game where the player supposedly clicks on the stage and 3 towers which I've spawned dynamically should shoot towards the area. Everything works in terms of tower rotation, etc, but the bullets will not be removed from the stage when I exit the level into another scene. The boundary checking is fine, too.
    Here's a part of the code in the Main.as file.
    private function clickTower1(e:MouseEvent):void
    for each (var tower1:mcTower1 in tower1Array)
    var newLaser1:mcLaser1 = new mcLaser1();
    newLaser1.rotation = tower1.rotation;
    newLaser1.x = tower1.x + Math.cos(newLaser1.rotation * Math.PI / 180) * 40;
    newLaser1.y = tower1.y + Math.sin(newLaser1.rotation * Math.PI / 180) * 40;
    newLaser1.addEventListener(Event.ENTER_FRAME, laser1Handler);
    tower1BulletArray.push(newLaser1); stage.addChild(newLaser1);
      private function laser1Handler(e:Event):void
    //Make laser move in direction of turret.
    var newLaser1:MovieClip = e.currentTarget as MovieClip;
    newLaser1.x += Math.cos(newLaser1.rotation * Math.PI / 180) * laser1Speed;
    newLaser1.y += Math.sin(newLaser1.rotation * Math.PI / 180) * laser1Speed;
    //Boundary checking if (newLaser1.x < -50 || newLaser1.x > 800 || newLaser1.y > 600 || newLaser1.y < -50)
    newLaser1.removeEventListener(Event.ENTER_FRAME, laser1Handler); stage.removeChild(newLaser1);
    tower1BulletArray.splice(0, 1);
    I have a function called exitLevel, which basically, as the name states, exits the level when a button is clicked. It worked perfectly before I started coding the bullets.
        private function exitLevel(e:MouseEvent):void
    stage.frameRate = 6;
    gamePaused = false;
    clearLevel();
    gotoAndStop(1, 'exitLevel');
    btnExitLevel.addEventListener(MouseEvent.CLICK, levelSelect1);
      private function clearLevel():void
    stage.removeEventListener(Event.ENTER_FRAME, update);
    stage.removeChild(buttonCreep1); stage.removeChild(buttonCreep2);
    for (var i = creep1Array.length - 1; i >= 0; i--)
    removeChild(creep1Array[i]);
    creep1Array.splice(i, 1);
    //trace ("Creep1 Removed");
    for (var j = creep2Array.length - 1; j >= 0; j--)
    removeChild(creep2Array[j]);
    creep2Array.splice(j, 1);
    //trace ("Creep2 Removed");
    for (var k = tower1Array.length - 1; k >= 0; k--)
    removeChild(tower1Array[k]); tower1Array.splice(k, 1);
    for (var l = tower1BulletArray.length - 1; l >= 0; l--)
      stage.removeChild(tower1BulletArray[l]);
    tower1BulletArray.splice(0, 1);
    After debugging, it says the error is at the end, where i try to remove the child from the stage. What is wrong? Sorry, I'm a beginner at as3 so any answers might have to be spoonfeeding... I'll try to learn and understand, though. Thanks!
    I did take some of the code off of a guide on the web, and I don't understand it totally, so can someone explain to me what this code does as well? What is e.currentTarget? Thanks!
    var newLaser1:MovieClip = e.currentTarget as MovieClip;
    Here's the full .as file if anybody wants to take a look. http://pastebin.com/5ff4BQa5

    Hi, I managed to solve the errors (kind of) by using this code.
    for (var i:int = tower1BulletArray.length - 1; i >= 0; i--)
    if (tower1BulletArray.parent)
    tower1BulletArray[l].parent.removeChild(tower1BulletArray[l]);
    tower1BulletArray.splice(i, 1);
    However, the problem still persists that the bullets stay in the screen after I change the scene. Any solution? Thanks!

  • Adding Radio Button dynamically, twice - Error #2025: The supplied DisplayObject must be a child of

    Hello
    I am having some trouble adding UI controls dynamically. Mostly with radio buttons.
    Here is an example that demonstrates my problem:
    <s:Application
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark" 
        xmlns:mx="library://ns.adobe.com/flex/mx"
        creationPolicy="all"
        >
        <fx:Script>
            <![CDATA[ 
                import mx.containers.Form;
                import mx.containers.Panel;
                import mx.controls.Label;
                import mx.controls.NumericStepper;
                import mx.controls.RadioButton;
                private var theChar:String = "B";
                protected function btnAdd_clickHandler(event:MouseEvent):void
                    var theForm:Form = new Form();               
                    theForm.label = theChar;
                    //1. Label
                    var myLabel:Label = new Label();
                    myLabel.text = "My Label";
                    myLabel.width=120;
                    theForm.addChild(myLabel);
                    //2. Numeric Stepper
                    var myNumStepper:NumericStepper = new NumericStepper();
                    myNumStepper.id = "numPointHigh" + theChar;
                    myNumStepper.name = "numPointHigh" + theChar;
                    myNumStepper.minimum = 0;
                    myNumStepper.maximum = 120;
                    myNumStepper.width = 50;
                    myNumStepper.height = 30;
                    theForm.addChild(myNumStepper);
                    //3. radio button
                    var myRadioButton:RadioButton = new RadioButton;
                    myRadioButton.id = "myRadioButton" + theChar;
                    myRadioButton.name = "myRadioButton" + theChar;
                    myRadioButton.label = "my radio button";
                    myRadioButton.selected = true;
                    theForm.addChild(myRadioButton);
                    //4. Panel
                    var thePanel:Panel = new Panel();
                    thePanel.width = 300;
                    thePanel.height = 475;
                    thePanel.name=theChar;
                    thePanel.title = "My Profile Panel";
                    thePanel.setStyle("backgroundColor", "blue");
                    //add the form to the panel
                    thePanel.addChild(theForm);
                    //add the Panel to the list control
                    myList.addChild(thePanel);
                protected function btnClear_clickHandler(event:MouseEvent):void
                    var numChildren:Number = myList.numChildren;
                    for(var i:Number=numChildren - 1; i > -1; i--){
                        myList.removeChildAt(i);
            ]]>
        </fx:Script>
        <mx:VBox width="100%">
            <mx:List id="myList" />
            <mx:Button id="btnAdd" label="Add a panel" click="btnAdd_clickHandler(event)" color="black"/>
            <mx:Button id="btnClear" label="Clear" click="btnClear_clickHandler(event)" color="black" />
        </mx:VBox>
    </s:Application>
    ^ Run that. Click the "Add a panel" button. Then click "Clear". Then click the "Add a panel" button again. You will see the error:
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
        at flash.display::DisplayObjectContainer/getChildIndex()
        at mx.core::Container/getChildIndex()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core \Container.as:2833]
        at mx.containers::Panel/getChildIndex()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\co ntainers\Panel.as:1174]
        at mx.controls::RadioButtonGroup/breadthOrderCompare()[E:\dev\4.0.0\frameworks\projects\fram ework\src\mx\controls\RadioButtonGroup.as:600]
        at mx.controls::RadioButtonGroup/breadthOrderCompare()[E:\dev\4.0.0\frameworks\projects\fram ework\src\mx\controls\RadioButtonGroup.as:611]
        at mx.controls::RadioButtonGroup/breadthOrderCompare()[E:\dev\4.0.0\frameworks\projects\fram ework\src\mx\controls\RadioButtonGroup.as:611]
        at Array$/_sort()
        at Array/http://adobe.com/AS3/2006/builtin::sort()
        at mx.controls::RadioButtonGroup/http://www.adobe.com/2006/flex/mx/internal::addInstance()[E:\dev\4.0.0\frameworks\projects \framework\src\mx\controls\RadioButtonGroup.as:465]
        at mx.controls::RadioButton/addToGroup()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\c ontrols\RadioButton.as:574]
        at mx.controls::RadioButton/commitProperties()[E:\dev\4.0.0\frameworks\projects\framework\sr c\mx\controls\RadioButton.as:514]
        at mx.core::UIComponent/validateProperties()[E:\dev\4.0.0\frameworks\projects\framework\src\ mx\core\UIComponent.as:7772]
        at mx.managers::LayoutManager/validateProperties()[E:\dev\4.0.0\frameworks\projects\framewor k\src\mx\managers\LayoutManager.as:572]
        at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.0.0\frameworks\projects\frame work\src\mx\managers\LayoutManager.as:730]
        at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.0.0\frameworks\projec ts\framework\src\mx\managers\LayoutManager.as:1072]
    I do not understand why I cannot re-add the radio button? If you comment out the code for the radio button (comment section #3.) you can re-add the panels easily. It is only happening when I have radio buttons being added to the form/panel.
    Why is this happening and how do I fix it? Why is this only happening to radio buttons? I thought I had this fixed

    ^ well, okay, but that's not the problem.
    here, i removed list and replaced with Panel. same problem on the radio buttons.
    <s:Application
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark" 
        xmlns:containers="com.dougmccune.containers.*"
        xmlns:mx="library://ns.adobe.com/flex/mx"
        creationPolicy="all"
        >
        <fx:Script>
            <![CDATA[ 
                import mx.containers.Form;
                import mx.containers.Panel;
                import mx.controls.Label;
                import mx.controls.NumericStepper;
                import mx.controls.RadioButton;
                private var theChar:String = "B";
                protected function btnAdd_clickHandler(event:MouseEvent):void
                    var theForm:Form = new Form();               
                    theForm.label = theChar;
                    //1. Label
                    var myLabel:Label = new Label();
                    myLabel.text = "My Label";
                    myLabel.width=120;
                    theForm.addChild(myLabel);
                    //2. Numeric Stepper
                    var myNumStepper:NumericStepper = new NumericStepper();
                    myNumStepper.id = "numPointHigh" + theChar;
                    myNumStepper.name = "numPointHigh" + theChar;
                    myNumStepper.minimum = 0;
                    myNumStepper.maximum = 120;
                    myNumStepper.width = 50;
                    myNumStepper.height = 30;
                    theForm.addChild(myNumStepper);
                    //3. radio button
                    var myRadioButton:RadioButton = new RadioButton;
                    myRadioButton.id = "myRadioButton" + theChar;
                    myRadioButton.name = "myRadioButton" + theChar;
                    myRadioButton.label = "my radio button";
                    myRadioButton.selected = true;
                    theForm.addChild(myRadioButton);
                    //4. Panel
                    var thePanel:Panel = new Panel();
                    thePanel.width = 300;
                    thePanel.height = 475;
                    thePanel.name=theChar;
                    thePanel.title = "My Profile Panel";
                    thePanel.setStyle("backgroundColor", "blue");
                    //add the form to the panel
                    thePanel.addChild(theForm);
                    //add the Panel to the list control
                    myContainer.addChild(thePanel);
                protected function btnClear_clickHandler(event:MouseEvent):void
                    var numChildren:Number = myContainer.numChildren;
                    for(var i:Number=numChildren - 1; i > -1; i--){
                        myContainer.removeChildAt(i);
            ]]>
        </fx:Script>
        <mx:VBox width="100%">
            <mx:Panel id="myContainer" />
            <mx:Button id="btnAdd" label="Add a panel" click="btnAdd_clickHandler(event)" color="black"/>
            <mx:Button id="btnClear" label="Clear" click="btnClear_clickHandler(event)" color="black" />
        </mx:VBox>
    </s:Application>
    Any idea why radio buttons causing this to happen? If I comment out the radio button, this works fine. This is really baffling me.
    The exception is thrown when the dynamically created panel (thePanel) is added to the main Panel (myContainer):
    myContainer.addChild(thePanel); <--- causes the exception!
    ^ Why would radio buttons make a difference on "thePanel"?? How can I enforce parent-child relationship, explicitly? .parent is read-only

  • DisplayObject must be a child of the caller.

    I am trying to remove the existing childs  (combobox and pods are the content in the page) using
    viewStack.selectedChild.removeAllChildren();
    in a tab click from the Viewstacks canvas.
    then I am trying to add new child.
    it gives this error.
    The supplied DisplayObject must be a child of the caller.
    at flash.display::DisplayObjectContainer/getChildIndex()
    at mx.core::Container/setChildIndex()[C:\autobuild\3.2.0\frameworks\projects\framework\src\m x\core\Container.as:2449]
    Please help me to fix this

    private function onApplicationComplete():void{
    var arrView:Array =new Array();arrView=viewStack.getChildren();
    viewLength=arrView.length;
    // Load pods.xml, which contains the pod layout. 
    var httpService:HTTPService = new HTTPService();httpService.url =
    "data/pods.xml";httpService.resultFormat =
    "e4x";httpService.addEventListener(FaultEvent.FAULT, onFaultHttpService);
    httpService.addEventListener(ResultEvent.RESULT, onResultHttpService);
    httpService.send();
    private function onFaultHttpService(e:FaultEvent):void{
    Alert.show(
    "Unable to load data/pods.xml.");}
    public var viewXMLList:XMLList =new XMLList(); 
    private function onResultHttpService(e:ResultEvent):void{
    viewXMLList = e.result.view;
    var podcontentbase:PodContentBase=new PodContentBase; 
    var containerWindowManagerHash:Object = new Object();  
    var len:Number = viewXMLList.length(); 
    if (podLayoutManagers.length!=0)podLayoutManagers.splice(0,podLayoutManagers.length);
    for (var i:Number = 0; i < len; i++) // Loop through the view nodes.{
    // Create a canvas for each view node. 
    var canvas:Canvas = new Canvas(); 
    // PodLayoutManager handles resize and should prevent the need for 
    // scroll bars so turn them off so they aren't visible during resizes.canvas.horizontalScrollPolicy =
    "off";canvas.verticalScrollPolicy =
    "off";canvas.label = viewXMLList[i].@label;
    canvas.percentWidth = 100;
    canvas.percentHeight = 100;
    viewStack.addChild(canvas);
    traceDL(viewStack);
    // Create a manager for each view. 
    var manager:PodLayoutManager = new PodLayoutManager();manager.container = canvas;
    manager.id = viewXMLList[i].@id;
    manager.addEventListener(LayoutChangeEvent.UPDATE, StateManager.setPodLayout);
    // Store the pod xml data. Used when view is first made visible.podDataDictionary[manager] = viewXMLList[i].pod;
    //podcontentbase.podDataDictionarycopy[manager] = viewXMLList[i].pod; 
    podLayoutManagers.push(manager);
    onchange();
    private function onchange():void{
    tabBar.dataProvider=viewStack;
    var index:Number = StateManager.getViewIndex(); 
    // Make sure the index is not out of range. 
    // This can happen if a tab view was saved but then tabs were subsequently removed from the XML.index = Math.min(tabBar.numChildren - 1, index);
    onItemClickTabBar(
    new ItemClickEvent(ItemClickEvent.ITEM_CLICK, false, false, null, index));tabBar.selectedIndex = index;
    private var indextab:Number; 
    private function onItemClickTabBar(e:ItemClickEvent):void{
    indextab = e.index;
    StateManager.setViewIndex(indextab);
    // Save the view index.viewStack.selectedIndex = indextab;
    if( this.contains( viewStack.selectedChild) )viewStack.selectedChild.removeAllChildren();
    traceDL(
    this);

  • Error 2050 with Menu and States - DisplayObject must be a child of the caller.

    Hi,
    I'm starting an application using States and a main Menu and
    when you click on the menu Item it changes the currentState.
    I was doing fine until I wanted to dock the Menu using an
    ApplicationControlBar.
    You can see the error message:
    http://dev2003.greatkingcasino.com/flex/casinomanagement.html
    My Idea is have always the menu on top and use States for
    each one of the menuItems. How can be done?
    Thanks,
    Paul
    Code:
    AS File:
    // MENU PERMISSIONS
    private function initApp():void
    dsData.send();
    }//initApp
    private function onResultMenuData(oEvent:ResultEvent):void
    xlcMenuData = new
    XMLListCollection(oEvent.result.children());
    private function menuHandler(oEvent:MenuEvent):void {
    currentState = oEvent.item.@label;
    MXML File:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="initApp()" currentState="navigation">
    <mx:Script source="functions.as"/>
    <mx:states>
    <mx:State name="logIn">
    blah
    </mx:State>
    <mx:State name="navigation">
    <mx:SetProperty name="layout" value="absolute"/>
    <mx:AddChild position="lastChild">
    <mx:ApplicationControlBar dock="true">
    <mx:MenuBar x="0" y="0"
    dataProvider="{xlcMenuData}"
    labelField="@label"
    itemClick="menuHandler(event);">
    </mx:MenuBar>
    </mx:ApplicationControlBar>
    </mx:AddChild>
    </mx:State>
    <mx:State name="Customer Detail" basedOn="navigation">
    <mx:AddChild position="lastChild">
    <mx:Panel x="0" y="111" width="464" height="247"
    layout="absolute" title="General Information">
    </mx:Panel>
    </mx:AddChild>
    <mx:AddChild position="lastChild">
    <mx:Panel x="472" y="111" width="350" height="530"
    layout="absolute" title="Customer Information">
    <mx:Form x="0" y="0" width="310" height="100%">
    </mx:Form>
    <mx:ControlBar>
    <mx:Button label="Update Information"/>
    </mx:ControlBar>
    </mx:Panel>
    </mx:AddChild>
    <mx:AddChild position="lastChild">
    <mx:Panel x="0" y="366" width="300" height="247"
    layout="absolute" title="Login Information">
    </mx:Panel>
    </mx:AddChild>
    <mx:AddChild position="lastChild">
    <mx:Label text="User Name" x="347" y="59"/>
    </mx:AddChild>
    <mx:AddChild position="lastChild">
    <mx:TextInput id="idCustomerID" text="1" x="421"
    y="57"/>
    </mx:AddChild>
    <mx:AddChild position="lastChild">
    <mx:Button label="Search"
    click="netService.GetCustomerDetails(idCustomerID.text);" x="589"
    y="57"/>
    </mx:AddChild>
    </mx:State>
    <mx:State name="Player Stats" basedOn="navigation">
    <mx:AddChild position="lastChild">
    <mx:Canvas label="Canvas 1" width="260"
    backgroundColor="#e2e2e2" id="canvas6" height="580" y="61">
    <mx:DateChooser x="10" y="66" id="datechooser1"/>
    <mx:DateChooser x="10" y="290" id="datechooser2"/>
    <mx:Button x="185" y="10" label="Search"
    id="button1"/>
    <mx:NumericStepper x="192" y="92" id="iniHour1" value="0"
    minimum="0" maximum="23"/>
    <mx:NumericStepper x="192" y="148" id="iniMinute1"
    value="0" minimum="0" maximum="59"/>
    <mx:Label x="10" y="40" text="Start Date"
    fontWeight="bold" id="label1"/>
    <mx:Label x="10" y="264" text="End Date"
    fontWeight="bold" id="label2"/>
    <mx:Label x="192" y="66" text="Hour" id="label3"/>
    <mx:Label x="192" y="122" text="Minute" id="label4"/>
    <mx:NumericStepper x="192" y="204" id="iniSecond1"
    value="0" minimum="0" maximum="0"/>
    <mx:Label x="192" y="178" text="Second" id="label5"/>
    <mx:NumericStepper x="192" y="316" id="endHour1"
    value="23" minimum="0" maximum="23"/>
    <mx:NumericStepper x="192" y="372" id="endMinute1"
    value="59" minimum="0" maximum="59"/>
    <mx:Label x="192" y="290" text="Hour" id="label6"/>
    <mx:Label x="192" y="346" text="Minute" id="label7"/>
    <mx:NumericStepper x="192" y="428" id="endSecond1"
    value="59" minimum="59" maximum="59"/>
    <mx:Label x="192" y="402" text="Second" id="label8"/>
    </mx:Canvas>
    </mx:AddChild>
    <mx:AddChild position="lastChild">
    <mx:Canvas label="Canvas 2" width="486"
    backgroundColor="#e2e2e2" id="canvas7" height="1200" x="268"
    y="61">
    <mx:DataGrid x="10" y="10" width="402" height="100%"
    id="datagrid1">
    <mx:columns>
    <mx:DataGridColumn headerText="Player"
    dataField="col1"/>
    <mx:DataGridColumn headerText="Risk"
    dataField="col2"/>
    <mx:DataGridColumn headerText="Win" dataField="col3"/>
    <mx:DataGridColumn headerText="Casino win"
    dataField="col1"/>
    <mx:DataGridColumn headerText="Percent (%)"
    dataField="col2"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Canvas>
    </mx:AddChild>
    </mx:State>
    <mx:State name="Casino Usage" basedOn="navigation">
    </mx:State>
    </mx:states>
    <mx:HTTPService id="dsData" url="MenuData.xml"
    resultFormat="e4x" result="onResultMenuData(event)"/>
    </mx:Application>
    Text

    try{
    catch(error:Error){
    finally{
    (look up error handling in documentation)

  • Error Message FF747  -The tax amount must not be greater than the tax base

    Hello,
    We are attempting to post an import vendor invoice through transaction    FB60 for Israel company code . Since the tax charged by the vendor is not fixed every time , we are entering the tax amount in the    FB60 screen manually , without selecting 'calculate tax'.The amount of tax is greater than the amount of expense as per the real business scenario. For example amount of expense is 100, amount of tax is 200 and the total amount charged by the vendor is 300 .However when we simulate the posting we get an error - The tax amount must not be greater than the tax base-Message no. FF747
    We tried putting a very high percentage in the tax code also but it didn't help
    We would like to go ahead with this posting. Could you pl throw light on the same . ? Is there any way (OSS note ) or a work around which can resolve the issue ?
    Best Regards
    Amit  Kulkarni

    Hello
    This may be  a work around in other cases , but since we want the amount to be updated in the BSET table for further VAT reports , we would like  this to be posted along with the expense item

  • The tax amount must not be greater than the tax base

    Hi Experts,
    User is trying to "Relase to Account" in t-code VF01 he is getting an error message The tax amount must not be greater than the tax base.
    During Debuging i found the error is raised in Function module      RV_ACCOUNTING_DOCUMENT_CREATE
    Message raised is
    Message Class : FF
    Message number: 747
    Mesage "The tax amount must not be greater than the tax base"
    Request to through some lights on this issue.
    Reagrds
    Sree

    Hi,
    did you check SAPNET notes with "VF01" and the message class/number as search terms. There are some notes dealing with this case eg 872449, and 184985.
    Best regards, Christian

  • Will the supplier invoice number come to FA when the asset is capitalised f

    Will the supplier invoice number come to FA when the asset is capitalised from proejcts?

    Dear Suresh,
    Do you mean while setting Capital project type, we need to set up the Grouping?
    Can you pls elobrate, if i'm wrong?
    Rgds
    Edited by: user12990981 on 21 Aug, 2011 11:55 PM

  • HT201084 I entered the wrong birth year for my child in the family share account. What can I do to correct it?

    I entered the wrong birth year for my child in the family share account. What can I do to correct it?

    press the blue arrow on your WiFi hub name and tell it to "forget this Network"
    Now go back to it and it should prompt for password

  • I just entered the podcast world. I am having trouble with my rss code. This is the error i recieve from itunes when trying to submit the url. Error Parsing Feed: invalid XML:Error line 64:XML documents must start and end within the same entity

    <?xml version="1.0"?>
    <rss xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:itunes="http://www.itunes.com/DTDs/Podcast-1.0.dtd"
    Verson="2.0">
    <channel>
    <title>KPNC Regional Toxcast</title>
    <link>http://kpssctoxicology.org/edu.htm</link>
    <description>KP Toxcast test podcast</description>
    <webMaster>[email protected]</webMaster>
    <managingEditor>[email protected]</managingEditor>
    <pubDate>Tue, 27 Sep 2011 14:21:32 PST</pubDate>
    <category>Science & Medicine</category>
      <image>
       <url>http://kpssctoxicology.org/images/kp tox logo.jpg</url>
       <width>100</width>
       <height>100</height>
       <title>KPNC Regional Toxcast</title>
      </image>
    <copyright>Copyright 2011 Kaiser Permanente. All Rights Reserved.</copyright>
    <language>en-us</language>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <!-- iTunes specific namespace channel elements -->
    <itunes:subtitle>The Kaiser Permanente Northern California (KPNC) Regional Toxicology Service                  Podcast</itunes:subtitle>
    <itunes:summary>This is the podcast (toxcast) of the KPNC Regional Toxicology Service. Providing                 Kaiser and non-Kaiser physicians with anything toxworthy</itunes:summary>
    <itunes:owner>
       <itunes:email>[email protected]</itunes:email>
       <itunes:name>G. Patrick Daubert, MD</itunes:name>
    </itunes:owner>
    <itunes:author>G. Patrick Daubert, MD</itunes:author>
    <itunes:category text="Science & Medicine"></itunes:category>
    <itunes:link rel="image" type="video/jpeg" href="http://kpssctoxicology.org/images/kp tox                   logo.jpg">KPNC Toxcast</itunes:link>
    <itunes:explicit>no</itunes:explicit>
    <item>
       <title>KPNC Regional Toxcast Sample File</title>
       <link>http://kpssctoxicology.org/edu.htm</link>
       <comments>http://kpssctoxicology.org#comments</comments>
       <description>This is the podcast (toxcast) of the KPNC Regional Toxicology Service. Providing                Kaiser and non-Kaiser physicians with anything toxworthy</description>
       <guid isPermalink="false">1808@http://kpssctoxicology.org/Podcast/</guid>
       <pubDate>Tue, 27 Sep 2011 14:21:32 PST</pubDate>
       <category>Science & Medicine</category>
       <author>[email protected]</author>
       <enclosure url="http://kpssctoxicology.org/podcast/kptoxcast_test_092711.mp3" length="367000"                   type="audio/mpeg" />
       <!-- RDF 1.0 specific namespace item attribute -->
       <content:encoded><![CDATA[<p><strong>Show Notes</strong></p>
       <p><a href="KPNC" _mce_href="http://kpssctoxicology.org/">KPNC">http://kpssctoxicology.org/">KPNC Regional Toxicology Service</a> is comprised of               Steve Offerman, MD; Michael Young, MD; Patrick Whitely; and G. Patrick Daubert, MD.               Awesome team!
       <p>Download <a href="KPNC" _mce_href="http://kpssctoxicology.org/podcast/kptoxcast_test_092711.mp3">KPNC"> http://kpssctoxicology.org/podcast/kptoxcast_test_092711.mp3">KPNC Sample               Toxcast</a></p>]]</content:encoded>
       <!-- iTunes specific namespace channel elements -->
       <itunes:author>G. Patrick Daubert, MD</itunes:author>
       <itunes:subtitle>The Kaiser Permanente Northern California (KPNC) Regional Toxicology Service                    Podcast</itunes:subtitle>
       <itunes:summary>This is the podcast (toxcast) of the KPNC Regional Toxicology Service.                   Providing Kaiser and non-Kaiser physicians with anything
                       toxworthy </itunes:summary>
       <itunes:category text="Medicine"></itunes:category>
       <itunes:duration>00:00:18</itunes:duration>
       <itunes:explicit>no</itunes:explicit>
       <itunes:keywords>daubert,toxicology,toxcast</itunes:keywords>
      </item>
    </channel>
    </rss>

    Please when you have a query post the URL of your feed, not its contents.  Is this your feed? -
    http://kpssctoxicology.org/Podcast/kptoxcast_test_rss_092711.xml
    You have a number of cases of a string of spaces in titles: you also have one in a URL which will render that link invalid.
    But what is rendering the whole feed unreadable is your category link:
    <category>Science & Medicine</category>
    The presence of an ampersand ('&') by itself indicates the start of a code sequence, and in the absence of one, and its closing character, invalidates everything which follows, and thus the entire feed. You must replace the ampersand with the code
    &amp;
    Additionally, your opening lines should read thus:
    <?xml version="1.0" encoding="UTF-8"?>
    <rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
    (with the 'purl.org' line if you like).
    If you are going to submit a feed to iTunes you might want to reconsider have 'test' in the filename: apart from the Store having a tendency to reject obvious test podcasts which may not reflect the finished version, you will be stuck with this URL and though you can change the feed URL it's an additional hassle.

  • Having a problem with mini dvi to hdmi.  Can see the background, but must move all screens all the way to the right to see on tv.  Any solutions?

    I'm having an issue with setting up mini dvi to hdmi.  I can connect and see the background picture from my macbook (approx 4 years old) but in order to see any screens or video, I have to move the screen almost all the way off the macbook display to the right.  Any ideas why this would happen?  Also, there is no audio, although when I bought the adapter and cable at the Mac store, they assured me it would handle both.

    You have the display set in Extended Desktop mode. In System Preferences>Displays on the MacBook screen there should be an Arrangement tab when you have the MacBook hooked up to the TV and both screens working. When you click the Arrangement tab do you see two monitors side by side? One of them will have a Menu Bar at the top. Just click on the Menu Bar and drag it to the second monitor. That will makethe second monitor your main screen. You can now use your MacBook in ClamshellMode with a wired or Bluetooth keyboard and mouse.  http://support.apple.com/kb/HT3131 When you disconnect from the TV your Menu Bar will automatically change back to the MacBook.
    Or if you want to work on the MacBook screen while showing it on a TV you can check the Mirror Display box on the lower left hand side of the Arrangement tab under the two monitors box.
    No Mini-DVI adapter can carry audio. The only MacBook that sends audio is the Mid 2010 model 7,1 through a Mini DisplayPort.
    If you connect the MacBook using a Mini-DVI to HDMI adapter you will probably need to use external speakers or a 3.5mm stereo headphone jack to RCA sound plugs connected to a stereo system for audio if your TV doesn't have separate RCA input plugs for audio with the HDMI plug. The Mini-DVI to HDMI doesn't carry audio and there're no audio plugs on most TVs to work with HDMI since it's expecting audio with the HDMI.

  • Image Gallery - ArgumentError: Error #2025

    Hi Guys,
    I am new to flash cs3 and action script 3.0. I have made 3
    image galleries, that all work fine by themselves, however i have
    recently tried to link them to a central flash file and I am
    getting the error:
    ArgumentError: Error #2025: The supplied DisplayObject must
    be a child of the caller.
    at flash.display::DisplayObjectContainer/removeChild()
    at home_fla::MainTimeline/gotoHome()
    I have attached the code for the central/home flash file
    below.
    Basically, all I am trying to achieve is to add the
    client_images.swf as a child when the client images button is
    clicked and then listen for a mouse click on the client_images home
    button and remove the child. This works if I click the home button
    straight away. If i don't click the home button with in 3 seconds,
    i get the error.
    I have had a good look for a solution to this problem and
    haven't had much luck. Any help would be greatly appreciated. I can
    send the .fla's if you need more information.
    Cheers,
    Paul.

    what's happening in client_images.swf? ie, btn_home is on the
    main timeline. and that timeline has more than 1 frame, correct?
    if yes, when 3 seconds expires the playhead is on a frame
    where btn_home does not exist. ie, make sure it's the same instance
    in frame 1 and frame whatever by clearing keyframes and re-creating
    them on btn_home's layer.

  • PeerToPeerRtmfp.mxml sample Error #2025

    Hi,
    I'm trying out the PeerToPeerRtmfp.mxml sample of the LCCS SDK.
    Environement:
    Windows 7
    Flash Builder 4.5
    SDK 4.5
    LCCS 10.3
    Player 10.3
    Scenario:
    enter all requie room parameters and try to login
    Problem:
    After login I'm gettign an error:
         ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
    This is a more full log:
    20:11:10 GMT+0300    RECEIVENODES UserManager
    20:11:10 GMT+0300    receiveAllSynchData UserManager
    20:11:10 GMT+0300    RECEIVENODES FileManager
    20:11:10 GMT+0300    receiveAllSynchData FileManager
    20:11:10 GMT+0300    checkManagerSync:[object FileManager]
    20:11:10 GMT+0300    RECEIVENODES AVManager
    20:11:10 GMT+0300    receiveAllSynchData AVManager
    20:11:10 GMT+0300    checkManagerSync:[object StreamManager]
    20:11:12 GMT+0300    RECEIVENODES RoomManager
    20:11:12 GMT+0300    receiveAllSynchData RoomManager
    20:11:12 GMT+0300    checkManagerSync:[object RoomManager]
    20:11:12 GMT+0300    checkManagerSync:[object UserManager]
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
    at flash.display::DisplayObjectContainer/getChildIndex()
    at mx.core::Container/getChildIndex()[E:\dev\hero_private\frameworks\projects\mx\src\mx\core \Container.as:2835]
    at mx.containers::Panel/getChildIndex()[E:\dev\hero_private\frameworks\projects\mx\src\mx\co ntainers\Panel.as:1179]
    at mx.controls::RadioButtonGroup/breadthOrderCompare()[E:\dev\hero_private\frameworks\projec ts\mx\src\mx\controls\RadioButtonGroup.as:611]
    at mx.controls::RadioButtonGroup/breadthOrderCompare()[E:\dev\hero_private\frameworks\projec ts\mx\src\mx\controls\RadioButtonGroup.as:622]
    at mx.controls::RadioButtonGroup/breadthOrderCompare()[E:\dev\hero_private\frameworks\projec ts\mx\src\mx\controls\RadioButtonGroup.as:622]
    at mx.controls::RadioButtonGroup/breadthOrderCompare()[E:\dev\hero_private\frameworks\projec ts\mx\src\mx\controls\RadioButtonGroup.as:622]
    at Array$/_sort()
    at Array/http://adobe.com/AS3/2006/builtin::sort()
    at mx.controls::RadioButtonGroup/http://www.adobe.com/2006/flex/mx/internal::addInstance()[E:\dev\hero_private\frameworks\p rojects\mx\src\mx\controls\RadioButtonGroup.as:473]
    at mx.controls::RadioButton/addToGroup()[E:\dev\hero_private\frameworks\projects\mx\src\mx\c ontrols\RadioButton.as:574]
    at mx.controls::RadioButton/commitProperties()[E:\dev\hero_private\frameworks\projects\mx\sr c\mx\controls\RadioButton.as:514]
    at mx.core::UIComponent/validateProperties()[E:\dev\hero_private\frameworks\projects\framewo rk\src\mx\core\UIComponent.as:8209]
    at mx.managers::LayoutManager/validateProperties()[E:\dev\hero_private\frameworks\projects\f ramework\src\mx\managers\LayoutManager.as:597]
    at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\hero_private\frameworks\project s\framework\src\mx\managers\LayoutManager.as:813]
    at mx.managers::LayoutManager/validateNow()[E:\dev\hero_private\frameworks\projects\framewor k\src\mx\managers\LayoutManager.as:878]
    at mx.core::Application/resizeHandler()[E:\dev\hero_private\frameworks\projects\mx\src\mx\co re\Application.as:1721]
    at mx.core::Application/commitProperties()[E:\dev\hero_private\frameworks\projects\mx\src\mx \core\Application.as:1073]
    at mx.core::UIComponent/validateProperties()[E:\dev\hero_private\frameworks\projects\framewo rk\src\mx\core\UIComponent.as:8209]
    at mx.managers::LayoutManager/validateProperties()[E:\dev\hero_private\frameworks\projects\f ramework\src\mx\managers\LayoutManager.as:597]
    at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\hero_private\frameworks\project s\framework\src\mx\managers\LayoutManager.as:813]
    at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\hero_private\frameworks \projects\framework\src\mx\managers\LayoutManager.as:1180]
    Thanks,
    Ofer

    Hi Ofer,
    Thanks for reporting this bug to us. I would assume It’s a weird Flex SDK bug. We would be fixing this issue in the next SDK Drop.
    So for the fix,
    Modify line 174-176 from
    <mx:RadioButtonGroup id="radioGroup" />
    <mx:RadioButton id="nellymoser" group="{radioGroup}" selected="false"  label="{SoundCodec.NELLYMOSER}" click="changeCodec(event)" />
    <mx:RadioButton id="speex" group="{radioGroup}" selected="true"  label="{SoundCodec.SPEEX}" click="changeCodec(event)"  />
    To
    <mx:RadioButtonGroup id="radioGroup1" />
    <mx:RadioButton id="nellymoser" group="{radioGroup1}" selected="false"  label="{SoundCodec.NELLYMOSER}" click="changeCodec(event)" />
    <mx:RadioButton id="speex" group="{radioGroup1}" selected="true"  label="{SoundCodec.SPEEX}" click="changeCodec(event)"  />
    As you see changing the id of the RadioGroup we were using fixes this issue.
    Thanks
    Arun

Maybe you are looking for

  • Remote access VPN client gets connected fails on hosts in LAN

    Hi, VPN client gets connected fine, I have a inter VLAN routing happening on the switch in the LAN so all the LAN hosts have gateway IP on the switch, I have the defult route pointing to ASA inside interface on the switch, the switch I can reach afte

  • I can't open itunes!...really p.o'd!!

    My fiance has an iPod so we already had iTunes for his. He got me an iPod a few days ago but since it's one of the newer ones, iTunes said I must upgrade to ver. 7.0 in order to be compatible. I've d/l'ed iTunes 7.0 and I can not open the **** progra

  • Can't restore ipod or update

    I have a 2nd gen ipod i've had it for a while now.. 2 years? Anyways my ipod was acting weird, like i couldnt transfer songs or delete them, itunes would just freeze. So i try restoring it, but the bar doesnt move, and i get the error message "Cannot

  • PIPELINE function in oracle

    Hi, Can any body tells when to use PIPELINE function in simple words. Thanks, Vinod

  • XPath support for Date data type.

    Hi, I am using XPathAPI class for extracting data from an XML source.I have a column in the data which has date type (any date type supported by MS SQL, Ms Access etc).I want to select only some rows from that column.I'm not aware if XPath provides o