Thursday 3 December 2009

Pros n cons of different flash Delivery methods

If you want to work on flash streaming are confused to select a delivery method go through the below link.

http://www.digital-web.com/articles/efficient_video_delivery_over_the_internet/

Different Ways of delivering Video over Internet:-

HTTP Progressive Download:-
The basic way to deliver flash video over internet efficient for short video files doesnt need any additional software or hardware support. you cannot skip a particular portion of video and skip to a new position you have to wait for the complete download. Not an efficient method to lengthy videos.

RTMP Streaming:
This is the most efficient way to provide streaming as well as live broadcast streaming and also help to deliver access controllable videos. one main advantage over progressive download is you can jump to different time frames without waiting for the previous portion to be downloaded. Server should be configured to provide streaming.

HTTP Streaming
This is a combination of the above two methodology but without any access control and is suitable for lengthy videos. Video content may be downloaded without actually being viewed, resulting in inefficient bandwidth usage. In addition, HTTP streaming is not supported by storage services only capable of serving static content

Partitioning Multiple Segments:-
The advantages of this approach are:

No special software required other than a standard web server to serve the video
It lets users jump close to any point in the video
Delivering close to only the number of bytes required for viewing the video
This approach requires video to be partitioned into multiple segments for a particular time interval.

Making Flash Video Player Skin visible and invisible

Hi Everybody
I faced a problem when I got a project to show and hide skin of a flash video player on roll over and roll out. I was not able to use th roll over and roll out events because the video player size is exactly same as the stage size. The help I found online dint helped me much. So I used the MouseEvent.MOUSE_MOVE event to show the skin and Event.MOUSE_LEAVE to hide the skin. After several trial and errors and several research I found a feasible solution for this yet it throws some Warning(not an error) rarely but it works properly.

Cheers
Harish..

Code :
stage.addEventListener(Event.MOUSE_LEAVE,skinHide);
stage.addEventListener(MouseEvent.MOUSE_MOVE,skinShow);

function skinShow(evt:MouseEvent):void {
this.flvVidPlayer.skin = skinURL ;
}
function skinHide(evt:Event):void {

try {
this. flvVidPlayer.skin =null;
this. flvVidPlayer.skinAutoHide = false
} catch (e:Error) {
trace("my error"+e);
}
}

Other Search terms:
Actionscript 3 skin flvplayer visible invisible
flash video player show hide bug error
Error #2044: Unhandled skinError:
fl.video::UIManager/http://www.adobe.com/2007/flash/flvplayback/

Wednesday 6 May 2009

Flash CS3 CS4 Auto format Bug

Most of you guys would have come across a serious bug in Adobe Flash CS3 and CS4 during the autoformat. The bug is it removes all the parenthesis or round brackets when u press Ctrl + shift + F. Its a serious bug for a software like Flash in which mathematical and logical calculations plays an important role most of the forums let with no answer how ever in one forum which directed me to a weird idea but it worked make sure you have more than one fla file when u format the Class file. Strange but it works. I am really amazed how adobe dint noticed or not given much importance for this in their CS4 when the bug already exist in CS3. The most sarcastic was senocular's advice to manual formatting that was the biggest joke he would have made because 90% of developers are used to press ctrl+shift+f for auto align as well as for a compile check and then they save. Poor guy..


Search tags:-

flash cs3 cs4 parenthesis Missing
actionscript 3 parenthesis invisible after auto format
round bracket missing autoformat
auto format bug cs3 flash
auto format bug AS3 flash
auto format bug cs4 flash

Friday 13 March 2009

Cross Domain Image load in AS3

About Cross Domain and the Policy File:
Flash player by default prevents loading data from cross-domain servers(i.e. the swf can load the data only from the server in which it is hosted by default). However this can be over come by placing a cross domain(crossdomain.xml) policy file in the root of the different server from which the data(content) is present. The xml file will allow other domains to load the content from it. The crossdomain.xml should be in the root directory.


In flash player 9 just placing the crossdomain.xml in the servers root folder will not be enough to load the image. You must instantiate a LoaderContext object and use it along with the loader.load(urlReqst,loaderContext) function to load the image from a different domain successfully.

function loadImage(imURL:String) {
var crsDomainLoader:LoaderContext;
crsDomainLoader= new LoaderContext();
crsDomainLoader.checkPolicyFile=true;
var imgLoader:Loader=new Loader();
imgLoader.contentLoaderInfo.addEventListener(Event.INIT,imgLoaded,false, 0,true);
imgLoader.load(new URLRequest(imURL),crsDomainLoader);
}

This is the best solution I have found and it will work finely provided the crossdoamin.xml is placed on the proper location.

Search Tags:
Cross domain image not loading
Image not loading in AS3
Image not loaded from different server
crossdomain AS3 Bug solution

Wednesday 25 February 2009

Slumdog Millionaire Oscars


Finally a film Slumdog Millionaire based on India got 8 Oscars and brought 3 Oscars to India in the 81st Academy Award. The film was based on a novel QnA written by Vikas Swarup.
A.R. Rahman the maestro of Indian film industry got two awards for Best Original song for "Jai Ho" and best background score.



Resul Pookutty won the best sound mixing oscar award along with Ian Tapp and Richard Pryke. Resul Pookutty is from Vilakkupara, Kollam in Kerala. He is the first Indian and only Asian to win the Academy Award for Best Sound Mixing.


Hats of to you guys and Dany Boyle to make India proud




The awards won by Slum dog Millionaire are:-
1. Best Picture
2. Director
3. Music (Song)
4. Music (Score)
5. Film Editing
6. Sound Mixing
7. Cinematography
8. Writing (Adapted Screenplay)

Thursday 19 February 2009

AS3 Double Click

The double click event introduced in AS3 (MouseEvent.DOUBLE_CLICK) will be working only if the button property "doubleClickEnabled" is set to true explicitly. If this property is not set the double click event will not be triggered.

customButton.doubleClickEnabled = true;
customButton.addEventListener(MouseEvent.DOUBLE_CLICK,onThumbClick,false ,0,true);

function onThumbClick(event:MouseEvent) {
trace(event.currentTarget);
}

Tuesday 20 January 2009

AS 3 Startdrag with co-ordinates

The drag and drop functionality is a inevitable functionality which a flash programmer can't avoid. The startDrag() function however has undergone a simple modification in the latest version which gives a bit trouble to lots of programmers who have used the earlier version.

The AS3 startDrag was different from the previous version(in the parameter specification). The AS3 start drag require two parameters the first parameter is a Boolean value for lock center(same as previous versions), the second parameter is a rectangle object which specify the bound/co-ordinates. The Rectangle bound area has to be created with four parameters(1st two or x,y and later two or width and height) which specify the bounding area which is some how similar to the AS2.


You can use the following generic code in two different scenarios either your drag object is smaller than the stage size or even if it is larger than the stage size.


//manually defining the stagewidth and height
//you can use stage.stageWidth and stage.stageHeight

var stagWit=550;
var stagHit=400;

//fn to drag the mc
//the movieclip used have the registration point @ left top..
//this method is ideal when the drag object is smaller than stage as well as when the drag object is larger than stage//dragable area..
function startMoveDrag(event:MouseEvent):void {
var left:Number=stagWit-drag.width;
var top:Number=stagHit-drag.height;

var right:Number=0;
var bottom:Number=0;

var myWidth:Number=right-left;
var myHeight:Number=bottom-top;

//create the rectangle using the above co-ordinates
var boundRect:Rectangle=new Rectangle(left,top,myWidth,myHeight);

//create the drag funcction
drag.startDrag(false,boundRect);
}
function stopMoveDrag(event:MouseEvent):void {
drag.stopDrag();
}

stage.addEventListener(MouseEvent.MOUSE_DOWN,startMoveDrag);
stage.addEventListener(MouseEvent.MOUSE_UP,stopMoveDrag);


Search terms:
startDrag second parameter
startDrag AS3 not working
How to define startDrag AS 3 actionscript 3.0
startDrag parameter
startDrag rectangle problem

Thursday 8 January 2009

Digitally signed certificates for AIR application created by individual user

Digitally signing your applications will give the assurance to the user that the application doesn't do any harmful or malicious act with the users data. Previously the air applications have only corporate certification; now individuals(developers) can also create signatures for AIR application. You can obtain the certificate from CHOOSEN certificate authority (CA) or any other CA. You can find more details about the certificate in this pdf.

To know more about the necessity of Signed application click here. With this developers can easily create useful application and make it easily available to the users easily.