matrix3d/spriteflexjs

Problem with Loader

pilipenko9 opened this issue · 22 comments

Hello, when assembling any of your example, where external resources loading, can't get loader working

the project is going, but the resources just are not loaded, there is no such event as the end / error etc
added
imageloader.contentLoaderInfo.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
imageloader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
imageloader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
imageloader.contentLoaderInfo.addEventListener(Event.OPEN, openHandler);
imageloader.contentLoaderInfo.addEventListener("progress", progressHandler);
imageloader.contentLoaderInfo.addEventListener(Event.UNLOAD, unLoadHandler);

in bat pointed to last flexjs
set FLEX_HOME=D:/apache-flex-flexjs-0.6.0-bin

maybe u know what the problem? thank you
for example TestBitmapDataSand working well

and i notices that i dont have class Image which u r using in Loader(ide didnt see it at least)

thanks open issues.but it is this example work?this example base on loader.
and it now just support the complete event.
https://github.com/matrix3d/spriteflexjs/blob/master/src/flash/display/Loader.as#L38

i have not add all the event now

and what ide u useing?i use the fd.and the image in the js.swc.
https://github.com/matrix3d/spriteflexjs/blob/master/test/build.bat#L11

intellij idea, but i just editing code there. building with ur bat file. could u pls post ur js.swc? thats strange

and ur flex_home is flexjs7, is it 0.7 version? I got 0.6

#1
get the 0.7

well I tried to install 0.7 but the installation was stopped on unit tests flex-flexunit\FlexUnit4AntTasks\build.xml : 55 Error running javax.exe compiler. and so after building sdk i got error too flex-asjs\frameworks\projects\Core\src\test\flex\build.xml 117 mxmlc task failed
and now i dont see Image in flex-asjs\js\libs\js.swc (

here is my bat
set FLEX_HOME=D:/flexjs7
::set main=TestBitmapDraw
::set main=TestHungryHero
::set main=TestByteArrayVSArray
::set main=Main
set main=TestHungryHero

set ARGS=-remove-circulars
::set ARGS=-debug=true -remove-circulars
::set ARGS=-remove-circulars -js-compiler-option="--compilation_level WHITESPACE_ONLY"
start %FLEX_HOME%/js/bin/mxmlc %ARGS% -external-library-path="%FLEX_HOME%\js\libs\js.swc" -compiler.source-path=../src src/%main%.as -define=CONFIG::as_only,false -define=CONFIG::js_only,true

when i launch index.html i got stucked on this http://c2n.me/3zb2wQI , Do I need to do anything other than run bat file? here is end of console http://c2n.me/3zb3hGQ

you need a webserver.iis etc

when I try to download a remote resource http://c2n.me/3zbO9rP it didnt load too

the index must in webserver

that doesnt help http://c2n.me/3ze1fep

yes. it working well. Browser console is empty

it working well,but your js,not work.
so pls get your loader test js,and as code.
i will debug it.

BitmapData.js:122 Uncaught SecurityError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data.

you can not load http://cs416419.vk.me/v416419800/81a5/QxO0EJO_ORk.jpg
try QxO0EJO_ORk.jpg(it is work)

default
you can debug it yourself

great. When i placed both index and resources in webserver it sratrs working) hungryhero
Thank you very much!
and one more question. why there is no method loadbytes in Loader?

the loadbytes will coming soon.but i have not time now.

I forgot to ask, did u try to load swf into asjs?

swf hard to load,it is need big lib as3swf,and lzma lib.zip lib.
so not easy load it.
but maybe have a tool swf2something.exe.
and load the something(custom format of swf)