3 Replies Latest reply on Apr 11, 2009 9:53 PM by shabith

    set symbol name at runtime in embed swf

    shabith

      Hi,


      Is it possible to set the symbol name at runtime? what I really want is make a function that generate and return the class name when I pass the symbol name for it.

       

      here is my code.

       

      public static function EmbedAssets(AssetName:String=’default’):Class
                     {
                               [Embed(’assets/POILibrary.swf’, symbol={AssetName})] var _tempEmb:Class;
                               return _tempEmb;
                     }
      

      In here i get 2 errors

      1084: Syntax error: expecting colon before rightbrace.
      1084: Syntax error: expecting identifier before rightbrace.

       

       

      Did I make any mistakes? Please Help.