Thanks for responding Ken, but I'm passing a String (linkage id). My question is really how to create a new instance of the sound when I only have the linkage identifier as a string? I can't seem to cast it to a Class.
- MM -----Original Message----- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Kenneth Kawamoto Sent: Friday, February 13, 2009 10:18 AM To: Flash Coders List Subject: Re: [Flashcoders] play sound via linkage var snd:LinkedSound = new LinkedSound(); snd.play(); Kenneth Kawamoto http://www.materiaprima.co.uk/ Mendelsohn, Michael wrote: > Hi list... > > Silly AS3 question: how do you play a sound with a linkage identifier? > > public function playSound(linkageID:String):void{ > // these don't work > var snd:Sound = new Sound(linkageID); > var snd:* = new Class(linkageID); > snd.play(); > } > > Thanks! > > - MM _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders