0
Posted on 3:33 AM by Author and filed under ,
As the Flex is going high there are more developers at the list. Adobe is giving feed for the Flex tutorials for free.
We can view the tutorials using Adobe Media Player

If you dont have Adobe Media Player
download it first, Its an Air App.

After downloading and installing player.

Click "My Favorites" menu at the top.


Click "Add RSS Feed" at the bottom.


Paste http://sessions.adobe.com/FlexInAWeek/feed.xml


Click Ok

Its time to learn.

:)
1
Posted on 7:53 AM by Author and filed under
The newline character in Flash is "/n" but its not working when we write to text file using FileStream in Adobe Air.

MyFileStream.writeUTFBytes("Some text here"+"\r\n");
MyFileStream.writeUTFBytes("I am in new line");


This works :)
0
Posted on 12:40 AM by Author and filed under ,
Accessibility:
Now Adobe flash is one of the widest technologies used on web to create RIAs (Rich Internet Applications).
Accessibility involves two key issues: first, how users with disabilities access electronic information, and second, how web content designers and developers enable web pages to function with assistive devices used by individuals with disabilities.
More about Accessibility

Accessibility policies vary from country to country, but most countries, including the European Union, have adopted standards based on the Web Content Accessibility Guidelines (WCAG) of the World Wide Web Consortium (W3C).
Accessibility standards help designers and developers of web content identify and address accessibility issues.


Some of the accessible related issues by users:
• Hearing disabilities
o Provide synchronized captions for any audio that conveys content
• Photo epilepsy
o Remove strobing content that flashes between 2 and 55 times per second
• Motor disabilities
o Ensure the Flash content is keyboard accessible
o Do not require fine motor skills
• Cognitive disabilities
o Give users control over time sensitive content
o Provide easy to use controls and navigation schemes
o Be consistent
o Use the clearest, simplest language appropriate to the content
• Low vision
o Provide plenty of contrast
o Allow the Flash content to scale to a larger size
• Blindness
o Ensure screen reader accessibility or provide an accessible alternative
o Ensure keyboard accessibility
o Do not interfere with screen reader audio or keyboard commands
o Provide textual equivalents for all non-text elements that convey content or provide a function.


Accessibility class
In Flash Accessibility class manages communication with screen readers.
To determine whether the player is running in an environment that supports accessibility aids, use the System.capabilities.hasAccessibility() method .





if (Accessibility.isActive()) {
trace ("An accessibility aid is currently active");
} else {
trace ("There is currently no active accessibility aid");
}

The above code checks whether accessibility aids are active or not.
Note:
isActive is static method of class Accessibility.

The main thing in making flash content is to set tab index for the MovieClips, then to set _ accProps
If we want some movieclips not to be listed in the automatic tab order then we can set
My_mc. _mc.tabEnabled = false;
And if we want to specify the tab order at runtime we can use
My _mc.tabIndex = 1;
If we want to change tab order at runtime for movieclips once we assigned is to simply reassign new index.
My _mc.tabIndex = 2;
Or we want to remove the movieclip that we once assigned the tab index is to set tab index as undefined
My _mc.tabIndex = undefined;


_accProps:
Lets you control screen reader accessibilityoptions for SWF files, movie clips, buttons, dynamic text fields, and input textfields at runtime.

To set _accProbs for a MovieClip
if (my_mc._accProps == undefined ) {
my_mc._accProps = new Object();
}

my_mc._accProps.name = "I am accessible now!";
Accessibility.updateProperties();


If we add or update an accessible property then we should call the static method updateProperties();

Accessibility.updateProperties() causes all changes to _accProps (accessibility properties) objects to take effect.

And in runtime if we add or change _accProbs then we need to call Accessibility.updateProperties();

But the call should be minimum, that is we should not call Accessibility.updateProperties() for each and every change.


Some properties of _accProps:
instanceName._accProps.silent = true; to hide instance from screen reader.
instanceName._accProps.forceSimple = true; to hide instance children from screen reader.
instanceName._accProps.name = "mc_name";
instanceName._accProps.description = "mc_description";

Name should be descriptive that id instance is next button, then name should be as "Next set of images"

Description should mention the functionality of the button. These should provide information for the disabled users.


Note:

  1. If we are using hit buttons then we should place movieclip of alpha zero at the over state. to read that instance by screen reader.
  1. To hide dynamic content from screen reader set _visible to false or _accProps.silent = true;
  2. Set tabIndex = undefined; to remove tabIndex once assigned.

Download Source Files

0
Posted on 11:15 PM by Author and filed under ,
The function calculates values from Bytes to KB or MB.
Here we are first checking the value of bytes and if its less that zero or not a number returns null.

Otherwise we are calculating,
1024 Bytes = 1 KB.
1024 KB = 1 MB

/**
* Calculates the File size
*
* @param bytes Loaded bytes or file size in bytes
* @return converted bytes to String.
*/

function fileSize( bytes : Number ) : String
{
if(bytes<0 number =" Number(bytes/1024);" string =" Math.round(fileSize)">0?(fileSize>1024?(fileSize/1024).toFixed(2)+"MB":((fileSize.toFixed(2))+"KB")):(fileSize*1024)+"Bytes" ;

return FileSize_str;
}


Download Source file
0
Posted on 4:54 AM by Author and filed under
Adobe is about to release Flash CS4 in the mid of November 2008 except Japanese version, That going to be release on December 2008.

We can see these note on Abobe Site.



This is really interesting to see the new releases from Adobe.

we can also see the download trial links from Adobe downloads page, but its pointing to the reminder.



Expecting the release as all Adobe Users :)
0
Posted on 5:49 AM by Author and filed under
Some top features of Flash Player 10 @ Adobe Website with source files.
Cover Flow with Source..
3D effects New
Create more intuitive, engaging interfaces using built-in support for 3D effects. Get started quickly without being a 3D master by designing in 2D and easily transforming and animating in 3D. Fast, extremely lightweight, and simple-to-use APIs, along with 3D tools in Adobe® Flash® CS4 Professional software, make motion that was previously accessible only to expert users via ActionScript® language or custom third-party libraries available to everyone.

Custom filters and effects New
Create high-performance, real-time effects for cinematic experiences that quickly engage users. With new Adobe Pixel Bender™, the same technology behind many filters and effects in Adobe After Effects® software, these dynamic and interactive effects can be used both in production with After Effects CS4 and live with Flash Player 10. The Pixel Bender just-in- time (JIT) compiler can also be used to process other types of data, such as sound or mathematical functions, asynchronously in a separate thread.

Advanced text support New
Take advantage of a new, flexible text layout engine that brings print-quality publishing to the web, building on more than 25 years of Adobe expertise in typography. Gain more control over text layout using an extensible library of ActionScript 3.0 text components to flow text and sophisticated typographic elements such as ligatures across multiple columns, around inline images, bidirectionally, vertically, or chained together. Create multilingual rich Internet applications (RIAs) using device fonts that can now be anti-aliased, rotated, and styled, or build your own unique text components.


Dynamic sound generation New
Use enhanced sound APIs to dynamically generate audio and create new types of audio applications such as music mixers and sequencers, real-time audio for games, and even audio visualizers. Work with loaded MP3 audio at a lower level by extracting audio data and supplying it to the sound buffer. Process, filter, and mix audio in real time through the Pixel Bender JIT compiler to extend creative freedom beyond the visual experience.


Drawing API Enhanced
Perform runtime drawing more easily with restyleable properties, 3D APIs, and a new way of drawing sophisticated shapes without having to code them line by line. Developers can tweak parts of curves, change styling, replace parts, and use custom filters and effects, delivering improved throughput, creative control, and greater productivity. Enhancements to the Drawing API add the z dimension, real perspective, textured meshes in 3D space, a retained graphics model, read/write rendering, and triangle drawing with UV coordinates, while adding memory and improving performance.



Hardware acceleration Enhanced
Use the hardware processing power of the graphics card to paint SWF files into the browser and accelerate compositing calculations of bitmaps, filters, blend modes, and video overlays faster than would be performed in software.


Vector data type New
Use the new typed array class for better performance, efficiency, and error checking of data.


Dynamic Streaming New
Show exceptional video with streams that automatically adjust to changing network conditions. Leverage new quality-of-service metrics to provide a better streaming experience.


Speex audio codec New
Take advantage of the new, high-fidelity and open source Speex voice codec, which offers a low-latency alternative for voice encoding. Flash Player also supports ADPCM, HE-AAC, MP3, and Nellymoser audio.



File upload and download APIs Enhanced
Bring users into the experience by letting them load and save files from your web application. New file reference runtime access allows local processing of data without roundtripping to the server.


Follow the Link
0
Posted on 5:00 AM by Author and filed under ,
Today i came across the jptarry Blog and i found one intersting string replace function.



Split function splits at the given string and join method inserts and concats..



var str:String = strReplace("this is a test page to replace this from the sentence","this", "THIS");
trace(str)
function strReplace($str:String, $search:String, $replace:String):String {
return $str.split($search).join($replace);
}


//outputs as "THIS is a test page to replace THIS from the sentence"
0
Posted on 2:25 AM by Author and filed under


Trace command will not work in Flash CS3 + AIR development unless in debug mode..
I find dificult to work without trace command, I found the arthropod while searching for 2 mins in the WEB.
Its an AIR application.
Its simple to import the classes and to trace.
// Air debugger--- Arthropod
import com.carlcalderon.arthropod.Debug;
and to trace call
Debug.log(String( event.target ));
here is the link to the website

Link to documentation
download the AIR App
6
Posted on 11:05 PM by Author and filed under
Google Suggest?
As you type into the search box, Google Suggest guesses what you're typing and offers suggestions in real time. This is similar to Google's "Did you mean?" feature that offers alternative spellings for your query after you search, except that it works in real time.

I had seen same feature done using Dot net, Ajax, and PHP etc.
You can also see the feature live here
ObjectGraph Dictionary that’s suggests us as we type.

I utilized the event driven nature of Action Script 3.0 and I came with this SearchManager class or we can also say as flash version of Google suggest We have seen the Google suggest that will suggests the names according to the input values, I searched the web for suggest tool in flash, so I came up with this Manager class.



Type capital 'S' here..



Here the code in Flash
import com.flashflex.*;
//Array of data to be searchable
var toSearchArray:Array = new Array();
toSearchArray.push( "Belinda" );
toSearchArray.push( "Gina" );
toSearchArray.push( "Benny" );
toSearchArray.push( "Charlotte" );
toSearchArray.push( "Jane" );
toSearchArray.push( "Raja" );
toSearchArray.push( "Saravanan" );
toSearchArray.push( "Ramesh" );
toSearchArray.push( "Selva" );
toSearchArray.push( "Muza" );
toSearchArray.push( "Kalis" );
toSearchArray.push( "Prasath" );
toSearchArray.push( "Sharmila" );
toSearchArray.push( "Santha" );
toSearchArray.push( "Vijay" );
toSearchArray.push( "Bipin" );
toSearchArray.push( "Vinod" );
toSearchArray.push( "Vipin" );
toSearchArray.push( "Robert" );
toSearchArray.push( "Mahesh" );
toSearchArray.push( "Vel" );
toSearchArray.push( "Chitra" );
toSearchArray.push( "Ganesan" );
toSearchArray.push( "Mathan" );
toSearchArray.push( "Asan" );
toSearchArray.push( "sara" );

//Create objects of searchable items
var len:Number = toSearchArray.length;
for (var i:int = 0; i<len; i++) {
var _searchItem:SearchItem = new SearchItem(toSearchArray[i]);
addChild(_searchItem);
}

txtItem.restrict = "a-zA-Z";
txtInput.restrict = "a-zA-Z";
addSearchItem.addEventListener( MouseEvent.CLICK, handleAddSearchItem );
txtInput.addEventListener( Event.CHANGE, handleTextInputChange );

function handleAddSearchItem( event : MouseEvent ) {
var searchItemData : String = txtItem.text;
if ( searchItemData.length > 0 ) {
toSearchArray.push( txtItem.text );
var _searchItem:SearchItem = new SearchItem(txtItem.text);
addChild(_searchItem);
}
}
//Dispaching event to check the searchable data
function handleTextInputChange( event : Event ) {
SearchResult.clearData();
dispatchEvent(new ObjectEvent(ObjectEvent.OBJECT_EVENT, true, txtInput.text));
_resultList.dataProvider = (SearchResult.getResult());
}


Explanation for code:
Create an Array that holds the data to be searchable; here we have the data in toSearchArray.
Create objects to SearchItem and add to the display list since we extends MovieClip and also to get the Event bubbling to work.


for (var i:int = 0; i<len; i++) {
var _searchItem:SearchItem = new SearchItem(toSearchArray[i]);
addChild(_searchItem);
}

At the TextChange Event handler we are dispatching Object Event and adding the searchItem to list and displaying the whole list atlast.


function handleTextInputChange( event : Event ) {
SearchResult.clearData();
dispatchEvent(new ObjectEvent(ObjectEvent.OBJECT_EVENT, true, txtInput.text));
_resultList.dataProvider = (SearchResult.getResult());
}


Feel free to modify, extend and distribute the code..


Download Source Files


Cheers
Saravanan

:)