I am coding an actionscript mobile project using FlashBuilder 4.6. I have a couple of questions regarding multitouch support and the AssetLibrary.
1. I have implemented a swipe gesture into my code to move an object around the screen. Upon testing and debugging in the emulator I notice that Multitouch.supportsGestureEvents always returns false in the emulator but works just fine on my device. Do the emulators not support this ability? This is not a huge issue since it is working on my device, however makes debugging my code much harder.
2. Another Issue I have run into is using the AssetLibrary. I use the AssetLibrary to load 3 different embedded models and add them to the scene. Again something strange is happening where I run the emulator and I see all of the models just fine, but now when I run on the mobile device, only one of my models is present. Is it possible I am running out of memory already and only one model is visible? or am I using the AssetLibrary incorrectly. Below is my code for loading the models. 2 of the models are 90kb and the other is 1.25 mb. I have also tried the Loader3D method and the same results. I should also mention these are in the awd2 format.
3. I am also curious the difference between the AssetLibrary and the Loader3D. I have had some trouble finding the answer to this. Does the library handle all types of assets and the loader3D is just for 3d models?
[Embed(source="object1.awd", mimeType="application/octet-stream")]
private var object1Model:Class;
[Embed(source="object2.awd", mimeType="application/octet-stream")]
private var object2Model:Class;
[Embed(source="object3.awd", mimeType="application/octet-stream")]
private var object3Model:Class;
Parsers.enableAllBundled();
AssetLibrary.addEventListener(AssetEvent.ASSET_COMPLETE, onAssetComplete);
AssetLibrary.loadData(new object1Model());
AssetLibrary.loadData(new object2Model());
AssetLibrary.loadData(new object3Model());
private function onAssetComplete(event:AssetEvent):void
{
if (event.asset.assetType == AssetType.MESH)
{
var mesh:Mesh = event.asset as Mesh;
mesh.castsShadows = true;
view.scene.addChild(mesh);
}
}
Any help or information on this topics would be greatly appreciated. Thank you very much for your time.