I'm designing an interface that requires the skins to support both http images and the click proc.
There are no skins (as far as I can tell) that support both http images and the Click proc.
Skins can't be made transparent, so I can't emulate the behavior I need.
I'm out of ideas. Does anyone have a solution?
ID:832426
Jun 24 2012, 10:11 am (Edited on Jun 25 2012, 3:59 pm)
(See the best response by Super Saiyan X.)
|
|
You can use a button, save the http image to ur p.c then set the button background the the image and create a verb that wen clicked etc For example:
mob/verb/Finish_Char() Dont forget to take the () off when you are puttin the verb in the button command |
In response to The Motto
|
|
The Motto wrote:
You can use a button, save the http image to ur p.c It has to be grabbed from the web. |
Something like getting image from direct link, which can be changed over time during runtime
|
You can support HTTP images.
Just...in a unique way. I just wrote this up, it works for me. mob/verb/test(link as text) |
In response to Super Saiyan X
|
|
Super Saiyan X wrote:
You can support HTTP images. > Thank you, very much. That works like a charm. |
One last problem, is it possible to scale the image?
mob/verb/test(link as text) Calling Scale on webImage doesn't work because, for some reason, webImage is null. But when the icon is returned with no manipulation, it works fine. |
You might need to do:
var/icon/webImage = icon(img["CONTENT"]) I recommend keeping the "CONTENT-TYPE" check from my earlier example. That way, if the server is unable to reach a page without the proper content type of an image, it won't continue to pass the image it retrieved to whatever functions. It's better, if you want to stop errors. I'm pretty sure all images will return "CONTENT-TYPE" as "image/png" or whatever the type may be. So, a findtext() will check for the "image" there. You might also want to check if img is null or not. So, something like: if(img&&findtext(img["CONTENT-TYPE"],"image")) |
mob/verb/test(link as text) After playing with this, it seems icon's don't like JPG's, and only accept PNG's. The other problem is writing it as 'icon(img["CONTENT"])' makes it stop crashing, but nothing appears. The program doesn't need to use the icon variable. The images are definitely restricted to skin's. Any other method to scale the image will do. |
Hm. I had an issue like this when I was using icons in my skin.
If I recall, I did something like this: mob/verb/test(link as text) |
you can use code to get images from website then set them as background.
as long as i know they can be made transparent.