klinek
September 23, 2017, 7:03pm
#1
Hello.
Can URLRequest be used for image loading (like in old good AS3 days)?
I try to use the following but with no luck:
openFL:
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
loader.load(new URLRequest( “assets/my_image.jpg” ));
xml:
assets path=“Assets” rename=“assets”
I end up with the error:
Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
obscure
September 24, 2017, 2:32pm
#2
hi klinek.
Looks like it’s missing your ‘assets’ folder.
In your project folder copy:
myProject/assets/*
to
myProject/bin/flash/bin/assets/*
Yes, but use <assets path="Assets" rename="assets" embed="false" />
in order to copy the files separately instead of embedding in the SWF file (which is our default)
klinek
October 18, 2017, 1:19pm
#4
Thank you for the responses.
The solution from ‘singmajesty’ works fine in my situation.
Obscure’s suggestion also may be useful in similar cases.
Regards.