ExternalGraphicsHTML

You can include external graphics to dress up your Run BASIC programs. Simply link to an online image. The use of double quotes when using variables is based on a tip from Carl Gundel.

code format="vbnet" ' To load from literal url path, replace inner quotation marks ' with apostrophe (single quote character) html "" Print: Print

' To display using a literal url path and a variable file, use ' the apostrophe (single quote character). ' Either the + or the ; can be used to concatenate the command. img$ = "FrogGIF.gif" html "" html "" Print: Print

' To display using a variable url path and a literal file name, use ' the apostrophe (single quote character). ' Either the + or the ; can be used to concatenate the command. url$ = "http://runbasic.wikispaces.com/space/showimage/" html "" html "" Print: Print

' To display using both URL and file name in variables, use double quotes. ' Either the + or the ; can be used to concatenate the command. img$ = "FrogGIF.gif" url$ = "http://runbasic.wikispaces.com/space/showimage/" html "" html "" Print: Print

' Of course, the whole entry can be concatenated to just one string variable. img$ = "Lily4855.PNG" url$ = "http://runbasic.wikispaces.com/space/showimage/" htmlImg$ = "" html htmlImg$ htmlImg$ = "" html htmlImg$ Print: Print End code

Copy and paste this snippet to the [|Run BASIC Write Your Own Page] and press RUN.

user:apeine uses this technique in Bughunt, a search and destroy game. Thanks for sharing this tip, apeine! :)

Don't have a place to upload images? It's easy to upload and link to images on [|PhotoBucket].

You can also add width, height & border tags. code img$  = "Lily4855.PNG" url$  = "http://runbasic.wikispaces.com/space/showimage/" size$ = " width =""100"" height =""100"" border =""1"""

html " Actual size " Img$ = "" print Img$ html Img$

html " Enlarged size " Img$ = "" print Img$ html Img$

html" "

End code