Hi all
I am having difficulty in adjusting a statement to fit my circumstances.
I have a variable being set using flashvars that looks like:
Code:
video_link: "rtmp://s3hejskwlkdjsjs.cloudfront.net/cfx/st/sites/default/files/videos/myvideo.flv"
and a flash function that looks like:
Actionscript Code:
if(Public.ReturnVideoType() == "rtmp")
{
_netcon.connect(_link.substring(0,_link.lastIndexOf("/")))
var $link:String=_link.substring(_link.lastIndexOf("/") + 1, _link.length);
if ($link.toLowerCase().indexOf(".flv") == $link.length - 4)
$link = $link.substring(0, $link.length - 4);
else if ($link.toLowerCase().indexOf("mp4:") != 0 && ($link.toLowerCase().indexOf(".mp4") == $link.length - 4 || $link.toLowerCase().indexOf(".mov") == $link.length - 4 || $link.toLowerCase().indexOf(".m4v") == $link.length - 4))
$link = "mp4:" + $link;
_link = $link;
}
At the moment the AS is assuming that the NetConnection is rtmp://s3hejskwlkdjsjs.cloudfront.net/cfx/st/sites/default/files/videos/ and the NetStream is myvideo.flv.
I need to adjust it so that it always sees the NetConnection as rtmp://s3hejskwlkdjsjs.cloudfront.net/cfx/st/ with the NetStream being sites/default/files/videos/myvideo.flv
Thanks