codewala

code it

Fullscreen Mode in AS2

To enable fullscreen mode using AS2 for a SWF file embedded within HTML page, add the parameter allowFullScreen in the object and embed tags in the HTML page and set its value to true.

param name="allowFullScreen" value="true"

Note:
1. This only works for SWF files published for Flash Player 9 and above
2. Full-screen mode does not work if wmode is set to opaque or transparent
3. When in full-screen mode, all keyboard input is disabled except for the keyboard shortcuts which exists the full-screen mode.

add a button with the following code which will toggle the browser window between Fullscreen and Normal mode when clicked

on(release)
{
if(Stage.displayState == "normal")
{
Stage.displayState = "fullscreen"
}
else
{
Stage.displayState = "normal"
}
}

June 26, 2011 Posted by | actionscript 2.0, Flash, HTML | 3 Comments

Detecting Devices Using JavaScript

var deviceIphone = “iphone”;
var deviceIpod = “ipod”;

//Initialize our user agent string to lower case.
var uagent = navigator.userAgent.toLowerCase();

//**************************
// Detects if the current device is an iPhone.
function DetectIphone()
{
if (uagent.search(deviceIphone) > -1)
return true;
else
return false;
}

//**************************
// Detects if the current device is an iPod Touch.
function DetectIpod()
{
if (uagent.search(deviceIpod) > -1)
return true;
else
return false;
}

//**************************
// Detects if the current device is an iPhone or iPod Touch.
function DetectIphoneOrIpod()
{
if (DetectIphone())
return true;
else if (DetectIpod())
return true;
else
return false;
}

June 24, 2011 Posted by | HTML, JavaScript, Mobile | Leave a comment

Google Web Toolkit (GWT)

Google Web Toolkit (GWT) is a development toolkit for building and optimizing complex browser-based applications. Its goal is to enable productive development of high-performance web applications without the developer having to be an expert in browser quirks, XMLHttpRequest, and JavaScript. GWT is used by many products at Google, including Google Wave and the new version of AdWords. It’s open source, completely free, and used by thousands of developers around the world.

click here to read….

June 12, 2011 Posted by | HTML, JavaScript | Leave a comment

Excel tips

To get current row and column of the selected cell
ActiveCell.Row
ActiveCell.Column

To get the last filled row
Cells.Find(“*”, SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row

To get hyperlink address from a cell
Range(“A1”).Hyperlinks(1).Address

 

June 11, 2011 Posted by | Excel, VBA | Leave a comment

10 Tips for New iPhone Developers

Nice tips shared by Paolo Ranoso for iPhone developers
http://net.tutsplus.com/tutorials/other/10-tips-for-new-iphone-developers/

June 7, 2011 Posted by | Mobile | Leave a comment

Disable printing from browser using CSS

A simple style sheet to disable printing of a HTML page.

@media print
{
body { display:none }
}

June 5, 2011 Posted by | CSS3, HTML | Leave a comment