TFD3 Posted August 1, 2007 Share Posted August 1, 2007 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!! Quote Link to comment https://forums.phpfreaks.com/topic/62774-flipping/ Share on other sites More sharing options...
lightningstrike Posted August 1, 2007 Share Posted August 1, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/62774-flipping/#findComment-312524 Share on other sites More sharing options...
TFD3 Posted August 1, 2007 Author Share Posted August 1, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/62774-flipping/#findComment-312526 Share on other sites More sharing options...
btherl Posted August 1, 2007 Share Posted August 1, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/62774-flipping/#findComment-312536 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.