PDA

View Full Version : Flash9 Alpha: Embed metatag


mwelsh
07-02-2006, 03:28 PM
I'm having trouble using [Embed] in Flash 9:


[Embed(source="/l.ms3d",mimeType="application/octet-stream")]
private const modelData:Class;

var Model:ByteArray = new modelData() as ByteArray;


I'm getting:
C:\projects\f3d\f3d.fla:
TypeError: Error #1007: Instantiation attempted on a non-constructor.
at rasterizer::Rasterizer/loadModel()
at rasterizer::Rasterizer$iinit()
at Timeline0_8374d650cc624487b8eed2d5d2794d/::frame1()

The above code works fine in Flex -- I'm guessing there is some nuance of how Embed works in Flash that I am missing. :) Any ideas?

Thanks for the help!

senocular
07-02-2006, 04:42 PM
I dont think the compiler with the AS3 preview supports the Embed metatag

adi008
07-12-2006, 05:51 PM
nice topic budYYY!... ;)

PKarpenko
10-05-2006, 07:59 PM
I dont think the compiler with the AS3 preview supports the Embed metatag

Then how is content loaded with AS3.0.

And speaking of which, can someone explain how to access movieclips in the library in the Flash 9 Preview, if any?

senocular
10-05-2006, 09:24 PM
Loaded? That hasnt chaged. As for embedding, the Authoring environment does that automatically based on your library and whats in your timeline.

You access movies in your library using their class. If you dont create a custom class to associate them with, then just assign them a named class which does not exist (and it will be created automatically). Then create instances of those movies using the new keyword.

var myInstance = new AssignedClassName();