Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Setting Background Images

5 years ago

I've read the article on assigning background images ('How to Create A Great Title Page', by Zikara). I have tried inputting the following code into the scripting of a page, as the article suggests:  $PAGETEXT := $PAGETEXT + <body background='URL HERE'>  (of course, replacing the 'URL here' with the URL for my desired image). I've also tried going directly into the source code and typing this: <body background="URL">. 

However, neither of these options seems to work. The background is still just plain white, and I don't know what I'm doing wrong. I've done other page scripting before that has worked (such as for adding new text, or for changing the colour of text on a page), so I don't think I'm messing up something with the scripting. Does anyone know why this isn't working?

Setting Background Images

5 years ago
I don't see a global script in the game. Where are you putting that?

Anyway, I can't test anything right now, but if you go browsing back a little ways on this board there are threads with explanations for backgrounds, it's a common question.

Setting Background Images

5 years ago

Thanks Mizal. 

It was a page script on the specific page 'Act 1' in chapter 1; I didn't want it to be a global page script. Most of the other forum posts suggested the code that wasn't working, but on one page BradinDvorak was nice enough to suggest a code that worked. The working code is :

$PAGETEXT := "<style>

     body { background: url('insert URL here');

}

</style>" + $PAGETEXT

Anyways, I've got it working now. Apparently other people have been having the same problem with the previous code. Perhaps this modification should be made to the original article. 

Setting Background Images

5 years ago

I agree. When it worked for most people, it was alright (kind of a gross method but at least it was simpler to plug in), but now that it’s so unreliable, it’s definitely not great to keep it the way it is.

Setting Background Images

5 years ago
What exactly changed to break Zikara's method?

I thought she was supposed to have been legendary at this stuff.

Setting Background Images

5 years ago

Can’t definitively say, especially since it still works for some, but my guess is support is dwindling? The ‹body background› attribute has been deprecated for a few years, the tag is unclosed, and putting an extra ‹body› in the document like that has never been legal HTMLwise (granted, putting a ‹style› outside of the ‹head› isn’t “legal” either). I figure the combination of nonstandard factors are leading modern browsers to increasingly choose to ignore it.