27
Jun

Calculating Taskbar height + Adobe AIR

To create Application alert as in MSN messenger, that happens while a contact signing In. Here we are going to see how to calculate and position an alert window for that we should also calculate the height of Task bar.

That's not a pretty tough job in Adobe AIR.

var screenBounds:Rectangle = Screen.mainScreen.bounds;
 
var screenVisibleBounds:Rectangle = Screen.mainScreen.visibleBounds;
 
var _taskbarHeight:Number = screenBounds.height - screenVisibleBounds;
 
var _taskbarY:Number = screenBounds.height - _taskbarHeight;

Screen.mainScreen.bounds return the total screen height and width while, Screen.mainScreen.visibleBounds return the visible area other than the taskbar.

With this we can calculate the Taskbar height and place the alert window for the AIR application.

so simple isn't it?

Share/Save/Bookmark

27
Jun

Java Development with Flexbuilder standalone player:

Error:
JST Common Core (2.0.0.v200706041905-1007w311817231426) requires plug-in "org.eclipse.wst.common.project.facet.core (1.1.1)", or compatible.

We can develop Java code in Flex builder standalone version too.While the standalone version of Flex Builder does not contain tools to edit Java code by default, you can install them as Eclipse plugins.

For updating Java Development Features in Flex IDE You need to install Java Development Tools (JDT) plug-in

Follow the steps below:
---------------------

1. Open Flex Builder IDE.

2. Select Help Menu >> Software Updates >> Click on Find and Install.

3. In Install/Update Dialogue box. Select “Search for new features to install” and Click on Next button.

4. In the results, choose Europa Discovery Site (If it asks to select mirror site, select near by site). And click Finish.

5. Select the Java Development package to install.

If it dsplays similar kind of error "JST Common Core (2.0.0.v200706041905-1007w311817231426) requires plug-in "org.eclipse.wst.common.project.facet.core (1.1.1)", or compatible."

Click on Select Required

6. Click Next. And accept the license.

8. Click Finish.

It will take some time to install. once Installed Check with the Perspective to create Java Projects.

Share/Save/Bookmark

27
Jun

Flash in Android finally

Adobe Systems Incorporated (Nasdaq:ADBE) and HTC, a global designer of mobile phones, today announced that the new HTC Hero is the first Android phone to ship with support for Adobe® Flash® Platform technology. The new phone delivers a more complete Web browsing experience and provides access to a broad variety of Flash technology based content available on the Web today.

ANDROID + HTC + FLASH

“As the first Android device with Flash, the new HTC Hero represents a key milestone for Android and the Flash Platform. With close to 80 percent of all videos online delivered with Adobe Flash technology, consumers want to access rich Web content on-the-go.” said David Wadhwani, vice president and general manager, Platform Business Unit at Adobe. “The collaboration with HTC offers people a more complete Flash based Web browsing experience today and presents an important step towards full Web browsing with Flash Player 10 on mobile phones in the future.”

HTC HERO

Image Source : techtree.com

“Adobe Flash is an important core technology for people interacting and experiencing the Web, it is only natural to be offering it on the new HTC Hero first,” said John Wang, chief marketing officer, HTC Corporation. “We look forward to continuing our close collaboration with Adobe and to bringing Flash Player 10 support to our phones in the future.”

Article source

Share/Save/Bookmark

21
Jun

Center an Adobe AIR application on Screen

By default NativeWindow loads some where on the screen. Loading an splash screen or application on center of the screen will gives better user experience.

Below code we are creating a native window and aligning in the screen center.

var _splashWindow:NativeWindow = new NativeWindow(nativeWindowOptions);
 
_splashWindow.width = 484;
 
_splashWindow.height = 289;
 
_splashWindow.stage.align = "TL";
 
_splashWindow.stage.scaleMode = "noScale";
 
_splashWindow.title = "Center on screen";
var screenBounds:Rectangle = Screen.mainScreen.bounds;
 
_splashWindow.x = (screenBounds.width - _splashWindow.width)/2;
 
_splashWindow.y = (screenBounds.height - _splashWindow.height)/2;
_splashWindow.activate();

Here,

var screenBounds:Rectangle = Screen.mainScreen.bounds;

Screen.mainScreen.bounds return the screen boundary.

_splashWindow.x = (screenBounds.width - _splashWindow.width)/2;
 
_splashWindow.y = (screenBounds.height - _splashWindow.height)/2;

Centering the application on screen.

Share/Save/Bookmark

16
Jun

InnerHtml is not working in FireFox and Safari.

Few days back while working with "InnerHtml", I realized that the tag doesn't work properly for Firefox and Safari.So I tried searching for the solution, by checking the tag against each browser using JavaScript.

I replaced "InnerHtml" with "textContent" (Firefox and Safari) and “innerText” (IE5+) and it worked!

if (document.layers) {
		type="NN";
	} else {
		if (document.all) {
			if (document.getElementById) {
				//type="IE5+";
				var spanTags = document.getElementsByTagName('span');
				for (var i = 0; i<spantags .length; i++) {
					spanTags[i].innerText = '';
				}
			} else {
				//type="IE4";
			}
		} else {
			//type="FF";
				var spanTags = document.getElementsByTagName('span');
				for (var i = 0; i < spanTags.length; i++) {
					spanTags[i].textContent = '';
				}
		}
	}

Share/Save/Bookmark

28
Apr

Handling Webservice using Flex

In this tutorial we are going to handle Webservice file from Flex. Before going deep into this

tutorial, Let us see what is a Webservice first.

Webservice:

The term Web services describes a standardized way of integrating Web-based applications using the

XML, SOAP, WSDL and UDDI open standards over an Internet protocol backbone. XML is used to tag the

data, SOAP is used to transfer the data, WSDL is used for describing the services available and

UDDI is used for listing what services are available. Used primarily as a means for businesses to

communicate with each other and with clients, Web services allow organizations to communicate data

without intimate knowledge of each other's IT systems behind the firewall.

The basic Web services platform is XML + HTTP.

XML provides a language which can be used between different platforms and programming languages and

still express complex messages and functions.

The HTTP protocol is the most used Internet protocol.

Unlike Flash Flex has built in Webservice Component

<mx:WebService>

In webService we will be defining its ID and wsdl, wsdl points to the

http://www.webservicex.net/ValidateEmail.asmx?WSDL external location.

<mx:Operation>

Operation defines the webservice operation, here we will also mention result and fault event.

<mx:request>

request to send parameters to the webservice, if we are invoking an operation that does not need

parameter then no need to use tag.

once the webservice component is finished we will be invoking the webservice operation by
email.IsValidEmail.send();

Here email is webservice id, IsValidEmail is operation.

FullCode

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
 <![CDATA[
  import mx.rpc.events.FaultEvent;
  import mx.controls.Alert;
  import mx.rpc.events.ResultEvent;
  private function onValidate(event:ResultEvent) : void
  {
  mx.controls.Alert.show(String(event.result));
  }
  private function onError(event:FaultEvent) : void
  {
  mx.controls.Alert.show(String(event.fault.faultDetail));
  }
 ]]>
</mx:Script>
<mx:VBox>
 <mx:TextInput id="text1"/>
 <mx:Button id="ValidateEmail" label="ValidateEmail"
  click="email.IsValidEmail.send();"/>
</mx:VBox>
 <mx:WebService id="email" wsdl="http://www.webservicex.net/ValidateEmail.asmx?WSDL" showBusyCursor="true">
  <mx:operation name="IsValidEmail" result="onValidate(event);"
  fault="onError(event);">
  <mx:request>
  <Email>{text1.text}</Email>
  </mx:request>
  </mx:operation>
 </mx:WebService>
</mx:Application>

 

Share/Save/Bookmark

14
Apr

Slideshow using FaderFileMaterial – Updated

We have seen how to create Slideshow using Fader Class.

As requested by many users I updated the FaderFileMaterial Class, now it includes the following features.

Features:

• Ability of handling Image and SWF together.
• SWF may also be an animated file.
• No Need of Preloader- Since the animation will not happens until the next file is loaded.
• Customized events to handle the Slideshow

Added Features:

• Move to next or previous slides.
• Ability to jump to particular slide
• Randomize the slide

Updated Documents


FaderFileMaterial.html
FaderURL.html

Featured tutorial:
Creating slideshow from XML and FaderFileMaterial

Share/Save/Bookmark

31
Mar

Useful Wordpress Plugins and momentize your website

Some of the useful wordpress plugins i use. This makes my website convinient for my users. Let make your website convinient one.

1) Add to Any Share/Save/Bookmark Button:


Helps readers share, save, bookmark, and email your posts and pages using any service, such as Delicious, Digg, Facebook, Twitter, and over 100 more.

http://wordpress.org/extend/plugins/tags/addtoany

2)Akismet:

Automattic Kismet (Akismet for short) is a collaborative effort to make comment and trackback spam a non-issue and restore innocence to blogging, so you never have to worry about spam again.
http://wordpress.org/extend/plugins/akismet/

3)All in One SEO Pack:


Automatically optimizes your Wordpress blog for Search Engines (Search Engine Optimization).

http://wordpress.org/extend/plugins/all-in-one-seo-pack/

4)Global Translator:

Automatically translates a blog in 41 different languages by wrapping four different online translation engines (Google Translation Engine, Babelfish Translation Engine, FreeTranslations.com, Promt).
http://wordpress.org/extend/plugins/global-translator/

5)Yet Another Related Posts Plugin

Returns a list of the related entries based on a unique algorithm using titles, post bodies, tags, and categories.

http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/

Share/Save/Bookmark

31
Mar

I Clicked my Google Adsense

To avoid clicking our own google adsense, there is a hack..

This will save our adsense account.
C:\Windows\System32\drivers\etc

From the above path you can able to see hosts file just open that with Notepad
you might able to see the below line.

127.0.0.1       localhost

Just add the following on the another line.

127.0.0.1 pagead2.googlesyndication.com

 

Now open your website in browser... ah wow google ads are blocked and there is nochance of clicking our own ads..

If you clicked your own Google Adsense..follow the link.

https://www.google.com/adsense/support/bin/answer.py?answer=23921

Share/Save/Bookmark

25
Mar

Patterns Makers and abstract patterns

Patterns make our website background great, instead of using plain background we shall got for pattern background to make our sites look better.

But keep in mind, when you using patterns that should match our website and that should not look different from the website.

There are site where you can download patterns directly for free.

Squid

 

 

Ava

 

DinPattern

 

Everyday Icons

 

 

IF you want to create your own patterns.. no problem there are site where we can generate our own

patterns.

 

 StripMania

 

 

StripDesigner

 

 

Tartan

 

 

Pixelknete

 

Cheers

Share/Save/Bookmark