> Most sites with flash games, we are aiming for, doesn't provide option to > include > files except SWF itself. thats why as3 and awd were made in the first place :)
> I've sent you files in .3ds and .obj formats which fails to load when > being embedded. I've just received obj/3ds to test from someone else. Not recieved any from you. or you use another nick? Fabrice On Mar 30, 2011, at 3:02 PM, MADCATX wrote: > I use similar code, except I'm providing name for model as second > parameter ( * @param id The id that will be assigned to the resource. > This can later also be used by the getResource method). I assign > textures through code as they are also being embedded. Most sites with > flash games, we are aiming for, doesn't provide option to include > files except SWF itself. SWF is also compressing embedded models so > it's reduces time to load game. > > I've sent you files in .3ds and .obj formats which fails to load when > being embedded. > > On 28 мар, 23:56, Fabrice3D <[email protected]> wrote: >> send me your file off line please >> >> have you looked at examples.EmbedParseDataTest.as and use similar code? >> >> Fabrice >> >> On Mar 28, 2011, at 5:42 PM, MADCATX wrote: >> >> >> >>> Updated from latest repository, still throws error on embedded files, >>> but error is thrown on different line: >>> Error: Unespected parser error >>> at away3d.loading::ResourceManager/onResourceError()[D:\...\game\lib >>> \away3d\loading\ResourceManager.as:194] >>> at away3d.loading::ResourceManager/onResourceRetrieved()[D:\...\game >>> \lib\away3d\loading\ResourceManager.as:179] >>> at flash.events::EventDispatcher/dispatchEventFunction() >>> at flash.events::EventDispatcher/dispatchEvent() >>> at ResourceLoadSession/prepareNextRetreive()[D:\...\game\lib\away3d >>> \loading\ResourceLoadSession.as:179] >>> at ResourceLoadSession/onRetrievalComplete()[D:\...\game\lib\away3d >>> \loading\ResourceLoadSession.as:163] >>> at flash.events::EventDispatcher/dispatchEventFunction() >>> at flash.events::EventDispatcher/dispatchEvent() >>> at away3d.loading::AssetLoader/handleParserParseComplete()[D:\...\game >>> \lib\away3d\loading\AssetLoader.as:295] >>> at flash.events::EventDispatcher/dispatchEventFunction() >>> at flash.events::EventDispatcher/dispatchEvent() >>> at away3d.loading.parsers::ParserBase/finishParsing()[D:\...\game\lib >>> \away3d\loading\parsers\ParserBase.as:264] >>> at away3d.loading.parsers::ParserBase/onInterval()[D:\...\game\lib >>> \away3d\loading\parsers\ParserBase.as:284] >>> at away3d.loading.parsers::ParserBase/startParsing()[D:\...\game\lib >>> \away3d\loading\parsers\ParserBase.as:298] >>> at away3d.loading.parsers::ParserBase/parseBytesAsync()[D:\...\game >>> \lib\away3d\loading\parsers\ParserBase.as:169] >>> at away3d.loading::AssetLoader/parse()[D:\...\game\lib\away3d\loading >>> \AssetLoader.as:273] >>> at away3d.loading::AssetLoader/parseData()[D:\...\game\lib\away3d >>> \loading\AssetLoader.as:146] >>> at ResourceLoadSession/retrieveDependency()[D:\...\game\lib\away3d >>> \loading\ResourceLoadSession.as:116] >>> at ResourceLoadSession/retrieveNext()[D:\...\game\lib\away3d\loading >>> \ResourceLoadSession.as:98] >>> at ResourceLoadSession/parse()[D:\...\game\lib\away3d\loading >>> \ResourceLoadSession.as:62] >>> at away3d.loading::ResourceManager/parseResource()[D:\...\game\lib >>> \away3d\loading\ResourceManager.as:133] >>> at away3d.loading::ResourceManager/parseData()[D:\...\game\lib\away3d >>> \loading\ResourceManager.as:93] >>> at race.render.terrain::TerrainInfo/InitTerrain()[D:\...\game\src\race >>> \render\terrain\TerrainInfo.as:148] >> >>> On 28 мар, 13:44, Fabrice3D <[email protected]> wrote: >>>> thx, fixed as well. >>>> Tho if it was probably failing to load is because of faulty url's into >>>> your 3ds file. >>>> This allows you to avoid loading maps and display only the geometry if you >>>> want to. >> >>>> Fabrice >> >>>> On Mar 28, 2011, at 10:51 AM, iiley Chen wrote: >> >>>>> I always modify the line 179 of ResourceLoadSession.as to: >> >>>>> if (_ignoreDependencies){ >>>>> this._handle = _resource; >>>>> dispatchEvent(new >>>>> ResourceEvent(ResourceEvent.RESOURCE_RETRIEVED, >>>>> _resource, _uri)); >>>>> return; >>>>> } >> >>>>> Then it work for my case of load 3ds model. >> >>>>> Hope that helps. >> >>>>> On 3月27日, 上午6时26分, Fabrice3D <[email protected]> wrote: >>>>>> Fixed here and there and added class in examples section >>>>>> EmbedParseDataTest.as >> >>>>>> note that for some file type, such as 3ds image load will probably fail. >>>>>> This is an async issue. I'll try adress this one asap. >> >>>>>> example shows the embed and parsing of 4 file formats >>>>>> obj also loads maps if mtl is provided. >> >>>>>> in worst case from all files tested on my machine, you end with no maps >>>>>> loaded, geometry is displayed with default map. >> >>>>>> waiting on old max files to test the animation missing bytes... >> >>>>>> Fabrice >> >>>>>> On Mar 24, 2011, at 4:19 PM, MADCATX wrote: >> >>>>>>> Hello, I'm trying to load embedded model files, but without success. >>>>>>> Following code produces error: >> >>>>>>> [Embed(source="model.3ds", mimeType="application/octet-stream")] >>>>>>> private var modelObj:Class; >> >>>>>>> public function LoadModel() :void >>>>>>> { >>>>>>> ResourceManager.instance.parseData(new modelObj(), "model", true, >>>>>>> Max3DSParser); >>>>>>> } >> >>>>>>> Error Thrown: >> >>>>>>> Error #1034: Type Coercion failed: cannot convert >>>>>>> ResourceLoadSession@1f82c151 to away3d.loading.IResource. >>>>>>> Fault, ResourceManager.as:179 >> >>>>>>> The following code works alright: >> >>>>>>> public function LoadModel() :void >>>>>>> { >>>>>>> ResourceManager.instance.getResource("model.3ds", true); >>>>>>> } >> >>>>>>> Most models in .obj format seems to be parsed properly when using >>>>>>> embedded model, but some models still throws error. 3ds files always >>>>>>> throw error when are being parsed from embedded file.
