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

Similar Messages

  • 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

  • HSDIO conditionally fetch hardware compare sample errors (script trigger to flag whether or not to wait for software trigger)

    I am moderately new to Labview and definitely new to the HSDIO platform, so my apologies if this is either impossible or silly!
    I am working on a system that consists of multiple PXI-6548 modules that are synchronized using T-CLK and I am using hardware compare.  The issue I have is that I need to be able to capture ALL the failing sample error locations from the hardware compare fetch VI... By ALL I mean potentially many, many more fails than the 4094 sample error depth present on the modules.
    My strategy has been to break up a large waveform into several subsets that are no larger than 4094 samples (to guarantee that I can't overflow the error FIFO) and then fetch the errors for each block.  After the fetch is complete I send a software reference trigger that is subsequently exported to a scriptTrigger that tells the hardware it is OK to proceed (I do this because my fetch routine is in a while loop and Labview says that the "repeated capbility has not yet been defined" if I try to use a software script trigger in a loop).
    This works fine, but it is also conceivable that I could have 0 errors in 4094 samples.  In such a case what I would like to do is to skip the fetching of the hardware compare errors (since there aren't any) and immediately begin the generation of the next block of the waveform.  That is, skip the time where I have to wait for a software trigger.
    I tried to do this by exporting the sample error event to a PFI and looping that PFI back in to generate a script trigger.  What I thought would happen was that the script trigger would get asserted (and stay asserted) if there was ever a sample error in a block, then I could clear the script trigger in my script.  However, in debug I ended up exporting this script trigger back out again and saw that it was only lasting for a few hundred nanoseconds (in a case where there was only 1 injected sample error)... The sample error event shows up as a 1-sample wide pulse.
    So, my question is this:  is there a way to set a flag to indicate that at least one sample error occurred in a given block  that will persist until I clear it in my script?  What I want to do is below...
    generate wfmA subset (0, 4094)
    if scriptTrigger1
      clear scriptTrigger1
      wait until scriptTrigger0
    end 
    clear scriptTrigger0
    generate wfmA subset (4094, 4094)
    I want scriptTrigger1 to be asserted only if there was a sample error in any block of 4094 and it needs to stay asserted until it is cleared in the script.  scriptTrigger0 is the software trigger that will be sent only if a fetch is performed.  Again, the goal being that if there were no sample errors in a block, the waiting for scriptTrigger0 will not occur.
    I am probably going about it all wrong (obviously since it doesn't work), so any help would be much appreciated!

    Please disregard most of my previous post... after some more debug work today I have been able to achieve the desired effect at slower frequencies.  I did straighten out my script too:
    generate wfmA
    if scriptTrigger1
      clear scriptTrigger0
      wait until scriptTrigger0
    end if
    generate wfmA
    scriptTrigger1 = sample error event flag
    scriptTrigger0 = software trigger (finished fetching error backlog in SW)
    However, I am still having a related issue.
    I am exporting the Sample Error Event to a PFI line, looping that back in on another PFI line, and having the incoming version of the Sample Error Event generate a script trigger.  My stimulus has a single injected sample error for debug. For additional debug I am exporting the script trigger to yet another PFI; I have the sample error event PFI and the script trigger PFI hooked up to a scope.
    If I run the sample clock rate less than ~133MHz everything works... I can see the sample error event pulse high for one clock period and the script trigger stays around until it is consumed by my script's if statement.
    Once I go faster than that I am seeing that the script trigger catches the sample error event occasionally.  The faster I go, the less often it is caught.  If I widen out the error to be 2 samples wide then it will work every time even at 200MHz.
    I have tried PFI0-3 and the PXI lines as the output terminal for the sample error event and they all have the same result (this implies the load from the scope isn't the cause).
    I don't know what else to try?  I can't over sample my waveform because I need to run a true 200MHz. I don't see anything that would give me any other control over the sample error event in terms of its pulsewidth or how to export it directly to a script trigger instead of how I'm doing it.
    Any other ideas?

  • 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

  • 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);

  • 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.

  • Custom Combo Box. Error # 2025

    package files{
              import flash.display.MovieClip;
              import fl.data.DataProvider;
              import fl.controls.ComboBox;
              import flash.text.*;
              import flash.display.Sprite;
              import flash.filters.*
              public class CustomComboBox extends MovieClip {
                        public var xLoca:Number;
                        public var yLoca:Number;
                        public var dataProvider:DataProvider;
                        public var cboClip:MovieClip;
                        public function CustomComboBox(xLoca:Number, yLoca:Number, dataProvider:DataProvider, prompt:String = "Select") {
                                  cboClip = new MovieClip;
                                  this.xLoca = xLoca
                                  this.yLoca = yLoca
                                  this.dataProvider = dataProvider;
                                  var typeTextFormat:TextFormat = new TextFormat();
                                  typeTextFormat.color = 0x333333;
                                  typeTextFormat.size = 11;
                                  typeTextFormat.font = "Verdana";
                                  var menu1:ComboBox = new ComboBox();
                                  cboClip.addChild(menu1);
                                  var typeButton:Sprite = new Sprite();
                                  menu1.addChild(typeButton);
                                  typeButton.graphics.beginFill(0xCCCCCC);
                                  typeButton.graphics.drawRect(0, 0, 109, 34);
                                  typeButton.graphics.endFill();
                                  typeButton.alpha = 0.75;
                                  typeButton.filters = [new DropShadowFilter(3,120,0x000000,0.5,0,0,1,1,false,false,false)];
                                  var dropButton:Sprite = new Sprite();
                                  dropButton.graphics.beginFill(0x99CCFF);
                                  dropButton.graphics.drawRect(0, 0, 109, 34);
                                  dropButton.graphics.endFill();
                                  dropButton.alpha = 0.75;
                                  dropButton.filters = [new DropShadowFilter(3,120,0x000000,0.5,0,0,1,1,false,false,false)];
                                  menu1.dropdown.addChild(dropButton);
                                  menu1.setStyle("upSkin", typeButton);
                                  menu1.setStyle("overSkin", typeButton);
                                  menu1.setStyle("downSkin", typeButton);
                                  menu1.setSize(109, 34);
                                  menu1.dropdown.setRendererStyle("upSkin", dropButton);
                                  menu1.dropdown.setRendererStyle("overSkin", dropButton);
                                  menu1.dropdown.setRendererStyle("downSkin", dropButton);
                                  menu1.dropdown.setSize(109, 34);
                                  menu1.textField.setStyle("textFormat", typeTextFormat);
                                  menu1.dropdown.setRendererStyle("textFormat", typeTextFormat);
                                  menu1.move(xLoca, yLoca);
                                  menu1.prompt = prompt;
                                  menu1.dataProvider = dataProvider;// constructor code
                                  addChild(cboClip);
    Running the class above with the code below. At first everything works fine, but when you select something and then make a change you get
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
              at flash.display::DisplayObjectContainer/removeChild()
    Does anyone have any ideas why?
    var dp:DataProvider = new DataProvider();
    dp.addItem( { label: "Some Data", data: "Some" } );
    dp.addItem( { label: "More Data", data: "More" } );
    dp.addItem( { label: "Way More Data", data: "Way More" } );
    dp.addItem( { label: "No Data", data: "None" } );
    var c:CustomComboBox = new CustomComboBox(50, 50, dp, "How Much Data?");
    addChild(c)

    The error is indicating a problem with a removeChild() method call, and none of the code you show has that as far as I can see.  So you probably need to look elsewhere for the problemed code.

  • [flexcoders] Error #2025 - UIMovieclip and Focus Manager

    Hello Everybody,
    I'm getting a runtime Error #2025 when I try to use an UIMovieclip into a Flex Application.
    The issue happens when the key tab is pressed and It seems has being caused by the Focus Manager.
    I found some threads over the internet but nothing really concret that could give me some idea about how to solve it.
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
    at flash.display::DisplayObjectContainer/getChildIndex()
    at mx.core::Container/getChildIndex()
    at mx.containers::Panel/getChildIndex()
    at fl.managers::FocusManager/::getChildIndex()
    at fl.managers::FocusManager/::sortByDepth()
    at fl.managers::FocusManager/::sortByTabIndex()
    at Array$/Array::_sort()
    at Array/http://adobe.com/AS3/2006/builtin::sort()
    at fl.managers::FocusManager/::sortFocusableObjectsTabIndex()
    at fl.managers::FocusManager/::sortFocusableObjects()
    at fl.managers::FocusManager/::keyDownHandler()
    Any help will be welcome
    Best Regards,
    Eduardo Dias

    I don't know if we've figured this out yet.  If you can come up with a simple test case, file a bug so we can take a look.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Error 2025

    Good Afternoon.  I was attempting to merge a text box with an image box to get the mouse over effect to activate on both simultaneously.  I grouped them, and this didn't do the trick.  I've since realized the easiest fix is to merge the layers in photoshop so that they are the same layer, but I saved after doing it and prior to that realization.  I'm now receiving an Error 2025 The supplied display object must be a child of the caller.  This happened after I tried to ungroup or delete the group, but is now happening every time I open the site.  I'll be saving a in progress file if I can recover from this, but until then I can no longer access my site in muse for more than 30 seconds without this error message and forced close-out.
    Thank you.

    Please send us the .muse file at [email protected] along with a link to this thread so we can attempt to reproduce the error and either repair and return the file or explain how you can get past it. If the file is larger than 20Mb you can use a service like Adobe SendNow, Dropbox, WeTransfer, etc. (If you use a service, please include your return e-mail address in the body of the message, since not all services include it in the sharing invite they send.) Thanks.

  • Error 2025/ trying to removeChild()

    Hi,
    I have tried to solve ths problem but without success. I have permit Debugging on so I know it s related to the removeChild().
    I currently have four buttons that each call a different addChild() function. Everything works great. However, if I skim across the buttons the way someone would in eal life the error appears. I have tried different references to the stage or this or parent.removeChild(), but no luck.
    Here is the output:
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
        at flash.display::DisplayObjectContainer/removeChild()
        at flutePlayer_main_fla::MainTimeline/removeGraphicD()[flutePlayer_main_fla.MainTimeline::fr ame1:79]
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
        at flash.display::DisplayObjectContainer/removeChild()
        at flutePlayer_main_fla::MainTimeline/removeGraphicC()[flutePlayer_main_fla.MainTimeline::fr ame1:61]
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
        at flash.display::DisplayObjectContainer/removeChild()
        at flutePlayer_main_fla::MainTimeline/removeGraphic()[flutePlayer_main_fla.MainTimeline::fra me1:26]
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
        at flash.display::DisplayObjectContainer/removeChild()
        at flutePlayer_main_fla::MainTimeline/removeGraphicB()[flutePlayer_main_fla.MainTimeline::fr ame1:43]
    Here is the code:
    stop();
    var aGraphics:MovieClip = new GraphicsA();
    var lowC1:MovieClip = new LowC1();
    var graphicA2:MovieClip = new GraphicsA2();
    var graphA3:MovieClip = new GraphicsA3();
    lowA_btn.addEventListener(MouseEvent.MOUSE_DOWN, playLowA);
    lowA_btn.addEventListener(MouseEvent.MOUSE_OUT, removeGraphic);
    function playLowA(evt:MouseEvent):void {
        play();
        addChild(aGraphics);
        aGraphics.x=400;
        aGraphics.y=180;
    function removeGraphic(evt:MouseEvent):void {
        removeChild(aGraphics);
        removeEventListener(MouseEvent.MOUSE_OUT, playLowA);
    lowC1_btn.addEventListener(MouseEvent.MOUSE_DOWN, playLowC1);
    lowC1_btn.addEventListener(MouseEvent.MOUSE_OUT, removeGraphicB);
    function playLowC1(evt:MouseEvent):void {
        play();
        addChild(lowC1);
        lowC1.x=400;
        lowC1.y=170;
    function removeGraphicB(evt:MouseEvent):void {
        removeChild(lowC1);
        removeEventListener(MouseEvent.MOUSE_OUT, playLowC1);
    A2_btn.addEventListener(MouseEvent.MOUSE_DOWN, playA2);
    A2_btn.addEventListener(MouseEvent.MOUSE_OUT, removeGraphicC);
    function playA2(evt:MouseEvent):void {
        play();
        addChild(graphicA2);
        graphicA2.x=400;
        graphicA2.y=165;
    function removeGraphicC(evt:MouseEvent):void {
        removeChild(graphicA2);
        removeEventListener(MouseEvent.MOUSE_OUT, playA2);
    A3_btn.addEventListener(MouseEvent.MOUSE_DOWN, playA3);
    A3_btn.addEventListener(MouseEvent.MOUSE_OUT, removeGraphicD);
    function playA3(evt:MouseEvent):void {
        play();
        addChild(graphA3);
        graphA3.x=400;
        graphA3.y=165;
    function removeGraphicD(evt:MouseEvent):void {
        removeChild(graphA3);
        removeEventListener(MouseEvent.MOUSE_OUT, playA3);
    Thanks for your help.

    Ok, After trying different approaches I changed my MOUSE_ DOWN to MOUSE_OVER which made the difference.
    I think I get it. When skimming the mouse activates the button for a slit second. Since there was no code for the over state it throws an error and the remeoveChild() is probably just a ruse.
    I'm sure there is someone who knows the real answer.
    Thanks again.
    The new code:
    stop();
    import flash.media.SoundMixer;
    var aGraphics:MovieClip = new GraphicsA();
    var lowC1:MovieClip = new LowC1();
    var graphicA2:MovieClip = new GraphicsA2();
    var graphA3:MovieClip = new GraphicsA3();
    lowA_btn.addEventListener(MouseEvent.MOUSE_OVER, playLowA);
    lowA_btn.addEventListener(MouseEvent.MOUSE_UP, noSound);
    lowA_btn.addEventListener(MouseEvent.MOUSE_OUT, removeGraphic);
    function playLowA(evt:MouseEvent):void {
        play();
        addChild(aGraphics);
        aGraphics.x=400;
        aGraphics.y=180;
    function noSound(evt:MouseEvent):void{
        SoundMixer.stopAll();
    function removeGraphic(evt:MouseEvent):void {
        removeChild(aGraphics);
        removeEventListener(MouseEvent.MOUSE_OUT, playLowA);
    lowC1_btn.addEventListener(MouseEvent.MOUSE_OVER, playLowC1);
    lowC1_btn.addEventListener(MouseEvent.MOUSE_UP, noSoundB);
    lowC1_btn.addEventListener(MouseEvent.MOUSE_OUT, removeGraphicB);
    function playLowC1(evt:MouseEvent):void {
        play();
        addChild(lowC1);
        lowC1.x=400;
        lowC1.y=170;
    function noSoundB(evt:MouseEvent):void{
        SoundMixer.stopAll();
    function removeGraphicB(evt:MouseEvent):void {
        removeChild(lowC1);
        removeEventListener(MouseEvent.MOUSE_OUT, playLowC1);
    A2_btn.addEventListener(MouseEvent.MOUSE_OVER, playA2);
    A2_btn.addEventListener(MouseEvent.MOUSE_UP, noSoundC);
    A2_btn.addEventListener(MouseEvent.MOUSE_OUT, removeGraphicC);
    function playA2(evt:MouseEvent):void {
        play();
        addChild(graphicA2);
        graphicA2.x=400;
        graphicA2.y=165;
    function noSoundC(evt:MouseEvent):void{
        SoundMixer.stopAll();
    function removeGraphicC(evt:MouseEvent):void {
        removeChild(graphicA2);
        removeEventListener(MouseEvent.MOUSE_OUT, playA2);
    A3_btn.addEventListener(MouseEvent.MOUSE_OVER, playA3);
    A3_btn.addEventListener(MouseEvent.MOUSE_UP, noSoundD);
    A3_btn.addEventListener(MouseEvent.MOUSE_OUT, removeGraphicD);
    function playA3(evt:MouseEvent):void {
        play();
        addChild(graphA3);
        graphA3.x=400;
        graphA3.y=165;
    function noSoundD(evt:MouseEvent):void{
        SoundMixer.stopAll();
    function removeGraphicD(evt:MouseEvent):void {
        removeChild(graphA3);
        removeEventListener(MouseEvent.MOUSE_OUT, playA3);

  • Error #2025: addChaild and removeChild

    hello all
    I have the app but I got a problem
    ArgumentError: Error # 2025: The supplied DisplayObject must be a child of the caller.
    at flash.display :: DisplayObjectContainer / removeChild ()
    at xxxxx_fla :: MainTimeline / hitPoint ()
    my code
    import flash.events.Event;
    import flash.events.MouseEvent;
    var pencilta:Shape = new Shape();
    var activeColor:uint = 0x000000;
    var aaa:a = new a();
    aaa.x = 0;
    aaa.y = 0;
    addChild(aaa);
    var bbb:c1 = new c1();
    bbb.x = 308;
    bbb.y = 108;
    addChild(bbb);
    var ccc:c2 =new c2();
    ccc.x = 265;
    ccc.y = 175;
    addChild(ccc);
    var ddd:c2 = new c2();
    ddd.x = 235;
    ddd.y = 260;
    var eee:c2 =new c2();
    eee.x = 200;
    eee.y = 355;
    bbb.addEventListener(MouseEvent.MOUSE_DOWN, hta1drag);
    bbb.addEventListener(MouseEvent.MOUSE_UP, hta1drop);
    bbb.addEventListener(Event.ENTER_FRAME, hitPoint);
    function drawingta()
              addChild(pencilta);
              pencilta.graphics.lineStyle(10, activeColor);
    function drawPencilta(e:MouseEvent):void
              pencilta.graphics.lineTo(bbb.x, bbb.y);
              e.updateAfterEvent();
    function hta1drag(e:MouseEvent):void
              e.target.startDrag();
              pencilta.graphics.moveTo(bbb.x, bbb.y);
              stage.addEventListener(MouseEvent.MOUSE_MOVE, drawPencilta);
              drawingta();
    function hta1drop(e:MouseEvent):void
              stopDrag();
              stage.removeEventListener(MouseEvent.MOUSE_MOVE, drawPencilta);
    function hitPoint(e:Event)
              if(bbb.hitTestPoint(ccc.x,ccc.y, true))
                        removeChild(ccc);
                        addChild(ddd);
              else if (bbb.hitTestPoint(ddd.x,ddd.y,true))
                        removeChild(ddd);
                        addChild(eee);
              else
                        trace ('mbuh lah');
    thank's

    use:
    import flash.events.Event;
    import flash.events.MouseEvent;
    var pencilta:Shape = new Shape();
    var activeColor:uint = 0x000000;
    var aaa:a = new a();
    aaa.x = 0;
    aaa.y = 0;
    addChild(aaa);
    var bbb:c1 = new c1();
    bbb.x = 308;
    bbb.y = 108;
    addChild(bbb);
    var ccc:c2 =new c2();
    ccc.x = 265;
    ccc.y = 175;
    addChild(ccc);
    var ddd:c2 = new c2();
    ddd.x = 235;
    ddd.y = 260;
    var eee:c2 =new c2();
    eee.x = 200;
    eee.y = 355;
    bbb.addEventListener(MouseEvent.MOUSE_DOWN, hta1drag);
    bbb.addEventListener(MouseEvent.MOUSE_UP, hta1drop);
    bbb.addEventListener(Event.ENTER_FRAME, hitPoint);
    function drawingta()
              addChild(pencilta);
              pencilta.graphics.lineStyle(10, activeColor);
    function drawPencilta(e:MouseEvent):void
              pencilta.graphics.lineTo(bbb.x, bbb.y);
              e.updateAfterEvent();
    function hta1drag(e:MouseEvent):void
              e.target.startDrag();
              pencilta.graphics.moveTo(bbb.x, bbb.y);
              stage.addEventListener(MouseEvent.MOUSE_MOVE, drawPencilta);
              drawingta();
    function hta1drop(e:MouseEvent):void
              stopDrag();
              stage.removeEventListener(MouseEvent.MOUSE_MOVE, drawPencilta);
    function hitPoint(e:Event)
              if(bbb.hitTestPoint(ccc.x,ccc.y, true))
    if(ccc.stage){
                        ccc.parent.removeChild(ccc);
    // ccc=null; ??
                        addChild(ddd);
              else if (bbb.hitTestPoint(ddd.x,ddd.y,true))
    if(ddd.stage){
                        ddd.parent.removeChild(ddd);
    // ddd = null; ??
                        addChild(eee);
              else
                        trace ('mbuh lah');
    thank's

  • ArgumentError: Error #2025

    This is ridiculous, why do I keep getting this error. I can't
    even find any information on the internet about it... i searched
    Google for 'flash cs3 error 2025' and it pulls 149 English pages.
    What does this error mean, how do I fix it and how do i prevent it.
    Also, I was wondering what are some best practices for using the
    debug console in Flash.
    PS - I am using Adobe Flash CS3 Professional...
    the error comes after i enter frame 40. there is nothing in
    there except a single text input component. I have tried to remove
    all code, and it still pops up. I deleted all other frames except
    this one and it fixed it but i don't know why it was there. hmmm,
    the error message is...

    haha i am sorry Trevor McCauley, i took it down becuase i did
    not anticipate any further assistance however i will be more than
    happy to put it back up. i have updated it since my last post
    however the error is still there... this includes the flash project
    file, all as files and the flash document. it is very thorough and
    i hope the layout is easy to understand... man i hope that helps
    thank you in advance for anything you could offer and i am very
    greatful for the help.
    the link has been updated (well i just put the rar file back
    online)
    http://network.isaacewing.com/rar/network.rar
    ps - for anybody that downloads my files... when you look
    through them... could you ***** the validity of my code, the
    organization and the overall layout in the back of your mind...
    meaning could you be as brutally honest as possible about what you
    think about how i program... is it structured, clean, organized,
    robust, and so on... any feedback on that would be ... meaningful
    and i would like to know what you guys think!

  • ArgumentError: Error #2025 - I can not removeChild?

    function urunlergelsin (e:MouseEvent):void {
        var urunlermenum:urunlermenu = new urunlermenu();
        bg.solurunmenusu.addChild(urunlermenum); // Added new one
        var geridonbuton:geridon = new geridon();
        bg.geridonus_mc.addChild(geridonbuton);
        bg.geridonus_mc.addEventListener(MouseEvent.MOUSE_DOWN, geridon_f);
    function geridon_f(e:MouseEvent):void {
        bg.urunbtn.removeEventListener(MouseEvent.MOUSE_DOWN, urunlergelsin);
        bg.geridonus_mc.removeEventListener(MouseEvent.MOUSE_DOWN, geridon_f);
        var urunlermenum:urunlermenu = new urunlermenu();
        bg.solurunmenusu.removeChild(urunlermenum); // But when i try ro remove it doesnt work
    Hello,
    When i try to removeChild i am getting this error message, How can i solve this problem?
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
         at flash.display::DisplayObjectContainer/removeChild()
         at avas_fla::MainTimeline/geridon_f()

    Your problem likely lies in declaring the object inside a function.  It will only have scope within that function when you do that.  I see where you create a new instance of the object in the function where I assume you are trying to remove the first one... the second one is the only one seen at that point, and it has not been added.  Try the following:
    var urunlermenum:urunlermenu; // declare it outside any function
    function urunlergelsin (e:MouseEvent):void {
        urunlermenum = new urunlermenu();
        bg.solurunmenusu.addChild(urunlermenum); // Added new one
        var geridonbuton:geridon = new geridon();
        bg.geridonus_mc.addChild(geridonbuton);
        bg.geridonus_mc.addEventListener(MouseEvent.MOUSE_DOWN, geridon_f);
    function geridon_f(e:MouseEvent):void {
        bg.urunbtn.removeEventListener(MouseEvent.MOUSE_DOWN, urunlergelsin);
        bg.geridonus_mc.removeEventListener(MouseEvent.MOUSE_DOWN, geridon_f);
        var urunlermenum:urunlermenu = new urunlermenu();  // remove this
        bg.solurunmenusu.removeChild(urunlermenum);

  • [svn:bz-trunk] 19423: Fixes blz-604 BlazeDS samples error with "Error #1014 : Class flash.events::SoftKeyboardEvent could not be found."

    Revision: 19423
    Revision: 19423
    Author:   [email protected]
    Date:     2010-12-16 07:00:31 -0800 (Thu, 16 Dec 2010)
    Log Message:
    Fixes blz-604 BlazeDS samples error with "Error #1014: Class flash.events::SoftKeyboardEvent could not be found."
    Ticket Links:
        http://bugs.adobe.com/jira/browse/blz-604
    Modified Paths:
        blazeds/trunk/qa/resources/webtier/flex_sdk_4/flex-config.xml

  • Follow-up Letter Building Sample error in Guide builder

    I was trying CM Letter Building Tutorial following the videos uploaded at<br />http://blogs.adobe.com/livecycle/2008/09/cm_letter_building_tutorial.html.<br />In the last step "Building and running the Letter Filling Experience" when I try to preview the form filling experience through Guide Builder Preview, I get following errors:<br />   ..\Application Data\Adobe\Designer\plugins\GuideBuilder\fcFollowUp.xdp.1\tmpPreview.mxml(1273): Error: Could not resolve <cc:CmXfaRichTextEditor> to a component implementation.                                                <cc:CmXfaRichTextEditor xmlns:cc="cm.*" height="100%" width="300"/><br /><br />  ..\Application Data\Adobe\Designer\plugins\GuideBuilder\fcFollowUp.xdp.1\tmpPreview.mxml(1267): Error: Could not resolve <cc:CmOptionalParagraph> to a component implementation.                                                <cc:CmOptionalParagraph xmlns:cc="cm.*"/><br /><br />I also saw the pop up error saying could not find class "cm.CmOptionalParagraph", sometimes while editing.<br /><br />I'm using the latest version of Correspondence Management available at adobe site with LSES update1. (All the SWC files are also there and added in the guide builder). Any idea what can cause this?

    I'm able to get out this problem.
    I'd one month old installation of designer and workbench. During  generating formguide, this set up created mxml with following component for Optional paragraph:
    Then I uninstalled the workbench and designer and installed latest 8.2.1_GM version of those and run the formguide again. This time, the produced mxml has the following entry
    (Notice the difference from cm.* to cm.controls.*)
    As I guess (just a guess),I think earlier it searched CmOptionalParagraph in cm root
    (it gave error that referenced component cm.CmOptionalParagraph  not found as it was in cm.controls location.)
    Now it is able to find that as it searches correct location.

Maybe you are looking for