As3 Transcoder Mimits

I would like to insert a css file using

[Embed(source = 'mystyle.css', mimeType = 'text/css')]
private var _css:Class;

but 'text / css' is not supported by the transcoder. Is there a list of transcoders that can punish me?

I just need to read plain text, but / plain text is not available. Any other way to trick as3 into doing something really simple is appreciated.

+3
source share
3 answers

To my knowledge, the MIME types supported in AS3 / Flash are the same as in Flex. Flex Support:

  • application / octet stream
  • application / x-font
  • application / TrueType font
  • application / x-wave flash
  • audio / mpeg
  • image / GIF
  • image / jpeg
  • image / PNG
  • image / svg
  • image / svg-xml

.

, mime, "application/octet-stream". ByteArray, , , CSS . , CSS , parseCSS StyleSheet class.

+8

MXML:

<fx:String id="myText" source="./examples/myText.txt"/>

, "source" auto complete, , . , , , . Wink.

, , , . sodius, "\". { \{.

, , .

:

[Embed(source="mystyle.css", mimeType="application/octet-stream")]
private var MyCSS:Class;

, :

var myCSS:String = new MyCSS();
0

[ (souruce = "vigsquare.pat", mimeType = "application/octet-stream" )]       private var maker: Class;

[ (souruce = "camera_para.dat", mimeType = "application/octet-stream" )] var cam_params: Class;

souruce flex2.compiler.media.DataTranscoder

-1

All Articles