I'm trying to do something very simple but without any luck: have an image appear when text is rolled-over.
I got it to work with mouseover but the flicker was giving me seizures. I saw several examples of CSS implementations but all used a background image, preloaded or not...i want to use simple text without any background image.
can anyone provide a snippet or link?
Thanks
(yes i've searched the asylum and google as well to no avail).
If i'm reading Doc's script right, it is for swapping images where an existing image exists.
I want to rollover a text link without any initial image. I'm sure this code could be modified to use a transparent.gif (i.e invisible) but you still have the flicker associated with mouseovers..no?
I don't want to diss Doc's code, but it says copyright 1998 in his script. Doing rollover via image swapping is a thing of the past. Now CSS-only technique is well known and documented. There is no need to resort to JavaScript for a simple rollover.
Except I think that SleepingWolf's case here is that he wants the image to appear *somewhere else*, possibly in a completely different part of the page, when he hovers over the link, not in the link's background. CSS just won't work for that, but the Doc's code can be adapted for it.
Skaarjj has it right. I have good news and bad news.
The good news: the code below does exactly what i want to do.
The bad news: the image is supposed to open on top of a flash movie - but if memory serves me right, that isn't possible is it? to have an image rollover a flash movie?
Btw, what i'm trying to do is have a "help screen", a screenshot with notations, layered on top of the flash movie. the help screen would explain the navigation. it would be activated by a mouseover on a help link in the top menu bar. I guess I'll have to do this in Flash
Plugins, IFrames and (some) form controls used to be displayed on top of everything. Normally that's not the case anymore in Opera9. The trick to display an IFRame between the such elements and the thing you want to display. Check DIV over SELECT boxes (solution)
But indeed the Help might be better in the Flash itself ...
Hi Poi
and thank you for the code.
I tested it in Firefox and unfortunately the image still appears under the flash movie.
In IE6 the rollover does not happen - the image appears under the background when the page is opened.
Notice that I'm aware of IE6's lack of support for adjacent sibling selectors, and that I used a SPAN and not an A tag, on which IE6 does not support the :hover pseudo class. I did that on purpose : to teach how to fish instead of giving a fish.
Sleepingwolf, what about you show what you've done so far so people can give you some hints on how to achieve your goal.
Poi
Your point about learning how to fish is a valid one, I hope I will get to the point where I don't need to ask for help anymore. But i'm far from there, so I really appreciate the help you guys are offering.
I'm a photographer, not a programmer. I'm self-taught and I'm proud that I was able to put together an opensource CMS website with Flash components in less than 5 working days. I registered my own domain, created my own SQL database, installed and configured all the CMS software myself (pixelpost, folderblog, WordPress).
I was able to modify all the CSS and PhP required to get the look and feel and functionality that I wanted. I was able to work with Flash for the first time to setup a Flash component (SSP) per my specs. I added HTML mods where required. I'm also teaching myself photoshop for adjusting photos.
In the process of setting up my site I have encountered many stumbling blocks. I have gone to the SSP, WordPress and PixelPost forums - in 100% of the cases none of my problems were resolved - I was able to resolve each and everyone myself, thru research but again mostly thru trial and error.
All this to say I'm learning and want to learn more. But the way I prefer to learn is by looking at working code and saying "oh, i get it....now I can modify this sucker exactly the way i'd like".
So once more, thanks for your help. I'll post a link with my butchered up code if you guys are kind enough to take the time and point me in the right direction without laughing at a beginner's work.
If I remember correctly setting the wmode attribute of the flash transparent will allow you to set the zindex to allow other stuff to show over the flash.
A perhaps not very elegant, but workable solution would be to just move the flash movie out of sight whenever you want the help box to be visible. You can do this by having the movie's parent element set to "position: relative;" initially, and the flash movie to "position: absolute;" with a "top" value of either 0 or -10000px, depending on the help box's visibility.
To get it to work in IE you'd probably not get around using a bit of JS, but in this case I don't think I'd let that keep me
quote: SleepingWolf said:
Btw, what i'm trying to do is have a "help screen", a screenshot with notations, layered on top of the flash movie. the help screen would explain the navigation. it would be activated by a mouseover on a help link in the top menu bar. I guess I'll have to do this in Flash
Just a thought, but,,,
have you tried making the first image in the first gallery a help screen? I know what you mean about the navigation, I have used SSP too and I tried this. I can't find the SWF just now as illustration, but it was only a rough first draft anyway, if I dig it out I'll link it up if it's useful.
Also, I have voices in my head telling me that SSP might be able to be configured with a welcome screen. The same voices also think that one of the formats accepted is GIF so an animation could also be utilised.
I know this does not solve the question posed but it is another way.
Also its's the first time I have ever wandered down the long halls of the CSS - DOM - XHTML - XML - XSL - XSLT Forums with anything remotely useful to say.
Kuckus: thanks so much, I think we are almost there.
This a quick and dirty test. It works perfectly in IE..but doesn't align centered, yet, in Firefox.
In Firefox i've to figure out how to get it to center - i know the parameter is set to left=0, but why does it display centered properly in IE....i'll keep trying.
Testing locally, I can change the javascript left value and/or the left style values.
As a result I get Firefox working but not IE or I get IE working but not Firefox
Thanks again Kuckus...your help is greatly appreciated.
I still can't get FF right. When you say the container, you mean the overall movie container?
I'm getting confused with the hundreds of possibilities for positions:
1) The CSS containers
2) The javascript function
3) The divs for movie and help screens.
Ideally I would like to be able to center both the movie and the help image horizontally.
I would also like the flexibility to control the vertical placement.
I added a parameter to move the top down a little without breaking IE.
This is the code as it stands now ( i played around but can't go further than this). CSS
Thanks Poi but I prefer a rollover and I really don't understand your references to the flash object, i've never seen it embedded that way...way over my head.
The code kuckus provided is 90% there..just can't it to work in both browsers at the same time...I can get either one to work, but not both.
[edit] why do you have a shitload of in the markup of your navigation Can't you set the padding of the navigation items in your CMS ? That would be much cleaner. [/edit]
quote:I still can't get FF right. When you say the container, you mean the overall movie container?
Yep, thought of the #movieContainer div's CSS.
quote:I'm getting confused with the hundreds of possibilities for positions:
1) The CSS containers
2) The javascript function
3) The divs for movie and help screens.
Well, actually they're all one and the same!
Whether you set an element's position in the head's style section, inside an external css file or "inline" through a tag's style attribute (<div id="blah" style=".....") or through JS, it'll have the same outcome. But as separating style from content is always a good idea, most of the time you'll not use inline styles but keep them in an separate .css file or the <style> section in the page's head where you use IDs and classes to access the HTML tags.
The JS in this case is nothing more but another means of accessing an element's already existing styles, checking what they are when a user hovers the link and changing them accordingly.
This should be OK as you have it, as the problem is the movie container's position, not the movie itself.
/*@poi: your use of diplay:none just had me thinking why I went for the repositioning in the first place..... must be because when I do Flash, I do MP3 players, and for MP3 players, repositioning is cooler as the music will keep playing in almost every browser if I don't hide them entirely */
Hi Poi
When I said "embed" i meant in a generic fashion, that the plugin is embedded in an html container. wrong choice of words i guess.
what i meant to say is that i could not follow the way you are using the object tag..the syntax i was using is quite different and i am unable to adapt to yours even though i tried.
As for the padding of the header menu items, yeah i guess there is a much neater way to add the spacing, i will play with the CSS (p.s this is not part of the CMS, it's just plain HTML that i miscoded myself)
Kuckus:
Even with the "margin" , FF still does not work...but I really appreciate all your help. that was just great.
Poi, Kuckus, everyone else:
Thanks for all your time, please consider this thread closed, I'll try a couple more hours of hacking without knowing what i'm really doing
..if it works great...if not I did learn lots of new stuff from you guys. And I will follow the links your provided.
Thanks again. You guys are great. I hope I can return the favour one day.
Nice. Just to make it more clear, you could add a big HELP watermark on the sample image. And it'd be easier to aim at your navigation items if they add a bit of padding.
Otherwise it looks nice.
Of course the bugger I am would have prefered a solution that do not require a plugin
Not sure what you mean by a solution that does not require a plugin?
You mean not to use the Flash Gallery?
As for the padding, I'm wasn't able to do it with CSS instead of nbsp....only the values for the top seemed to work, the others didn't...i guess i wasn't using the right syntax...
But i did space them out with spaces, and you're right it looks much better. thanks for the suggestion.
one quirk i noticed, and i can live with.
if you rollover Help with FF while watching a slideshow, on mouseout it returns to the Album View.
if you rollover Help with IE while watching a slidewhow, on mouseout it returns to the Slideshow..which makes more sense.