| View previous topic :: View next topic |
| Author |
Message |
Marilena
Joined: 23 Dec 2006 Posts: 4863 Location: Italy
|
Posted: Fri May 25, 2012 12:20 am Post subject: Flash can load dinamically avatar pictures? |
|
|
if someone buy a flash sticker or a flash 3d frame can the flash use a code that loads the avatar pictures folder of the person that buy the sticker dinamically?
no...i think it's too complex... but how slideshows can do it?
i suppose that imvu uses a common folder for example "http://it.imvu.com/catalog/avatarnumber/photos"
i thought that flash could do it automatically for example in the code I write the absolute link for example "http://it.imvu.com/catalog/" and actionscript could add the avatar name of the person that buy the sticker and photo folder..! so the absolute address will be "http://it.imvu.com/catalog/avatarnumber/photo/"
can you confirm me that it's something impossible? :p _________________
 |
|
| Back to top |
|
 |
Aesica
Joined: 30 Jun 2006 Posts: 4228 Location: USA - WA
|
Posted: Fri May 25, 2012 1:36 pm Post subject: |
|
|
While it's definitely possible to do any of that with flash under normal circumstances, with stickers, it would probably be a lot trickier since you can't actually write any javascript on the page, nor can you specify flashvars; in other words, you'll be limited to existing javascript and you'll have to fetch the data some other way. You're also limited in that you have no control over the allowScriptAccess param, and since I don't think stickers specify anything, you're stuck with the default: "sameDomain."
Your only hope is to play around with flash.external.ExternalInterface -and- you'll need how to access the user's current display pic via javascript witchcraft. I don't have a lot of experience with ExternalInterface, because typically, flash games (what I do) don't need to interact with JS elements.
Good luck though! _________________
Shop full of garbage | Flash Sticker Tutorial |
|
| Back to top |
|
 |
Marilena
Joined: 23 Dec 2006 Posts: 4863 Location: Italy
|
Posted: Sun May 27, 2012 12:47 am Post subject: |
|
|
thank you very much then i'll take a look  _________________
 |
|
| Back to top |
|
 |
PWWR
Joined: 15 Aug 2009 Posts: 27 Location: Christmas Island
|
Posted: Wed Jun 13, 2012 12:21 pm Post subject: |
|
|
I recommend googling for "flash html parsing". Basically you will want to load html file with AS into a variable and search for the location of the username/picture in the code.
However, that would work only if flash somehow knew WHAT to load. I am unsure if flash is that capable because it works on the client side. But, you can 100% create something like this as a request to somebody (hard coding the URL's into AS)
Also, embedding pictures from external sources is also tricky, google for "embedding images in actionscript3"
Good luck _________________
 |
|
| Back to top |
|
 |
Aesica
Joined: 30 Jun 2006 Posts: 4228 Location: USA - WA
|
Posted: Wed Jun 13, 2012 2:26 pm Post subject: |
|
|
Displaying external images is the easy part; just use <img src='url here' /> with a TextField's htmlText property.
The hard part is figuring out the url to the user's current display pic.
Edit for exploitable codeses:
| Code: | var lblTest:TextField = new TextField();
lblTest.multiline = lblTest.wordWrap = true;
lblTest.width = 403;
lblTest.autoSize = "left";
lblTest.htmlText = "<img src='http://i.imgur.com/WP7Hf.jpg' />";
this.addChild(lblTest);
|
_________________
Shop full of garbage | Flash Sticker Tutorial |
|
| Back to top |
|
 |
Marilena
Joined: 23 Dec 2006 Posts: 4863 Location: Italy
|
Posted: Thu Jun 14, 2012 7:45 am Post subject: |
|
|
oooh what a mess.. i'm not so good in coding.. ! O_o
does that code work? :p
yes i suppose i could do it by request but load avatar automatically i don't think it will be possible.. just because it will be a sticker..! _________________
 |
|
| Back to top |
|
 |
Aesica
Joined: 30 Jun 2006 Posts: 4228 Location: USA - WA
|
|
| Back to top |
|
 |
Marilena
Joined: 23 Dec 2006 Posts: 4863 Location: Italy
|
Posted: Fri Jun 15, 2012 9:46 am Post subject: |
|
|
oooh cool!!! You're a genius!!! ^_^
what this code does exactly? does it loads avatar pictures folder?  _________________
 |
|
| Back to top |
|
 |
Aesica
Joined: 30 Jun 2006 Posts: 4228 Location: USA - WA
|
Posted: Fri Jun 15, 2012 10:59 am Post subject: |
|
|
That code just allows a remotely-hosted image from the web (this includes a user's display pic) to be displayed in a swf. In order to display a user's current display pic, you'd need to somehow procure their current display pic url via javascript, but when I tried that years ago, I never could figure out how to do it. Also, since it would be a sticker, you'd need to obtain this url through the ExternalInterface class.
If you can figure out the javascript required to obtain the user's current display pic url, I could probably give you working AS3 code.
Unfortunately, when I last tried, I couldn't get ExternalInterface to call any of the IMVU.* javascript functions (such as IMVU.AvatarCard.showPopup(userID);) but I was pretty new to flash back then so I was probably doing something wrong. _________________
Shop full of garbage | Flash Sticker Tutorial |
|
| Back to top |
|
 |
Marilena
Joined: 23 Dec 2006 Posts: 4863 Location: Italy
|
Posted: Sat Jun 16, 2012 12:41 am Post subject: |
|
|
i was wondering...
could the flash sticker ask first "type your avatar name" and according to the avatar name it could show the gallery.. i know i may say a stupid thing.. but even if it could be possible..it should ask it everytime the sticker loads.. so it's a really stupid question.. :p
i saw some slideshows in the past i activated it once (i don't remember if it was from imvu) and i remember it loaded my imvu pictures..! i wonder how they do that..! _________________
 |
|
| Back to top |
|
 |
PWWR
Joined: 15 Aug 2009 Posts: 27 Location: Christmas Island
|
Posted: Sat Jun 16, 2012 2:30 pm Post subject: |
|
|
| Marilena wrote: | i was wondering...
could the flash sticker ask first "type your avatar name" and according to the avatar name it could show the gallery.. i know i may say a stupid thing.. but even if it could be possible..it should ask it everytime the sticker loads.. so it's a really stupid question.. :p
i saw some slideshows in the past i activated it once (i don't remember if it was from imvu) and i remember it loaded my imvu pictures..! i wonder how they do that..! |
Flash runs client side which means that the variable where you are going to store your name even if it is saved, without any server side code backing it up, you are only one who will see it. In other words, every user who will be introduced to the sticker, has to type his name.
I recommend investigating into Aesica's javascript idea. That sounds right now the best way - using imvus functions. Of course perhaps it is possible to get your own javascript running via homepage (haven't tried running it there so I am unsure how legit this idea is). _________________
 |
|
| Back to top |
|
 |
Marilena
Joined: 23 Dec 2006 Posts: 4863 Location: Italy
|
Posted: Sun Jun 17, 2012 5:15 am Post subject: |
|
|
i understand..! ok ^_^
thank you very much for your help.. it was a doubt i had.. even i'm not so good in programming i'll try to figure it out when i can.. the only thing i did in the past for web design was implementing galleries with external pictures.. that's why i asked.. _________________
 |
|
| Back to top |
|
 |
|