Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

Laertes

Members
  • Posts

    7
  • Joined

  • Last visited

Laertes's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. 1) it is a ContentDisplay 2) null i am loading the data with this code from an external xml document: var xmlFileName:String = "/resources/txt/punkt4.xml"; LoaderMax.activate([VideoLoader, ImageLoader, SWFLoader, DataLoader, MP3Loader]); loader1= new XMLLoader(xmlFileName, {name:"xmlDoc",skipFailed:true, noCache:true, onComplete:handleXMLLoaded, onError:handleError}); loader1.load(); the file punkt4.xm l is allowed to be placed under app-storage as i compile it into to the swf. the punkt4.xml file looks like this: <?xml version="1.0" encoding="UTF-8"?> ... <data> <LoaderMax name="dynamicLoaderMax" load="true"> <ImageLoader name="4_mamma" url="app-storage:/resources/img/4/4_mamma.jpg" load="true"/> <ImageLoader name="4_mhandtag" url="app-storage:/resources/img/4/cutout/4_mhandtag.jpg" load="true"/> <ImageLoader name="4_mjorden" url="app-storage:/resources/img/4/cutout/4_mjorden.jpg" load="true"/> <ImageLoader name="4_mdocka" url="app-storage:/resources/img/4/cutout/4_mdocka.jpg" load="true"/> <ImageLoader name="4_mbrev" url="app-storage:/resources/img/4/cutout/4_mbrev.jpg" load="true"/> <MP3Loader name="bs2" url="app-storage:/resources/snd/bs2.mp3" load="true" autoPlay="false" repeat="1"/> </LoaderMax> </data> it works like charm on all other platforms, but then again on those platforms i can place the files were they are supposed to be. Not were apple forces me to put them. I am getting to a point were i might just compile all the data into the .swf and be done with it. /Lars
  2. Hi, I have been digging a bit more into this problem. if i use the following code: var str:String = File.applicationDirectory.nativePath; trace(str); _pointModel.mainImage= LoaderMax.getContent(str+"/\.\./Library/Caches/resources/img/4/4_mamma.jpg"); trace(_pointModel.mainImage); var file:File = new File(str +"/\.\./Library/Caches/resources/img/4/4_mamma.jpg"); if(file.exists) { trace("exists"); } the traces will show: /Users/larshansson/Documents/src/ParkenMobile/bin-debug null exists So the file seems to be in the right place, but the LoaderMax.getContent() method returns null. if I try to load it explicitly with ImageLoader var loader:ImageLoader = new ImageLoader(str +"/\.\./Library/Caches/resources/img/4/4_mamma.jpg", {name:"photo1", container:_pointModel.mainImage,scaleMode:"proportionalInside", centerRegistration:true, onComplete:onImageLoad, onError:onErrorCode}); I get the following error: error:ImageLoader 'photo1' (/Users/larshansson/Documents/src/ParkenMobile/bin-debug/../Library/Caches/resources/img/4/4_mamma.jpg) > Error #2035: URL Not Found. URL: app:/Users/larshansson/Documents/src/ParkenMobile/Library/Caches/resources/img/4/4_mamma.jpg if I change the path above to: var loader:ImageLoader = new ImageLoader("app:/\.\./Library/Caches/resources/img/4/4_mamma.jpg", {name:"photo1", container:_pointModel.mainImage,scaleMode:"proportionalInside", centerRegistration:true, onComplete:onImageLoad, onError:onErrorCode}); i get *** Sandbox error *** Access tp app:/../Library/Caches/resources/img/4/4_mamma.jpg has been stopped - not allowed from app:/ParkenMobile.swf regards, /Lars
  3. Hi, thanks for looking into the issue. I have been digging some more and the AS Spec says; "NetStream.Play.Failed" An error has occurred in playback for a reason other than those listed elsewhere in this table, such as the subscriber not having read access. To me this sounds like the file was found, but something else was wrong. I know that iphone is picky with codecs, I can play the file with the IOS player, but that doesn't really mean anything as i guess that flash is using their own codec. I will do som more experiments with different codecs and see if I can come up with some new ideas. /Lars
  4. Hi, I am using Videoloader to play an audio only .mp4 file in an AIR-application that i use on Windows/OSX/ANdroid/IOS. It works fine on all platforms except IOS. I get an error saying "netstream.play.failed" about the file. it finds the file allright but cannot play it. Do you have any idee what the problem might be? the code looks like this: } actionVideo = new VideoLoader(thefilename, {name:"myVideo", container:this, x:-4000,y:-4000, width:0, height:0, scaleMode:"proportionalInside", bgColor:0x000000, autoPlay:true, volume:1}); actionVideo.load(); regards, /Lars
  5. Hi, I am having a problem with LoaderMax on Air for iOS. My solution works fine on air for android, but apple doesn't allow you to store downloaded files in the application folder, it has to go into ../Library/Caches instead. i am downloading to this from the net to savePath= new File(File.applicationDirectory.nativePath +"/\.\./Library/Caches/" + filename); fileStream.open(savePath, FileMode.WRITE); urlStream.load(new URLRequest(url)); .. .. urlStream.readBytes(fileData, 0, urlStream.bytesAvailable); fileStream.writeBytes(fileData,0,fileData.length); which works fine. when i try to load the downloaded files with loadermax it bombs. it works very well on android but i cant get LoaderMax fo find the files on iOS. i get the following error when debugging on OSX: i add a number of files with: var queue:LoaderMax = new LoaderMax({name:"soundQueue", onComplete:loopSoundsCompleteHandler, onError:errorHandler}); fileName = "Library/Caches/" + fileName; queue.append( new MP3Loader(fileName, {name:"name1", repeat:-1, autoPlay:false}) ); ... ... and then i load the queue with queue.load(); and i reveice the following error: Error on MP3Loader 'bpallah' (Library/Caches/resources/snd/bpall.mp3): Error #2032: Stream Error. URL: app:/Library/Caches/resources/snd/bpall.mp3 Does anyone have a clue how to do this? regards, /Lars
  6. Thanks, Worked like a charm! ( or at least as good as it is possible at the moment) regards, /Lars
  7. Hi, I have been using LoaderMAX on an air for android project and most things work wonderfully. I have however found one problem. If i load an mp3 and try to loop it , it works on the desktop but not on the actual device ( I have tried Samsung Galaxy TAB and HTC Desire-Z). It is most probably a bug in the Air implementation for android, but I wonder if there might be any way around such a bug. too loop a mp3, I have to use the Event.SOUND_COMPLETE event to restart it wherever it is stopped. Is there a similar way I can work with a sound loaded with the MP3Loader? regards, /Lars
×