What you are doing here is not allowed. The notation for creating and accessing objects using a string reference (this['someObject']) does not permit you to cast a type. Furthermore, objects created in this fashion cannot then be directly accessed using that name without using the identifier notation:
this['foo']:Object = {}; // fails, 1078: Label must be a simple identifier.
this['foo'] = {}; // works
and
this['foo'] = {};
trace(this.foo); // fails, 1120: Access of undefined property foo.
trace(this['foo']); // works, [object Object]
So, to make your function work it should be written:
function newVideo(myVideoName:String):void
{
this[myVideoName] = new FLVPlayback();
}
but you will only then be able to access the player by using that same string reference, like this:
this[myVideoName].play();
Furthermore, none of the above is giving the instance of the FLVPlayback component a name. What it is doing is defining the name of a reference to your FLVPlayback. If you are intending to create an FLVPlayback that has an instance name of myVideoName then you should create a function that looks like this:
function newVideo(myVideoName:String):FLVPlayback
{
var flvP:FLVPlayback = new FLVPlayback();
flvP.name = myVideoName;
return flvP;
}
What this does is creates a new instance of the FLVPlayback component, assigns it an instance name, and returns a reference to it. You would use it like this:
var myPlayer:FLVPlayback = newVideo('player1');
addChild(myPlayer);