Page 1 of 1
Javascript flipH
Posted: Fri Jan 29, 2010 3:15 pm
by Vael Victus
At my wit's end as usual. I need to flip an image - not rotate. That's it. I need to flip it horizontally. If a man is facing left, he will thus face right. Apparently this is very difficult. In IE, it's flawless: attach the filter "fliph". But for two hours I've googled and it seems, literally, impossible. I cannot find one example that would help me. There was jQuery flip but it doesn't seem to actually flip anything. It just spints it around and also makes an awful color on the background. I was hoping any of you had some idea of how to do this. I also looked into js canvas and I'm not certain that it's what I need.
Re: Javascript flipH
Posted: Sat Jan 30, 2010 9:33 pm
by stuartshields
This could be a very long shot, if it's working in IE and not in Firefox, Safari etc. maybe look at how your code is structured? Firefox is very anal on Javascript code being right where as IE isn't.
Can you post your code for us?
Re: Javascript flipH
Posted: Mon Feb 01, 2010 2:41 pm
by Vael Victus
Well, my code's here.
http://murcity.com/worldview.php
I actually haven't used javascript yet? It's just a css filter for IE right now, and it does work flawlessly in IE. It just seems that it's impossible to swap them in any way in non-IE browsers. And I'm hoping someone knows how to. :/
Re: Javascript flipH
Posted: Tue Feb 02, 2010 11:52 am
by kaszu
Firefox is very anal on Javascript code being right where as IE isn't.
From my experience it's exactly opposite.
I also looked into js canvas and I'm not certain that it's what I need
Try it, it should be less than 20 lines of JS to flip an image in canvas.
Re: Javascript flipH
Posted: Wed Feb 03, 2010 12:54 pm
by Vael Victus
Try it, it should be less than 20 lines of JS to flip an image in canvas.
I have googled and it seems like Canvas will only rotate an image - not literally flip it horizontally, which is what I need. It looks like a huge piece of code which is why I'm hesitant to delve in.