A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Update Condition for reading NetConnection & NetStream

  1. #1
    Junior Member
    Join Date
    Sep 2010
    Posts
    1

    Update Condition for reading NetConnection & NetStream

    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

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Why don't you pass a small XML file instead.
    - The right of the People to create Flash movies shall not be infringed. -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center