ID:173344
 
Hey, Can someone show me how you add icons(dmi's) into a browse window, and have the icon use the right icon_state? I know the html is
<IMG></IMG>
but it doesn't seem to want to go. Oh and can you have obj's in the browse window, if so can someone show me that as well?

Thank's for your time =)

~Hendrix~
You can show images compiled into the game to the player by using browse_rsc. Once you've browse_rsc'ed a file to the player, you can use the <IMG src="filenameyoubrowsed"> tag to display it in a browser window.
The <img> tag has no closer.

Lummox JR
In response to Jon88
Thanks jon works perfect. Well almost is it possible to change the icon_state?

~Hendrix~
In response to Lummox JR
Acually it does.. But icons and rsc only need one ;)
In response to Hendrix
From the official HTML specification:

<code>13.2 Including an image: the IMG element ... Start tag: required, End tag: forbidden</code>
In response to Crispy
What if your getting a tag off the net? And what does html hyave to do with tags in DM????
<IMG></IMG>          //display icons
In response to Hendrix
What if your getting a tag off the net?

It's no different. The browser window in Dreamseeker is a BROWSER WINDOW. It reads HTML the same way any Internet Explorer browser window does.

And what does html hyave to do with tags in DM????

Not a dang thing... but who's talking about tags in DM? We're talking about HTML.


<IMG></IMG>          //display icons

Does not. There is no closing </IMG> tag in HTML.

<IMG SRC=whate.ver>

is the entire HTML code needed to display an image. It's not an open tag, it's self-contained.
In response to Lummox JR
At least, not in HTML 4.0. XHTML 1.0 uses XML, which demands that all tags have a closing tag. However, this is almost always accomplished by doing:

/</font>>


I think XML is a pretty crappy format because of the absolute necessity of all tags having closing tags, or having terminating slashes in their tags, when it'd be a simple matter of adding something like that to a rulesheet for your XML files...


For the actual gist of this thread, though, XHTML 1.0 is a big flop and IMG does not and should not have a closing tag in normal HTML. I use it (XHTML) because eventually W3C will have their way and people will stop supporting HTML 4.0... but that's pretty much the only reason.
In response to Spuzzum
Spuzzum wrote:
I think XML is a pretty crappy format because of the absolute necessity of all tags having closing tags, or having terminating slashes in their tags, when it'd be a simple matter of adding something like that to a rulesheet for your XML files...

A rulesheet option would be nice. But what I think is truly dumb is that XML is case-sensitive. There's absolutely no point in that.

Lummox JR
In response to Hendrix
Hendrix wrote:
Thanks jon works perfect. Well almost is it possible to change the icon_state?

~Hendrix~

It sure is.
whoever << browse_rsc(icon('myicon.dmi',"mystate"),"mystate.dmi")


That should work.

~>volte
In response to Hedgemistress
I'm using DM, in a browse proc and using to display DMI FILES there for is a tag in DM and not standard HTML.
In response to Volte
Thanks, cant try it now at work. ;)

Gilmore Research Group-I.T. Guy
In response to Hendrix
Wrong, the browser uses standard HTML, DM does not have a markup language, there's a scripting language, but you still need HTML to use that. As everyone else has said, there is NOT A CLOSING TAG for IMG!
In response to Nadrew
...eh why you yelling.... angry typing cuases carpotunnel. It ain't my fualt dantom shows in the "Help" that is the TAG to use for images in DM... so i guess there wrong, maybe you should corret them too.
In response to Hendrix
Hendrix... Dantom's browser window is the INTERNET EXPLORER browser window(at the moment, anyways), and therefore uses HTML. Almost anything you can do in IE, you can do in the browser window. Anything you can't do in IE, you can't do in that window, either.