Marc Rogerson
Joined: 24/04/2009 19:24:13
Messages: 9
Offline
|
Heya
I dont use Flex so I ran into problems with the tutorials from Matthew Casperson. Im sure you are all aware of them by now. Thanks go out to him for his work.
Main problems to overcome where the mx.core.Application methods. ArrayCollection gave me instant problems so I found a class written for just such a thing. Thanks go to Michael James Williams. This was a real lifesaver.
Next it was a case of adding the mesh to the scene. This meant making sure the Document Class was used a static var for all classes to access.
I commented out the flex code just to show where the changes were.
Instructions
1. Create a new flash file, add the source files in the src directory (File->Publish Settings->Flash Tab->Settings) and set the Document Root as EngineManager.
2. Uncheck "declare all stage instances" (File->Publish Settings->Flash Tab->Settings).
EngineManager.as
The changes here reflect :
setting a private static var to reference the DocumentClass
using a custom Collection.as class to substitute ArrayCollection
creating a function to instantiate the class for reference using the private static var as a return value
BaseObject.as
Changes here reflect usage of an instance of EngineManager to reference objects, properties and functions.
ApplicationManager.as
No changes here except removal of a tutorial camera example to give it a simpler look
MeshObject.as
Changes here reflect usage of an instance of EngineManager to reference objects, properties and functions.
ResourceManager.as
I changed this to load OBJ files as I find them more compatible than loading 3DS files.
Collection.as
This class is used instead of the Flex method Application.application.engineManager to reference the DocumentClass.
| Filename |
alternativa3d_flex_to_flash_converted_files.rar |
Download
|
| Description |
Converted source files from Flex tutorial |
| Filesize |
517 Kbytes
|
| Downloaded: |
273 time(s) |
|