Thanks dr.ache


I still can't get this to work. Whatever is wrong, it doesn't like the line 
"public function completeHandler(event:Event) {".



I get "Type was not found or was not a compile-time constant: Event"



I tried adding "import flash.events.Event", but then I get several various 
errors.



Currently my faulty code to load child objects and use "contentLoaderInfo" 
looks like:



package {

      // Import stuff

      import flash.events.addEventListener;

      import flash.events.Event

      import flash.events.MouseEvent;

      import flash.display.*;

      import flash.net.URLRequest;

      import flash.display.Graphics;



      public class rte2124buserName {

            var rect1:Shape = new Shape();

            rect1.graphics.beginFill(0xFFFFFF);

            rect1.graphics.drawRect(0, 0, 1966, 660);

            addChild(rect1);

            var ldr1:Loader = new Loader();

            ldr1.mask = rect;

            var url1:String = "topics/rte2124b_topic1.swf";

            var urlReq1:URLRequest = new URLRequest(url1);

            ldr1.load(urlReq1);

            
ldr1.contentLoaderInfo.addEventListener(Event.COMPLETE,completeHandler1);



            var rect2:Shape = new Shape();

            rect2.graphics.beginFill(0xFFFFFF);

            rect2.graphics.drawRect(0, 0, 1966, 660);

            addChild(rect2);

            var ldr2:Loader = new Loader();

            ldr2.mask = rect2;

            var url2:String = "topics/rte2124b_topic2.swf";

            var urlReq2:URLRequest = new URLRequest(url2);

            ldr2.load(urlReq2);

            
ldr2.contentLoaderInfo.addEventListener(Event.COMPLETE,completeHandler2);



            // Call up topics from topics folder.

            public function completeHandler1(event:Event) {

                  MovieClip(event.currentTarget)._parent = this;

                  trace(_parent.ldr1);

            }

            public function completeHandler2(event:Event) {

                  MovieClip(event.currentTarget)._parent = this;

                  trace(_parent.ldr2);

            }

      }

}



All I want to do is to pass user input (user name) from a parent SWF to a child 
SWF. Could somebody please tell me all the code I need and where the code goes 
to do this. I am sorry that I can't work this out, and to be honest, Flash help 
is less than useless unless you have been doing OO programming for years. It 
does not contain decent examples of everything one needs to do to get stuff to 
work.



Cheers

Alan





Hi Alan.



In the same class / at the same position where you load your child

movieclip.

One line below your loadClip method call.

This message is for the named person’s use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or; lost by any mistransmission. If
you receive this message in error, please immediately delete it and all
copies of it from your system, destroy any hard copies of it and notify
the sender. You must not directly or indirectly, use, disclose,
distribute, print or copy any part of this message if you are not the
intended recipient. GOULBURN OVENS INSTITUTE OF TAFE and
any of its subsidiaries each reserve the right to monitor all e-mail
communications through its networks. Any views expressed in this
message are those of the individual sender, except where the
message states otherwise and the sender is authorised to state them
to be the views of any such entity.

#####################################################################################
This e-mail message has been scanned for Viruses and Content and cleared 
by MailMarshal
#####################################################################################
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to