A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: onMetaData - check for NO cuepoints

  1. #1
    Senior Member
    Join Date
    Aug 2001
    Posts
    128

    onMetaData - check for NO cuepoints

    Hi there, using NetStream in AS3.

    With the metadata Object - how can I check to see if there are NO cue points in the video?

    Using something like info.cuePoints.length in the condition of an if statement doesn't work...

    Any ideas?

    Thanks!
    [swf width="300" height="40" background="#000000"]http://www.zizunetwork.com/zizunetworkcouk.swf[/swf]

  2. #2
    Senior Member
    Join Date
    Sep 2010
    Posts
    324
    Using:
    Code:
    ns.onMetaData = function(myMeta) { 
    	for (var i in myMeta) { 
    		trace(i + ":\t" + myMeta[i]) 
    	}
    }
    will trace all the metadata, including cue points. So if there are none, it will not show any.
    Test on video with cuepoints first and then video without to verify that it will work for you.
    Video Man

  3. #3
    Senior Member
    Join Date
    Aug 2001
    Posts
    128
    Hi there - thanks for the reply - I understand how that works and how to identify if cue points exist in a trace, however I'm interested to set a variable, say:

    hasCuePoints (Boolean)

    depending on whether or not the metadata identifies any cue points.

    How do I do this?

    Thanks
    [swf width="300" height="40" background="#000000"]http://www.zizunetwork.com/zizunetworkcouk.swf[/swf]

  4. #4
    Senior Member
    Join Date
    Aug 2001
    Posts
    128
    I ended up using this to solve my problem

    PHP Code:
    function onMetaData(info:Object):void {
                
                if (
    info.cuePoints == undefined){
                
                    
    _haveCuePoints false;
                
                } else {
                    
    _haveCuePoints true;
        }
        

    [swf width="300" height="40" background="#000000"]http://www.zizunetwork.com/zizunetworkcouk.swf[/swf]

  5. #5
    Senior Member
    Join Date
    Sep 2010
    Posts
    324
    Thanks for the update!
    VM

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