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.

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

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

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

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

  • Stupid error #2025 - How can I solve it?

    Hi! How Are you guys! I'm having a problem while I'm trying to remove a Child.  I have a button that loads the loader and a next and back button that let you navigate through the images in it. And last the MENU button that brings into the stage the menu bar. I would like that when you click the menu an action to remove the images from the loader. I can do that, but only if there were some images there in the loader, otherwise I get this error:
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.     at flash.display:
    :DisplayObjectContainer/removeChild()
    It seems that the IF STATEMENT doesn't work properly. I guess that it must have an error, but I can't figure it out which.
    Thanks in advance!!
    Here is my code:
    menuBra.addEventListener (MouseEvent.CLICK, onClickBra);
    function onClickBra (event:MouseEvent):void {
    if(contains(loaderBrand)) {
    removeChild(loaderBrand);
    var TweenPrint1:Tween = new Tween(menu_mc,"x", Strong.easeOut, -4000, 0, 1, true);
    else          {
    var TweenPrint2:Tween = new Tween(menu_mc,"x", Strong.easeOut, -4000, 0, 1, true);
    trace ("menu was clicked"); }

    It worked with this:
    if(loaderBrand.parent != null && loaderBrand.parent == this) {
    removeChild(loaderBrand);
    var TweenPrint1:Tween = new Tween(menu_mc,"x", Strong.easeOut, -4000, 0, 1, true); }
    Thanks!!

  • 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

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

  • 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

  • Need help with Image Gallery tutorial.

    Hi all,
    No response from Apex Listener Forum...moved here....
    Apex Listener - 2.0.2.133.14.47
    Apex             - 4.2.2.00.11
    When running Image Gallery application as per tutorial, page just show a blank screen with no image upload button.
    Am using Firefox 22.0 and Chrome 28.0.1500.72.
    Firebug does not display any script error.
    Had recreated tutorial on apex.oracle.com with same result as above.
    http://apex.oracle.com/pls/apex/f?p=4550:1:::::F4550_P1_COMPANY:HANAMIKE
    Workspace: HANAMIKE
    Username: [email protected]
    Password: yesla
    Using username= resteasy_admin, Password=resteasy_admin to run on apex.oracle.com.
    Had modified tutorial JS below :
    var workspace_path_prefix = 'resteasy';     =>  var workspace_path_prefix = 'hanamike';
    Another odd problem was when trying out the RESTFUL service as per tutorial when clicking the 'TEST' button, encountered error 404.
    Problem due to extra workspace name in URL as below:
    http://apex.oracle.com/pls/apex/hanamike/hanamike/gallery/images/
    Had to manually modify it to:
    http://apex.oracle.com/pls/apex/hanamike/gallery/images/
    Notice that the Listener version on apex.oracle.com is:
    APEX_LISTENER_VERSION
    2.0.3.165.10.09
    Thanks in advance.
    Zack
    Message was edited by: Zack.L

    Hi Zack,
    Thanks for providing the login credentials to your workspace.  I took a look at your RESTful Service and associated application, and noticed that there was something missing - the "Upload Image" button! So it looks like the 'Create the Gallery Application' section is missing a step to create a HTML region, with region template "Button Region without Title", and with its region source set to the following:
    <a class="button" id="upload-btn">Upload Image</a>
    You'll see in the JS that there's a reference to #upload-btn, but no such object existed on your page.  I created a copy of your app, which includes this new HTML region, and you'll see that I've uploaded an image as a demo.  I've contacted the APEX Listener team re the missing instruction, so that will hopefully be rectified in the next release.  Apologies for the confusion, but hopefully you're back on track now.  As for the behaviour you've noticed with the URL generated by the 'Test' utility, thanks for bringing this to our attention.  I'll do some further investigation there, and log a bug if required.
    Regards,
    Hilary

  • Image gallery issue

    If a mod could delete my other post as I am quite far on from that and now having different issues.  Thanks.
    I am really stuck.  I will try my best to explain things clearly.  I am making an image gallery and I got the code from this gallery here.
    http://www.flashmo.com/preview/flashmo_122_3d_curve_gallery
    I made some changes to make it how I wanted it, nothing drastic though.  So now I have a nice gallery.
    Explaining what I am trying to do will better help explain things.  I am creating a modelling agency website.  The gallery I created above will display an individual image of every model in the agency (which it does).  Now when one of the model images is clicked, I then need it to load another image gallery which contains the complete set of images for that model, plus some of their information etc. 
    The way I am approaching it at the moment is to create an individual image gallery for every model in its own fla file.  If say the first model is clicked (image 1) it will load the corresponding swf (1.swf).  I am not sure how good it is loading an swf into what I already have, but couldnt think of another way.  So now I have a seperate image gallery just to test things out, and I need to load it into my original image gallery.
    So, I will show the code for the first gallery (which displays the individual images of each model).  The important methods are p_click (which hides the first gallery and loads the external swf), and on_pic_loaded (which displays the external swf). 
    I hope you understand what I am attempting, as I dont know if I have explained it right as my brain is going dead! (although I am liking the challenge).
    import org.papervision3d.scenes.*;
    import org.papervision3d.cameras.*;
    import org.papervision3d.objects.*;
    import org.papervision3d.materials.*;
    import caurina.transitions.*;
    import flash.net.URLRequest;
    import flash.display.Loader;
    import flash.events.Event;
    import flash.events.ProgressEvent;
    var container_x:Number = stage.stageWidth * 0.5;
    var container_y:Number = stage.stageHeight * 0.5 + 160;
    var container:Sprite = new Sprite();
    container.x = container_x;
    container.y = container_y;
    addChild(container);
    var scene:Scene3D = new MovieScene3D(container);
    var cam:Camera3D = new Camera3D();
    cam.zoom = 6;
    tn_url_target.visible = false;
    tn_title.text = "";
    tn_desc.text = "";
    tn_url.text = "";
    loading_info.text = "";
    url_button.visible = false;
    var no_of_ring:Number = 1;
    var angle:Number = 0;
    var p_dict:Dictionary = new Dictionary();
    var pa:Array = new Array();
    var filename_list = new Array();
    var url_list = new Array();
    var url_target_list:Array = new Array();
    var title_list = new Array();
    var description_list = new Array();
    var folder:String = "photos/thumbs/";
    var i:Number;
    var total:Number;
    var flashmo_xml:XML = new XML();
    var pic_loader:Loader = new Loader();
    var mLoader:Loader = new Loader();
    var xml_loader:URLLoader = new URLLoader();
    xml_loader.load(new URLRequest("thumbnail_list_5.xml"));
    xml_loader.addEventListener(Event.COMPLETE, create_thumbnail);
    function create_thumbnail(e:Event):void
        flashmo_xml = XML(e.target.data);
        total = flashmo_xml.thumbnail.length();
        var angle_per:Number = Math.PI * 2 * no_of_ring / total;
        for( i = 0; i < total; i++ )
            filename_list.push( flashmo_xml.thumbnail[i][email protected]() );
            url_list.push( flashmo_xml.thumbnail[i][email protected]() );
            url_target_list.push( flashmo_xml.thumbnail[i][email protected]() );
            title_list.push( flashmo_xml.thumbnail[i][email protected]() );
            description_list.push( flashmo_xml.thumbnail[i][email protected]() );
            var bfm:BitmapFileMaterial = new BitmapFileMaterial(
                folder + flashmo_xml.thumbnail[i][email protected]());
            bfm.oneSide = false;
            bfm.smooth = true;
            var p:Plane = new Plane(bfm, 100, 100, 2, 2);
            scene.addChild(p);
            var p_container:Sprite = p.container;
            p_container.name = "flashmo_" + i;
            p_dict[p_container] = p;
            p_container.buttonMode = true;
            p_container.addEventListener( MouseEvent.ROLL_OVER, p_rollover );
            p_container.addEventListener( MouseEvent.ROLL_OUT, p_rollout );
            p_container.addEventListener( MouseEvent.CLICK, p_click );
            p.rotationY = - (i * angle_per) * (180/Math.PI) + 90;
            p.x = Math.cos(i * angle_per) * 300;
            p.z = Math.sin(i * angle_per) * 300;
            p.y = Math.floor( i / 22 ) * 5;
    function startLoad()
        var mLoader:Loader = new Loader();
        var mRequest:URLRequest = new URLRequest("/subgallery/1.swf");
        mLoader.load(mRequest);
    function p_rollover(me:MouseEvent)
        var sp:Sprite = me.target as Sprite;
        Tweener.addTween( sp, {alpha: 0.5, time: 0.5, transition:"easeOutExpo"} );
    function p_rollout(me:MouseEvent)
        var sp:Sprite = me.target as Sprite;
        Tweener.addTween( sp, {alpha: 1, time: 0.4, transition:"easeInExpo"} );
    function p_click(me:MouseEvent)
        var sp:Sprite = me.target as Sprite;
        var s_no:Number = parseInt(sp.name.slice(8,10));
        var mRequest:URLRequest = new URLRequest("subgallery/1.swf");
        mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, on_pic_loaded);
        mLoader.load(mRequest);
        Tweener.addTween( container, { y: 1200, time: 0.6, transition:"easeInExpo" } );
    function goto_URL(me:MouseEvent)
        navigateToURL(new URLRequest(tn_url.text), tn_url_target.text);
    function on_open(e:Event):void
        loading_info.text = "Loading... 0%";
    function on_progress(e:ProgressEvent):void
        var percent:Number = Math.round(e.bytesLoaded / e.bytesTotal * 100);
        loading_info.text = "Loading... " + percent + "%";
    function on_pic_loaded(e:Event):void
        addChild(e.currentTarget.content);
        //addChildAt(mLoader, 1);
        mLoader.x = Math.round(stage.stageWidth - mLoader.width) * 0.5;
        mLoader.y = Math.round(stage.stageHeight - mLoader.height) * 0.5;
        //mLoader.addEventListener(MouseEvent.CLICK, remove_pic);
        Tweener.addTween( mLoader, { alpha: 1, time: 0.8, transition:"easeInExpo" } );
        removeEventListener(Event.ENTER_FRAME, render);
    function remove_pic(e:Event):void
        Tweener.addTween( pic_loader, { alpha: 0, time: 1, onComplete:function() { removeChild(this); } } );
        Tweener.addTween( container, { y: container_y, time: 1, delay: 1, transition:"easeOutExpo"} );
        addEventListener(Event.ENTER_FRAME, render);
        tn_title.text = "";
        tn_desc.text = "";
        tn_url.text = "";
        url_button.visible = false;
    addEventListener(Event.ENTER_FRAME, render);
    function render(e:Event):void
        var distance_x:Number = (stage.mouseX - 400) * 0.0001;
        angle += distance_x;
        cam.x = - Math.cos(angle) * 150;
        cam.z = Math.sin(angle) * 150;
        scene.renderCamera(cam);
    Current issues as the moment is firstly, I dont know if this is the best way to achieve what I want.  Maybe there is a better option someone could tell me about, but you have to remember that each image displayed here will have multiple images to go with it.
    In terms of what I am attempting above, I currently get
    Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: file:///C|/Users/Nick/Desktop/gallery/gallery.xml
        at _1_fla::MainTimeline/frame1()
    I assume its a url error so I changed all urls in both fla's to contain the whole url path.  Didnt seem to work though unless I missed something.
    Any advise on absolutely anything will be so appreciated.
    Many thanks
    Nick

    Sorry about that.  If you can check my history, I normally always thank people who have helped, and I was intending to go back on the last few to sort them out.  Just got my first job so it has been rather hectic and been stressing out to much.  Also, I do things slightly different to other people.  If I receive a correct answer (which I normally do thank), I tend not to actually reply but to thank instead, mainly because if I reply I am pushing unanswered questions further down the list and eventually out of view.  I will go back and sort out the thanks I owe.
    In terms of asking the mods, other forums I visit are normally moderated by the community, so I assumed that someone like yourself might be the moderator.
    I tottally understand what you are saying, and as I say, I am normally on top of this.  Will go back now and sort out the thanks.
    Sorry for the delay.
    Nick

  • Adding "loading" movieclip to dynamic image gallery?

    Hello again,
    I've completed my XML-driven image gallery, however upon live testing I'd realized I made a rookie mistake and not put some kind of placeholder "loading" movie clip loop while the thumbnails—and subsequent full-size images—are being loaded. The images will randomly appear when loaded and I would like to be able to insert a placeholder movie clip while they load, and swap them up with the thumbnails/images after it has been loaded. The placeholder movie clip is in my library (loadingLoop), but I'm having problems getting it to work correctly.
    Below is the original function that processes the XML and adds the thumbnail images; this is where I'm trying to insert the placeholder movie clip per XML child node (every attempt I've made just keeps throwing more errors, so I've omitted my attempts to avoid confusion), and I've attached the XML file for testing. And insight or help would be appreciated.
    //Locate the external XML file and trigger xmlLoaded when complete
    xmlLoader.load(new URLRequest("data/artGallery.xml"));
    xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
    //Load the XML and process the image locations
    function xmlLoaded(event:Event):void {
        xml = XML(event.target.data);
        //parse the nodes in the XML file
        xmlList = xml.children();
        //count the number of nodes in the XML file via XMLList
        trace(xmlList.length());
        //loop to load all of the thumbnails, based on the number of nodes in XMLList
        //"i" = every child node in the XML file
        for (var i:int = 0; i < xmlList.length(); i++) {
            //Add loadingLoop movie clip per node and wait for thumnail to load before swapping out with imageLoader thumbnail images <-- help!!
            //for every node, create a new instance to be put on stage
            imageLoader = new Loader();
            //load each thumbnail from its location per XML node's "thumb" attribute
            imageLoader.load(new URLRequest(xmlList[i].attribute("thumb")));
            //position of thumbnail instances per XML node (horizontally across stage)
            imageLoader.x = i * 110 + 10;//thumbs are 100 x 100 so, +10 to the width, plus +10 from left edge
            //imageLoader.y = 10;
            //for each node in XML list, name the instance with the path to the location of the full size image
            imageLoader.name = xmlList[i].attribute("source");
            //for each node in the XML list, add a drop shadow
            imageLoader.filters = [thumbDShadow];
            //add thumbnails to stage
            addChild(imageLoader);
            dropTween = new Tween(imageLoader, "y", Bounce.easeOut, -100, 10, 1, true);
            //set up thumbnails to wait for a click to execute showPicture
            imageLoader.addEventListener(MouseEvent.CLICK, showPicture);
            //set up thumbnails to scale when rolled over
            imageLoader.addEventListener(MouseEvent.ROLL_OVER, sizeUP);

    Somehow I had a feeling this wouldn't be a copy-and-paste job for the full-size images. Sorry to be a bother. This is the showPicture function that is fired off when the thumbnail image is clicked (from our previous example). Two errors are thrown:
    When the thumnail is clicked:
    "Error #2007: Parameter child must be non-null.
        at flash.display::DisplayObjectContainer/removeChild()
        at MethodInfo-51()"
    But the full-size image loads nonetheless. The second loading loop (loadingLoop2) is not removed. Below is the showPicture function:
    //Load the full-size images and place onto the stage
    function showPicture(event:MouseEvent):void {
        //add new movie clip container
        var mc2:MovieClip = new MovieClip();
        addChild(mc2);
        //clear the fullLoader—this is to help clear any full-size images that may already be on the stage (they have two options, click a new thumbnail, or close the current full-size image
        fullLoader.unload();
        //re-create the fullLoader, if there was one cleared
        fullLoader = new Loader();
        //load each full size image from its location per XML node's "source" deliniated by mc.ldr's "source" attribute
        fullLoader.load(new URLRequest(event.target.name));
        //add the loder to the container
        mc2.addChild(fullLoader);
        //create new instance of second loading loop
        mc2.fsloop = new loadingLoop2();
        //add the second loading loop to the container
        mc2.addChild(mc2.fsloop);
        //for each container, add a drop shadow
        mc2.filters = [fullDShadow];
        //set the container's position center on stage, making it the size of the loading loop until the full-size images are loaded
        mc2.x = (stage.stageWidth - mc2.fsloop.width) * 0.5;
        mc2.y = (stage.stageHeight - mc2.fsloop.height) * 0.5;
        //place container on stage
        addChild(mc2);
        //fade in each container
        fadeTween = new Tween(mc2, "alpha", None.easeNone, 0, 1, 0.5, true);
        //check to see if the image has been loaded completely—this is to make sure the image's attributes can be used to re-center on stage and remove fsloop
        fullLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, removeLoop2);
        //set field to multiline so that the <br> HTML tags can be used
        imageTextField.multiline = true;
        //add text frame for description
        imageTextField.x = 10;
        imageTextField.y = 125;
        //for each full-size image, load the description text from the XML child nodes
        for (var j:int = 0; j < xmlList.length(); j++) {
            //check to make sure that the correct full-size image matches the text node when clicked
            if (xmlList[j].attribute("source") == event.target.name) {
                //add each child node as a separate line in the same text field; added HTML tags for CSS application
                imageTextField.htmlText = "<p><span class = 'projectName'>" + xmlList[j].child("projectName") + "</span><br>"
                + "<span class = 'toolsUsed'>" + xmlList[j].child("toolsUsed") + "</span><br><br>"
                + xmlList[j].child("projText") + "<br>"
                + "<span class = 'liveURL'>" + xmlList[j].child("liveURL") + "</span></p>";
        function removeLoop2(event:Event):void {
            //re-position the container to center on stage to accomodating the full sized image
            mc2.x = (stage.stageWidth - fullLoader.width) * 0.5;
            mc2.y = (stage.stageHeight - fullLoader.height) * 0.5;
            //Add the text field
            addText();
            //hide instructional text, already on stage
            galleryInfo_mc.alpha = 0;
            //remove the full-sized loading loop
            event.target.loader.parent.removeChild(MovieClip(event.target.loader.parent).loadingLoop2 );
        //set up full-size images to "self close" by clicking on it
        mc2.addEventListener(MouseEvent.CLICK, clearStage);
    The second error gets thrown when the container is clicked and the function clearStage is executed, which does not remove the container:
    "TypeError: Error #2007: Parameter child must be non-null.
        at flash.display::DisplayObjectContainer/removeChild()
        at artGallery_v1_5_fla::MainTimeline/clearStage()"
    This is the clearStage function:
    //Allow full-size image to "self close" by clikcing on it and removing the text description
    function clearStage(event:MouseEvent):void {
        //clear the fullLoader
        fullLoader.unload();
        //remove the container
        event.target.parent.removeChild(MovieClip(event.target.parent).mc2);
       //remove the text field
        removeChild(imageTextField);
        //show the instructional text that is on-stage
        galleryInfo_mc.alpha = 1;
    Help!

Maybe you are looking for

  • Differences between BI Standard Edition and EE?

    I am looking at using BI Publisher to integrate with APEX 3.x... Now I was looking at BI Publisher EE but noticed that there is a Standard Edition.. Could you explain to me what the difference is between the two versions? Is it a licensing issue (per

  • Call a button action by a pressed key

    It's a silly question but... how can I associate an action to an specific key (F1, F2, and so on...). Because the software I'm doing can not use a mouse. thanks a lot! ^_^

  • Two idocs with exactly the same data have statuses 51 an 53. Why?

    Hi all, There are two idcos with exactly the same data, however when they are processed, one is ok with status 53 whereas the other is not processed and has the status 51. When I say same data, I mean both the idocs have the same message type, basic

  • HT4914 How can itunes match be increased in size from the current 25000 limit?

    Does anyone know if Apple intend on increasing the current limit of 25000 tracks in Itunes Match?

  • My itunes skips every song

    Howdy All Desperate for help I have Windows 7 64 Bit - fully patched.  I also have latest version of Itunes. For the last 3-4 months, my itunes has not played music.  But sometimes it does (intermittent). If I double click a song, it instantly skips