3 Replies Latest reply on Feb 10, 2007 6:28 PM by buabco


    buabco Level 1

      I've got this code in my as class:

      public var myClass:Class;

      This is copy paste from the manual (Except for the path to the swf). When I compile this I've got an error that says something like "Unable to create source...."

      Anyone knows what this is?
        • 1. Re: Embedding
          Two ways around this and both have to do with where your asset file is and where your css file is:

          relative path like you have: ../../assets/test.swf
          Implies that the source file is nested in folders two layers deep from the root '/'. This works for css files, but might be problematic for AS files since once they are compiled into your application, they essentially live at the root level.

          Better to use an absolute path: /assets/test.swf
          • 2. Re: Embedding
            buabco Level 1
            Darin, Thanks for the answer but it didn't work :(, still your reference to root help me make the code more clean.

            I keep getting the error no matter where I put the swf file. The swf I'm using is a swf file genereated with flash actionscript preview and it's not a compiled mxml. Still I even tried to use the SYMBOL parameter:

            [Embed(source="/assets/test.swf", symbol="testmc")]

            but still not working :(. Any ideas?
            • 3. Re: Embedding
              buabco Level 1
              ok, to add to the confusion it seems I've finally was able to find a work arround to may problem, but it sure looks like a bug to me.

              I wasn't able to embed the swf file, because I was using a button that had a MovieClip with the bevel filter applied in two different frames (up and down) (the MC was just a rectangle, and the bevel made it look like a button). This was pretty strange, if I remove the filter it worked fine, if I replaced the MovieClip with a movieclip containing the initial one with the bevel effect it worked fine too.