00:00
00:00
Newgrounds Background Image Theme

Iblok just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Help loading image from a url

335 Views | 3 Replies
New Topic Respond to this Topic

Help loading image from a url 2014-05-16 05:35:25


So I want to create a game where the player controls a character whose visuals are downloaded from the following link.

link to avatar image

You'll get an error if you don't have an account with the site (an avatar dressup site) and are not logged in.

And I'm using the following code to do it.

var pictLdr:Loader = new Loader();
var pictURL:String = "http://img-cache.cdn.gaiaonline.com/b5cdb1c2b4d7a3ee83acbbffe039ee77/http://i1186.photobucket.com/albums/z368/Anythingcanbe/greenblobs.png"
var pictURLReq:URLRequest = new URLRequest(pictURL);
pictLdr.load(pictURLReq);
this.addChild(pictLdr);

The problem is that the url though it points to an image file is merely a container and not the actual image itself(i think?) so flash responds with an error when I try to display the image file through the link. Is there a way around this perhaps?

Response to Help loading image from a url 2014-05-16 05:39:36


Btw. Please ignore the link shown in the code snippet. The actual link is the one shown previously in the "link to avatar image".

Response to Help loading image from a url 2014-05-16 07:28:12


As I do not have an account, I cannot tell you what the problem is.
But I'd like to point out the following:

http://www.gaiaonline.com/info/legal/tos

14. Prohibited Uses.

c. Gaia Online may contain robot exclusion headers. You agree that you will not use any robot, spider, scraper, or other automated means to access Gaia Online for any purpose without our express written permission or bypass our robot exclusion headers or other measures we may use to prevent or restrict access to Gaia Online.

If they wanted to make things public, they would offer an API.
See the security restrictions of the Loader class.

Response to Help loading image from a url 2014-05-16 15:27:07


At 5/16/14 07:28 AM, milchreis wrote: As I do not have an account, I cannot tell you what the problem is.
But I'd like to point out the following:

If they wanted to make things public, they would offer an API.
See the security restrictions of the Loader class.

Ooh, thanks for pointing that out to me. I may have to compromise instead.