Hi.

No idea if this is the problem, but I noticed the variable 'image' being
passed into the function is declared as a MovieClip, whereas it looks
like the loadClip function requires a string as its first variable.

Try changing the function declaration to:

function changeLayout(image:String):Void {...

and make sure you're passing in the URL as a string.

Hope that helps.

Geoff Bower
Developer
MotivatEd

 
web:     www.MotivatEd.ltd.uk
email:   [EMAIL PROTECTED] 
switch: +44 (0)1223 265 624
mobile: +44 (0)7762 627 687

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Allandt
Bik-Elliott (Receptacle)
Sent: 29 June 2007 13:05
To: flashcoders
Subject: [Flashcoders] quick moviecliploader question

hi folks

just a quickie about the movieClipLoader class

i'm doing the following

//this is in a function to initialise the layout
        createEmptyMovieClip("bgImage_mc", 1);


//this is in a function to load the layout (including a jpg image)
        function changeLayout(image:MovieClip):Void {
                if (image) {
                        var mcl = new MovieClipLoader();
                        mcl.onLoadInit =
function(target_mc:MovieClip):Void {
                                trace("initted!");
                        }

//traces: image: ./images/mockup.jpg
                        trace ("image: "+image);

//this doesn't work
                        mcl.loadClip(image, bgImage_mc);

//this does work but isn't useful as i need a dynamic reference -  
traces: initted!
                        mcl.loadClip("./images/mockup.jpg", bgImage_mc);
                }
        }


i'm obviously doing something silly but i can't see what it is

hope you can help

alz
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to