Jump to content

"Flipping"


TFD3

Recommended Posts

Ok this may sound strange but I was wondering if someone can help me make a php script where two PNG images in the script rotate.

 

For example:

I had two images, image_1.png and image_2.png and I want image_1.png to show up for X amount of seconds then flip to image_2.png and have it show for X amount of seconds then start over again. This can be done with Java Script but for what im needing to use it for there is no way javascript can work.

 

Does anyone have any ideas on how to do this?

 

Thanks guys!!

Link to comment
https://forums.phpfreaks.com/topic/62774-flipping/
Share on other sites

This is I believe is not possible in php. However if it was a GIF image you might be able to find some library allowing you to generate an animated GIF image doing what you described. Use JavaScript or animated GIF files.

 

The only thing...GIF images are not supported for what I need :(

I'll give it a try with javascript

Link to comment
https://forums.phpfreaks.com/topic/62774-flipping/#findComment-312526
Share on other sites

Sounds like your requirements are quite tight.  It is 100% not possible in php, as php runs on the server.  What you want (flipping an image) must be done in the client's browser.

 

The only way I can imagine it could be done without javascript is to have an iframe that constantly refreshes itself, each time refreshing to the other image.  The iframe and the image itself could be set as cacheable, so hopefully the browser would not be making http requests every time.

 

Other than that, javascript, flash, java, activex can all do it on the client side.

Link to comment
https://forums.phpfreaks.com/topic/62774-flipping/#findComment-312536
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.