Wednesday, August 27, 2008

issue of environment

Protect our earth.
The girl who silenced the world for 5 minutes
Must Watch. Nice Video.

Wednesday, August 20, 2008

Adobe Media Player V2 comming soon

Good News !!! Adobe Media Player V2 is going to Launch soon. See you all Enjoying the music with Adobe.

Ted Recomended fantasticcontraption

Ted Petrick has recommended http://fantasticcontraption.com/ for MAX Registration. I personally appreciate Ted comment. Visit this, it's full of physics fun. amazing site.

Friday, August 15, 2008

Joined Facebook

Hey!!! Today I have joined facebook. Amazing site. Visit my facebook profile.

registered domain subratkumar.com

Hi, Nice to inform you that i have registered my new domain http://www.subratkumar.com. Soon you will see it upgraded with full of information.
Cheers :)

Thursday, August 14, 2008

Free MAX 2008 registration

Hi,
All Flex Lovers, there is a good chance to be a part of Flex 3 Contributer. Solve any 3 bugs from Flex bug List and chance to win free Flex books and Free MAX 2008 registration.
For every 3 bugs where we accept and commit your submitted patch, we will purchase an Adobe-related book from your Amazon wish list (once you've had your 3rd patch accepted we'll reach out to you to find your wish list).
There are milestone releases of the Flex 3 SDK planned for the Summer and Fall of 2008. Wouldn't it be cool if you were able to say that you had a part in them?

Proud to be an INDIAN

Celebrating Independence Day










जन गण मन अधिनायक जय हे
भारत भाग्य विधाता
पंजाब सिन्ध गुजरात मराठा
द्राविड़ उत्कल बंग
विन्ध्य हिमाचल यमुना गंगा
उच्छल जलधि तरंग
तव शुभ नामे जागे
तव शुभ आशिष मागे
गाहे तव जय गाथा
जन गण मंगल दायक जय हे
भारत भाग्य विधाता
जय हे जय हे जय हे
जय जय जय जय हे

Wednesday, August 13, 2008

Free flex book

How's your Adobe® Flex® Builder™ trial going?
Need Getting Started With Flex 3 Free. Click here.
Cheers ::::Enjoy

Monday, August 11, 2008

Right Click in AS3

One of my friend (Siddharth) has shared a valuable information with me that how to disable right click in flash (he searched the information on the internet). It's really easy and incorporate following steps:

  • Use Javascript in the HTML container page to disable the right-click on top of the SWF.
  • Capture the event and pass it to a function that communicates with Flash via the External Interface
  • In Actionscript the function called from Javascript does whatever you need to display your own custom context-menu.

You can download the file : RightClick_0[1].6.2.zip
Nice to Visit : http://www.uza.lt/blog/2007/08/solved-right-click-in-as3.

Friday, July 18, 2008

Advance Feature of Array in CS3

All of us are using Array frequently. Flash CS3 (Using AS3) has updated and incorporated so many method that has never been seen in the prior version of flash. Now the Array class has become so powerful that we can do such a big manipulation with the Array at a glance. I have tried to put some of the new feature in CS3 Array class below.

Try out below (just copy and paste)
//------------------------------------------------------------------------------------------------------------------------
1. Array.every():

/*
Executes a test function on each item in the array until an item is reached
that returns false for the specified function. You use this method to determine
whether all items in an array meet a criterion, such as having values less than
a particular number.
*/
/*
subrat comment..
When to use:-You want to determine if every element in an array meets certain criteria.
What to use:-methods accept two parameters:-
The name of a method to call which will specify your test criteria and an (optional) object which defines the scope in which the method resides.
Each method will return a Boolean true or false depending on whether or not the specified criteria is met.
The method which contains the test criteria will accept three arguments, an element of the array, the index of that particular element, and a reference to the array itself
This test method should have a Boolean for a return type.
*/
//...............Ex1
function isNumeric(element:*, index:int, arr:Array):Boolean {
return (element is Number);
}
var arr1:Array = new Array(1, 2, 4);
var res1:Boolean = arr1.every(isNumeric);
trace("isNumeric:", res1);// true

var arr2:Array = new Array(1, 2, "ham");
var res2:Boolean = arr2.every(isNumeric);
trace("isNumeric:", res2);// false
//..................Ex2
var _testArray:Array = new Array(5, 6, 2, 5, 5);
function isBelowSeven(element:int, index:int, array:Array):Boolean {
return (element <>

}
trace ('tracing 2nd ex'+_testArray.every(isBelowSeven));
//---------------------------------------------------------------------------------------

2. Array.filter()
/*
comment by subrat:
purpose : To understand Array.filter()
When:
You want to create a new array from elements in a given array
that match certain criteria.
What:
This method accepts two parameters, the name of a method to call
which will specify your test criteria and an (optional) object
which defines the scope in which the method resides. This method will
return a new array that contains each element that tests as true
according to a test method. The method which contains the test criteria
will accept three arguments, an element of the array, the index of that
particular element, and a reference to the array itself. This method
should have a Boolean for a return type (very similar to as above).
How:
Create an array of numbers that are less than 7 from an array
of various numbers with Array.filter():
*/
var _testArray:Array = new Array(5, 6, 7, 8, 9);
function isBelowSeven(element:int, index:int, array:Array):Boolean {
return (element < array =" _testArray.filter(isBelowSeven);
// traces 5,6
trace (newArray);
/*
//--------------------------------------------------------------------------

3. Array.forEach()
FOREACH:
when:
You want to call a particular method for each element in an array.

what:
Perhaps the most powerful of the new method additions,
this, like the last two methods, calls a method for each
item in an array. Unlike the last two, however, there is no
return type required - this simply calls a method for each
item in an array.

how:
create a circle for each item in an arry.

*/
import flash.display.Sprite;
import flash.display.MovieClip;
import flash.events.MouseEvent;
function addCircle(element:String, index:int, array:Array):void {
var circle_mc:MovieClip = new MovieClip();
circle_mc.graphics.beginFill(0x660000);
circle_mc.graphics.drawCircle((index * 60) + 50, 60, 25);
circle_mc.graphics.endFill();
circle_mc.dynProperty = element;
circle_mc.buttonMode = true;
circle_mc.addEventListener(MouseEvent.CLICK, onClick);
addChild(circle_mc);
}
function onClick(evt:MouseEvent):void {
trace (evt.target.dynProperty);
}

var _testArray:Array = new Array("subrat", "aptara", "0673",5);

_testArray.forEach(addCircle);

//-----------------------------------------------------------------------------------------------------------------
4. Array.map()
/*
when:
You want to create a new array from elements in a given array after
performing a function on those items in the original array.

what:
This method is very similar to the Array.filter() method, however,
rather than performing a true/false test on the items in the array,
this method will alter the items of the array according to a
particular method.

how:
Create an array of upper case strings from an array of
lower case strings:

*/
//Ex1
function arrayToUpperCase(element:String, index:int, array:Array):String {
return (element.toUpperCase());
}
var _testArray:Array = new Array("one", "two", "three", "four");
var newArray:Array = _testArray.map(arrayToUpperCase);

// traces ONE,TWO,THREE,FOUR
trace (newArray);

//Ex2 :Create an array of numbers by adding 7 to each element in an original array of numbers:
function addSeven(element:Number, index:int, array:Array):Number {
return (element + 7);
}
var _testArray1:Array = new Array(1, 2, 3, 4);
var newArray1:Array = _testArray1.map(addSeven);

// traces 8,9,10,11trace (newArray1);

Thursday, July 17, 2008

Robert Penner

Robert Penner is a famous flash Guru, brilliant Flash developer, a consultant, best writer of many books, and a technical speaker.
Robert Penner is known across the world for his technical innovations and organic style. His working areas are:

  • Robert Penner Easing Equations: Robert is probably the first person who wrote equation of easing in a simple manner and which is now used all across the world. He also described application of mathematics and physics in flash. The best part is that his applied knowledge has been incorporated into flash CS3.
  • Tweening Tutorials: The also wrote many tutorial for Tweening and motions.
  • Presentations
  • Robert Penner back button application: This is a victory of flash usability. Just think about you have 5 different MovieClip/Graphics on 5 different linear/non linear frames. One next/back button for traversing each frames. And there is a requirement that your browser navigation panel should also work like the same. Just try out Robert Penner back button application. He is the first person who achieved this.
  • Effects: He has done so many effects applying Mathematics and Physics. Some of the examples are : MusicRain Player, Wine Cellar Builder, Axis Interactive v2.0, fractal dancer , streakers , photon hoop , disco flakes , sphere burst , cyclone, and much more.

My suggestion:
If you are a beginner and willing to know how to apply physics and Mathematics in flash you must Read Robert Penner.

Wednesday, July 16, 2008

Transition Effects in AS3.

Flash CS3 (AS3) has incorporated so many transition effects. You can try out the following effect:
  • Zoom
  • Blinds
  • Fly
  • Fade
  • PixelDissolve
  • Squeeze
  • Wipe
  • Rotate
  • Iris
  • Photo
You need to follow following steps.
  • Make a display object (MovieClip/Sprite) on which you want to apply transition effect. Consider myObj is the instance name of that display object.
  • Make an object of TransitionManager class and pass the object as parameter. E.g. var myTransitionManager:TransitionManager = new TransitionManager(myObj);
  • Now apply the desigered transition eg. myTransitionManager.startTransition({type:Blinds, direction:Transition.IN, duration:2, easing:Bounce.easeOut, numStrips:10, dimension:0});

Tuesday, July 15, 2008

Win CVS help and FAQ's.

I searched on the net and collected some FAQ for CVS. Hope it will help others.
Why are there no help files?
I am working on it and trying to make a help file for CVS in the Spare time. following links may helps you where you realy found some help.
http://www.wincvs.org/winhtml/wincvs11.htm

Why can’t I configure Igloo like WinCVS?
Although Igloo uses the same dlls as WinCVS it behaves more like the command line version of CVS. I am concentrating on completing the functionality of Igloo rather than creating the configuration dialogs. Everything can be controlled via the CVS environment variables for now. Please read the CVS manuals for details. O’Reilly produce a great pocket reference for CVS I recommend everyone buy it.

How can I set any extra options to the CVS commands?
You can’t set any extra options to the CVS command just yet. I am working on this for the future. If you want to check out a repository with another revision use regular CVS or WinCVS. Alternatively you can work around this problem if you put the options *temporarily* in the .cvsrc file of your %HOME%-directory.
For example: to checkout/update another tag write a file %HOME%\.cvsrc like this:
checkout -r update -r

What does auto commit do?
Auto commit mode makes CVS work like a traditional source control system. When you add or delete files it automatically commits the changes to the repository. When you do a check out (not a CVS checkout but an IDE checkout) it updates the file first before doing a CVS edit on the file. This mode is one that many of you will feel most comfortable with. However, the repository can easily get in a state where you cannot build your tree because only half of it is checked in or you could pick up a change that you are not ready for.

What does regular CVS mode do?
This make Igloo work the way CVS was designed to do. It is useful if you are working for a long time on your own isolated changes. If you add or delete files they are removed from the workspace but not from the repository until you do a commit. When you do a check out (not a CVS checkout but an IDE checkout) it does not get the latest version of the file therefore you won’t get clobbered by a new file you are not ready for yet. The theory is that you do a fully commit when your changes are stable. Igloo does not provide an easy way to do a full commit of your project yet so use the CVS command line or WinCVS

What does work off-line do?
One of the greatest things about CVS is that you can run of with your laptop and continue working on all your code without being connected to the repository. Off-line mode avoids doing a ‘cvs edit’ when you do an IDE checkout. Instead it just make the file writeable. Doing an IDE checkin in off-line mode still attempts to do a ‘cvs commit’

I’ve got binary files. What do I do about them?
You need to explicitly tell CVS which files are binary. You do this by editing the cvswrappers file in the CVSROOT directory of your repository. Please ready the CVS documentation for how to do this. For Visual Studio you may want to set the .DSP and .DSW files to binary because they are text files that are not supposed to be edited by hand. If you are comfortable with these files being merged automatically and by hand when conflicts occur then it will usually be ok as a text file.

I use a different port for my pserver. How do I set the port?
Set the CVS_PSERVER_PORT variable. This is not a standard CVS environment variable.

The above information has been collected through internet.
Your comment needed.

Why Flash 8 Professional Runs slow on Windows Vista?

When you double click the movie clip or opens it runs slow. Why?
Ans: Well Yeh!! It’s true that Flash 8 runs slow on Windows Vista. I did a research on it and finally found that the Desktop Window Manager (dwm.exe) takes lots of memory and forces Flash 8 to run slow. You can see it going the task manager. If you end the process of dwm.exe your flash will starts running faster dramatically.
I have one other solution also
Take the following steps:

  • Go to Flash.exe properties.
  • Go to compatibility tab
  • Set it for Windows XP service pack 2.
  • Now open the flash.
This will decrease the memory input of Dwm.exe.