COME, CLICK WITH US 
 OMNIA CONNECT BLOG

Archive for the ‘flash’ Category

Why widgets are good for your brand

Tuesday, January 5th, 2010

Widgets are small applications that users can add to their social network, desktop or blog and distributed using websites and viral sharing. Widgets can contain rich functionality, user interaction or mini applications and are less static as conventional banners. The below widget for www.samsungsoccer.com contains a free kick game which users can install on many different platforms using the sharing button.

Once the widget was installed other users can grab the widget from its new location which is called a “viral grab”. This is the real advantage of widgets - mobility.

Logically, over time most installations of a widget come from instances of the widget on other sites. One user might grab the widget and put it on his Facebook page, his friends take it from there to other sites etc.

Branded widgets are a great opportunity to create awareness by creating something useful and worth sharing.

Tracking widgets in terms of distribution, viral effect, installations and destinations can provide insightful information about users and show the number of interactions or the lifespan of the widget.

Together with social media campaigns widgets are a great way for a brand and its audience to interact.

Lavalamp effect with jquery easing plugin

Tuesday, August 11th, 2009

Here’s a small Javascript function which enables animated highlighting effect on the navigation (lavalamp effect) with the help of jquery easing plugin

$.fn.lavalamb = function(ImgPath){
/* ImgPath:  Path of the image which you need to animate when you hover over a navigation link
   this can be a shadow png image or a pointer image or underline image which you want to animate with a mouseover / mouseout action on a link

   Add css class "Highlight" to the node which is currently active, so the image will always be animated back to this node on mouseout
*/
var LeftPos;
$(this).append('<div id="lavalamp"><img src="'+ImgPath+'" alt="" /></div>'); //Appending lavalamb image to the html, this div can be skinned in the css.
$(this).parent().css({position: "relative"}); //setting the position
$("#lavalamp").css({
position: "absolute",top: $(this).height() // These css values can be edited to vertically position the lavalamb image
});
  $(this).find("li").hover(  //Link hover function
function(){ 	//Rollover
LeftPos = $(this).offset().left - $(this).parent().offset().left; //calculating the left position
LeftPos = (LeftPos - ($("#lavalamp").width()/2) + ($(this).width()/2)); //calculating the left position
$("#lavalamp").animate({left: LeftPos},{queue:false,duration:700,easing: "easeInQuart"}); //Animating the image from the start position to the current mouseover position
},
function(){
   LeftPos = $(this).parent().find("li.Highlight").offset().left - $(this).parent().offset().left; // Getting the position of the highlighted node
 	 $("#lavalamp").animate({left: LeftPos},{queue:false,duration:700,easing: "easeOutQuart"}); //Animating the image back to the start position from the current mouseover position
  });
}

And call this function in the html page

<script type="text/javascript">
$("#Navigation").lavalamb("Images/Background/NavShadow.png"); // Navigation is an id of the <UL> list which has navigation nodes
</script>

lavalamb
Here’s an example
Example1

Adding interactive google map to a web page

Tuesday, July 28th, 2009

The Google Map API provides a number of options for manipulating maps and adding content to the map through a variety of services, allowing you to create maps applications on your website.

Here I  explored the google map’s  Info Window method a bit and demonstrated how to add dynamic content to it.

Suppose in a contact page we have a list company branch information and when clicking each branch, an info window should popup with the corresponding address  in a google map placed in the same page.

First of all we need to create an HTML <ul> list with all branch information

untitled-2

The information under each heading either you can make it hidden completely or make it as an accordion.

The html block should look like


&lt;ul id=&quot;BranchList&quot;&gt;
&lt;li&gt;&lt;a rel=&quot;25.096803,55.157306&quot; href=&quot;#&quot;&gt; Head Office&lt;/a&gt; &lt;div class=&quot;&lt;span style=&quot;color: #ffffff;&quot;&gt;Hidden&lt;/span&gt;&quot; &gt;
&lt;p&gt;&lt;span&gt;Corniche Road, &lt;br/&gt;
Golden Beach Tower, &lt;br/&gt;
Penthouse Level,&lt;br/&gt;
P.O. Box 8206, Abu Dhabi, U.A.E.&lt;/span&gt;&lt;br/&gt;
Tel: +971 2 409 0700 &lt;br/&gt;
Fax: +971 2 622 1707&lt;br/&gt;
Email: &lt;a href=&quot;mailto:info@noreply.com&quot;&gt;info@noreply.com&lt;/a&gt; &lt;/p&gt; &lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div id=&quot;GoogleMap&quot;&gt;&lt;/div&gt;

add the latitude and longitude values as a coma separated list as highlighted.

now you need to invoke the javascript function to read the information from the html and place it in the Google Map at the right location.

&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
InitiateGoogleMap(&quot;GoogleMap&quot;,&quot;BranchList&quot;);
// --&gt;&lt;/script&gt;

final1

and the javascript function is below

function InitiateGoogleMap(GoogleMapDivId,AddressListElementId){
/*
- To display info window on google map on click of a particular link or button -
GoogleMapDiv : The Id of the div where the map is to be displayed
AddressListElementId : the Id of a UL list where the information displayed.
*/
 if (GBrowserIsCompatible()) {
  var Map = new GMap2(document.getElementById(GoogleMapDiv)); // Initializing the map
  var Coordinates={}; // lat/long values
  var Address = $(this).parent().find(&quot;.Hidden&quot;).html(); // getting the info to be displayed
  var point = new GLatLng(parseFloat(Coordinates[0]), parseFloat(Coordinates[1])); //Creating a marker point
  var Location = new GMarker(point); initializing a marker

  Map.setCenter(new GLatLng(25.096803, 55.157306), 13); // centering the map in a default location
  Map.setMapType(G_SATELLITE_MAP); // Setting the Map type
  $(&quot;#&quot; + AddressListElementId + &quot; li a:first&quot;).click(function(){ //Click function

  Coordinates = $(this).attr(&quot;rel&quot;).split(&quot;,&quot;); lat/long values
  Map.addOverlay(Location); //Creating a marker
  Map.openInfoWindow(point, $(&quot;#&quot;+AddressListElementId +&quot; li:first&quot;).find(&quot;.Hidden&quot;).html()); //Opening the first Item Description in the Map Info Window when the page load

  GEvent.addListener(Location, &quot;click&quot;,
  function() {
   Map.openInfoWindow(point, Address);
  });
  return false;
 });
 Map.addControl(new GSmallMapControl());
 Map.addControl(new GMapTypeControl());
 }
}

Note: Jquery plugin and googlemap API references are required to make this work.

You can use Google Map plugins to skin the info window


Augmented Business Card

Sunday, July 26th, 2009

.

Augmented reality became popular since the recent release of FLARToolKit, an AS3 library that can be use with flash 3D Engines. Everybody now can give it a try without installing any software, only a browser and the flash plug-in are required. (see the links below).

Augmented Reality with Flash

Augmented Reality with Flash

However a major inconvenient remains: we have to print a black and white pattern which will be used by the computer as a reference to create the interactions between the real and virtual images.

Without these patterns nothing works.  Unfortunately most of the time I’m just too lazy, I feel  it’s not worth the effort and click away…

Here comes the bright idea: print this pattern on your business card!
No more effort for your customers and they will come on your website to check it out for sure.

What is more, you can make this demo interactive and link to you products or your portfolio, see the video:

.

.

AUGMENTED BUSINESS CARDS:

http://jamesalliban.wordpress.com/
http://www.augmentedbusinesscard.net/

.

MORE ABOUT AUGMENTED REALITY WITH ADOBE FLASH / AS3:

The library: FLARToolKit
Start-up guide: http://saqoosha.net/…/start-up-guide/

Some examples:
http://ge.ecomagination.com/…/augmented_reality
http://www.boffswana.com/