Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 18th August 2009, 06:53
dinesh.4126 dinesh.4126 is offline
Junior Member
 
Join Date: Jul 2009
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to add blinking effect in .php

Hi,
I am having code for google map weather information display.Using overlay text on image to pass text on google map.How can I add blinking effect in image .php code.
Can some body guide me ??
Reply With Quote
Sponsored Links
  #2  
Old 26th August 2009, 09:04
dinesh.4126 dinesh.4126 is offline
Junior Member
 
Join Date: Jul 2009
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Below are the part of PHP code
HTML Code:
 if($fish_info)
                        { ?>
                                var latlng = new GLatLng(northEast.lat()-latSpan * 0.3,
                                northEast.lng()-lngSpan * 0.1);
                                info = "<?php echo $fish_info; ?>" ;
                                file = "<?php echo 'img/fish.png'; ?>" ;
                                map.addOverlay(createMarker(latlng,file,info)); 
                         <?php
                        }?>
In the attachment fish image display on Google map.But I want to give blinking effect on Fish image How can I do????
Suggest something Upon this.......
Attached Images
 
Reply With Quote
  #3  
Old 26th August 2009, 09:10
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,033
Thanks: 261
Thanked 147 Times in 128 Posts
Default

Why not replace the fish.png' with a blinking "animated" .gif, and use that?
Reply With Quote
  #4  
Old 26th August 2009, 09:23
dinesh.4126 dinesh.4126 is offline
Junior Member
 
Join Date: Jul 2009
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

But we can also do using Java Script,HTML??
Quote:
Why not replace the fish.png' with a blinking "animated" .gif, and use that?
How can I replace the Fish.png with Blinking Animated .gif.Will it work with PHP code if I Replace with Animated Image??
If I am saving downloaded animated .gif image and using that image in php code its not blinking....

Last edited by dinesh.4126; 26th August 2009 at 09:54.
Reply With Quote
  #5  
Old 26th August 2009, 13:47
dinesh.4126 dinesh.4126 is offline
Junior Member
 
Join Date: Jul 2009
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
Google search I found JAVA script for Blinking used that script to introduce the blinking effect and get some success in doing but its Blinking Outside Google map separate fish image.Not on Google map.Thing become clear in attachment.
Code:
<script type="text/javascript">
 var blinkImg = function (imgname, s) {
     clearTimeout(blinkImg['blinking' + imgname]);
        var obj = document.images[imgname];
          if (arguments[1] === 'blink') {
         obj.style.visibility = !(blinkImg[s + imgname] = !blinkImg[s + imgname])? '' : 'hidden';
     blinkImg['blinking' + imgname] = setTimeout(function(){blinkImg(imgname, s);}, 350);
                                                                }
         else {
            blinkImg['blink' + imgname] = false;
    obj.style.visibility = '';
                                                                                                                }
                                                                                                                };
 </script>
                                                                                                                                                                                                                      <body>

 <img name="blinker1" src="img/imagename.gif"><br>
 <input type="button" onclick="blinkImg('blinker1', 'blink');" value="Blink">
 <input type="button" onclick="blinkImg('blinker1', 'stop');" value="Stop">
 </body>
Below are PHP code
PHP Code:
  if($fish_info)
                        { ?>
                                var latlng = new GLatLng(northEast.lat()-latSpan * 0.3,
                                northEast.lng()-lngSpan * 0.1);
                                info = "<?php echo $fish_info?>" ;
                                file = "<?php echo 'img/imagename.gif'?>" ;
                                map.addOverlay(createMarker(latlng,file,info));
and in above code imagename.gif is fish image .And want this image will be blinking on google map.Right now its which is not happening on google map.Can somebody assist what change I supposed to do make it blinking on google map.Kindly help me out from this.Something missing from my side please let me know..
Attached Images
 

Last edited by dinesh.4126; 26th August 2009 at 14:12.
Reply With Quote
  #6  
Old 27th August 2009, 15:03
dinesh.4126 dinesh.4126 is offline
Junior Member
 
Join Date: Jul 2009
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Hi,
See in PHP code var latlng = new GLatLng(northEast.lat()-latSpan * 0.3,northEast.lng()-lngSpan * 0.1); is location of Fish Image on google map and file = "<?php echo 'img/fish.png'; ?>" ; is the Image path.And problem is that How can I call blinking function inside map.addOverlay(createMarker(latlng,file,info)); so that Image will start blinking on Map.Suggest me upon this????
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
freebsd 7, samba 3, domain controller alexdimarco Suggest HOWTO 6 5th November 2010 16:54
ISPConfig 3.0.0.8 RC1 released till General 92 22nd February 2010 09:52
How to add a subdomain? malinens Installation/Configuration 2 10th March 2008 23:16
Advice on how to setup Lintrack As A LAN Gateway And An OpenVPN Bridge eddiequek HOWTO-Related Questions 0 12th July 2007 10:38
Have to manually add virtual server without WWW? lipp9000 Installation/Configuration 8 21st July 2006 15:54


All times are GMT +2. The time now is 04:47.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.