A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: remove Child

  1. #1
    Member
    Join Date
    Jun 2007
    Posts
    33

    remove Child

    Hi

    I am trying to remove an swf (fractureMenu.swf ) that was loaded by a preloader.swf

    here is the statement inside my fractureMenu.swf

    removeChild( MovieClip( root ).[myrequest1].myLoader1);
    however I am getting this error
    'expecting identifier before leftbracket. '


    these are the variables I am referencing in my preLoader.swf file

    var myrequest1: URLRequest= new URLRequest ("fractureMenu.swf");
    var myloader1: Loader = new Loader();
    myloader1.load(myrequest1);

    any ideas would be great
    thanks
    mt

  2. #2
    ___________________
    Join Date
    May 2004
    Posts
    3,174
    that error specifically is caused by the dot between ( root ) and [myrequest1]

    with array access, it's name[string].prop

    notice name[string], not name.[string]

    there may be other errors... not sure why you've structured it that way, but maybe the above will help.

  3. #3
    Member
    Join Date
    Jun 2007
    Posts
    33
    great
    that got rid of my error
    however It is still not removing my swf file:

    removeChild( MovieClip( root )[myrequest1].myLoader1);

    I am not sure if I am referencing the right variables from within my first preLoader.swf file 'myrequest1' and 'myLoader1':

    var myrequest1: URLRequest= new URLRequest ("fractureMenu.swf");
    var myloader1: Loader = new Loader();
    myloader1.load(myrequest1);

    can you see anything here or suggest any way of removing the swf?

    thanks alot
    mt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center