Javascript flipH

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
Vael Victus
Forum Newbie
Posts: 24
Joined: Wed Jun 03, 2009 9:29 am

Javascript flipH

Post 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.
stuartshields
Forum Newbie
Posts: 10
Joined: Sat Jan 30, 2010 8:59 pm
Location: Toowoomba

Re: Javascript flipH

Post 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?
Vael Victus
Forum Newbie
Posts: 24
Joined: Wed Jun 03, 2009 9:29 am

Re: Javascript flipH

Post 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. :/
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Re: Javascript flipH

Post 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.
Vael Victus
Forum Newbie
Posts: 24
Joined: Wed Jun 03, 2009 9:29 am

Re: Javascript flipH

Post 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.
Post Reply