Where to insert new code ?

Davidmarks
Another dumb question I'm afraid. I am beginning to get somewhere now using scripts (thanks to help from this forum !) and am trying to get to grips with HTML and CSS . I am trying to insert a css file and produce a class to control images but where the devil do I put it ! My understanding is that it goes in the Head section. But when I look at code view I can't see any sign of that and trial and error insertions have so far only produced syntax errors . I'm sure I'm missing something obvious here !
Secondary question _ The thread concerning image control shows how to superimpose one image on top of another and also how to change opacity. Would I be right in thinking it possible to use these techniques to fade from one image to another given a suitable trigger( although perhaps this would require some Javascript to set up a loop which increments a variable defining opacity) . Just wondered if anyone could confirm that I am on the right lines here - if so I will do some more work on it .. thanks

The Pixie
Davidmarks wrote:Another dumb question I'm afraid. I am beginning to get somewhere now using scripts (thanks to help from this forum !) and am trying to get to grips with HTML and CSS . I am trying to insert a css file and produce a class to control images but where the devil do I put it ! My understanding is that it goes in the Head section. But when I look at code view I can't see any sign of that and trial and error insertions have so far only produced syntax errors . I'm sure I'm missing something obvious here !

You are not missing anything obvious, that is for sure.

You can use JQuery or plain JavaScript to add a link element to the head element. You need to use GetFileURL to the get the file location to ensure it works on-line and off-line (and I would check that it does work on both sooner rather than later). Have you tried the "HTML Tools" button when playing off-line? It is good for seeing how elements are arranged.

This thread might give some more clues.
viewtopic.php?f=18&t=5111

Secondary question _ The thread concerning image control shows how to superimpose one image on top of another and also how to change opacity. Would I be right in thinking it possible to use these techniques to fade from one image to another given a suitable trigger( although perhaps this would require some Javascript to set up a loop which increments a variable defining opacity) . Just wondered if anyone could confirm that I am on the right lines here - if so I will do some more work on it .. thanks


My guess is that yes you can. I would start with JQuery animations (transitions?), as that would probably be the best way to do it. Then write a tutorial to tell the rest of us!

Davidmarks
Whoops ! Think I am in well over my head here. But in the unlikely event that I crack it I will certainly write a tutorial !!

XanMag
Y'all speakin' dutch. Either that, or I'm drunk.

Good luck and happy gaming.

XanMag

Davidmarks
Trouble is, I don't even understand the Dutch that I'm speaking. It's just that I thought having suceeded in changing an add picture command into an HTMl img tag which includes a style statement (I'm probably using the wrong terms here !) and got it to work I should be able to create a class and then use it in other locations but if I understand correctly thats not the case without this Jquery and get url stuff which I just don't understand .... Back to the drawing board with something simpler !

The Pixie
I would suggest abandoning inserting a CSS file, and just changing the style properties via JavaScript. the thread I linked to describes how to do that. You need to do that anyway because the CSS attributes will change when the fish move.

Davidmarks
What's this with the fish ? Think you have the wrong game there ! Iam trying to change a photograph of a location as it is today to one as it was in the 1930's and thought it would be nice if I could fade from one to the other. I think I may give up on it as I dont't really understand Javascript although I may have a shot at learning, what with Quest HTML CSS Javascript and Jquery I seem to have my work cut out !!

The Pixie
Davidmarks wrote:What's this with the fish ? Think you have the wrong game there !

Sorry, that was the Ocean 23 thread. The guy over there is also trying to do fancy stuff with images, and my comment is relevant to both.

Davidmarks
Fine ! Thanks ... back to the books !

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums