Announcements
The Scaleform forum is now read-only. Please head to the Gamedev site for product support.
Scaleform Forum (Read Only)
Scaleform enables developers to leverage the power of the Adobe® Flash® tool set to create powerful user interface environments for video games.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Image from the web, ANY WAY?

1 REPLY 1
Reply
Message 1 of 2
wxneypar
367 Views, 1 Reply

Image from the web, ANY WAY?

Hi! I'm using scaleform 4.2 for Android.

 

I need to display an image from the web in the swf. Really simple, but can be done?

 

I can code Java, C++, or AS, no restriction on language or amount of code, just need an approach.

 

I can save it to Internal Storage with Java or C, or pass the bytes to the swf via invoke or whatever, but from here http://gameware.autodesk.com/documents/sf_4.2_flash_support.pdf I can't see any method that will actually work no matter what type or amount of info I send to AS.

 

Is there any way to do that? No matter how much effort I have to make, I NEED THIS!

 

An approach or guideline or just some general steps would be really appreciated.

 

Thanks in advace, 

 

Peter

Tags (4)
1 REPLY 1
Message 2 of 2
Doublezer0
in reply to: wxneypar

Hi

 

If you can grab the image and store it in a directory alongside the flash which is named the same as the flash (eg.  main directory = /MyFlash/ which contains ThisIsMyFlash.swf and has a directory that points to /MyFlash/ThisIsMyFlash/) you can then at this point use a loader to dynamically load the image into your flash clip. 

 

There are ways of loading external images in flash without going the long way around however using URLLoader.  This might come under some sandbox security issues so it helps if you have access to the hosting where the image file being loaded from to add the security rules file.

 

Here is an example of the URL Loader.

 

var imageLoader:Loader = new Loader();

var image:URLREquest = new URLRequest(STRING REPRESENTATION OF A URL HERE);

imageLoader.load(image);

addChild(imageLoader);

imageLoader.x = 200;

imageLoader.y = 300;

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums