Jump to content
Search Community

junky

Members
  • Posts

    41
  • Joined

  • Last visited

Posts posted by junky

  1. Thanks Jack. I appreciate the followup.

     

    So here's a strange thing that happened. The code below works:

    var video:VideoLoader = new VideoLoader(flashVars.v, {name:"myVideo", container:this, width:stage.stageWidth, height:stage.stageHeight, scaleMode:"proportionalOutside", bgColor:0x000000, autoPlay:true, volume:1, requireWithRoot:this.root, estimatedBytes:75000});
    
    //start loading
    video.load();
    video.addEventListener(LoaderEvent.INIT, VIDEO_INIT);
    function VIDEO_INIT(event:Event):void {
    
    		trace(event.target.metaData)
    
    		for (var n:int=0; n				var cp = event.target.metaData.cuePoints[n];
    			trace('  '+cp.time+' "'+cp.name+'" ('+cp.type+')');
    
    		}//end for
    
    }

     

    Which works, but the strange thing is when I opened it on another machine that uses a new version of green sock I get an error:

    TypeError: Error #1010: A term is undefined and has no properties.

    at MethodInfo-200()

    at flash.events::EventDispatcher/dispatchEventFunction()

    at flash.events::EventDispatcher/dispatchEvent()

    at com.greensock.loading::VideoLoader/_metaDataHandler()

     

     

     

     

     

    This is the version of green sock that works:

    CHANGE LOG : GREENSOCK TWEENING PLATFORM

    ----------------------------------------

     

    2011-07-07

     

    but the latest build doesn't. Am I doing something wrong?

  2. var video:VideoLoader = new VideoLoader("video.f4v", {name:"myVideo", container:this, width:stage.stageWidth, height:stage.stageHeight, scaleMode:"proportionalOutside", bgColor:0x000000, autoPlay:true, volume:1, requireWithRoot:this.root});
    
    //start loading
    video.load();
    video.addEventListener(LoaderEvent.INIT, VIDEO_INIT);
    function VIDEO_INIT(event:Event):void {
    	trace(event.target)
    }

     

    What am I missing here?

  3. ok to thicken the plot...

     

    I have gotten the player to trace the progess.

     

    function updateDownloadProgress(event:LoaderEvent):void {

    trace(event.target.progress)

    trace(event.target.bytesLoaded, event.target.bytesTotal)

    }

     

    The problem seems to be rather than tracing the whole progress it traces just the buffered amount (bufferMode is set to true).

     

    What can I do?

  4. I've created a video site, but I've run into and error. In order to not allow the scrub bar to be fast forwarded beyond what's already downloaded I'm trying to limit it's width. BUT the problem is that both:

     

    event.target.progress

    and

    event.target.bytesLoaded/event.target.bytesTotal

     

    equal 1. Meaning the whole file has downloaded. BUT that's not the case. I know the video is on a different server out side my home location. Help please.

  5. Say I have a banner rotator that builds each banner based on an XML file that is looped though. Each banner has different text, images, etc. Could I also create a for loop that creates a timelinelite of the banner building in? And each time the banner is brought to the top of the rotator the timelinelite would be told to gotoAndPlay(1)?

     

    I know I can loop, but how would I go about calling the timeline? Can I give it a name? and say timeline("number1").gotoAndPlay(1)?

     

    I'm lost. Help!

  6. is there a way to position a loaded image inside the crop? for instance:

     

    var image2:LoaderCore = LoaderMax.parse(xml.page[2].img[0].@src.toString(), {name:"image2",container:this, noCache:false, width:145, height:stage.stageHeight, scaleMode:"proportionalOutside", hAlign:"center", vAlign:"center", crop:true});

     

    And what I want to do is put the hAlign:"center"-145

    Is there a way to do that?

  7. is it possible to change the settings of a loader after the files been loaded? Take for instance a loader with these params:

     

    {name:"why_video1", bgColor:0xffffff, width:stage.stageWidth, height:stage.stageHeight, scaleMode:"proportionalInside", hAlign:"left", vAlign:"top", crop:true})

     

    and say you wanted to change hAlign to center and vAlign to center when the file goes into fullscreen. Is it possible to change these on the fly? Or once their set their set?

  8. So in my loader I define the size of a video file... width:stage.stageWidth, height:stage.stageHeight, scaleMode:"proportionalInside", hAlign:"left", vAlign:"top"

     

    And in my stage listener I have code the sets the fitWidth and fitHeight. It works as it should. I love it.

     

    But I'm wondering if there's a way to get the file's actual dimensions? Because with proportionalInside the file fits in the space defined maximizing either height or width, but even though the width is set to stage.stageWidth if the height doesn't allow it it's width is actually less than stage.stageWidth. So code:

     

    in my stage resize function:

     

    video1.content.fitWidth = swfWidth

    video1.content.fitHeight = swfHeight

     

    trace(video.content.width, video.content.height) // THESE just return the stage.stageWidth and height even if the actual video isn't that width.

     

     

    I'm looking to get the actual displayed width.

     

    Any ideas?

  9. Have a Queue of imageLoaders and videoLoaders, and I've defined the estimatedBytes, but I still get very poor progress reports. It starts at 0 then jumps to .2 then .9 and then the remaining progress reports .9945413412, .9956341435. Here's the trace:

     

    trace(event.target.name, "progress: " + event.target.progress);

     

    returns:

    why progress: 0.8593410590073448

    why progress: 0.8594171019451604

    why progress: 0.859893932453896

    why progress: 0.8673481144808071

    why progress: 0.8675188586030212

    why progress: 0.9898047009946656

    why progress: 0.9899934945196937

    why progress: 0.9957593552804853

    why progress: 0.995928129077478

    why progress: 0.9961149535479457

    why progress: 0.9962897743205523

    why progress: 0.9964796674055109

    why progress: 0.9966514195636268

    why progress: 0.9968322873118477

    why progress: 0.9970191117823154

    why progress: 0.9971939325549221

    why progress: 0.9973838256398806

    why progress: 0.9975555777979965

    why progress: 0.9977364455462174

    why progress: 0.997926338631176

    why progress: 0.9980980907892919

    why progress: 0.9982909622353737

    why progress: 0.9984597360323663

    why progress: 0.9986406037805872

    why progress: 0.9988214715288081

    why progress: 0.999002339277029

    why progress: 0.9991832070252499

    why progress: 0.9993640747734708

    why progress: 0.9995449425216917

    why progress: 0.9997258102699126

    why progress: 0.9999066780181335

    why progress: 1

     

    What do I need to do to get better results? Is it the videoloaders? Here's what I'm doing for the video loaders.

     

    var v0_loader:LoaderCore = LoaderMax.parse(xml.page.video[0].@src.toString(), {volume:0,bufferMode:false,container:v0_mc, noCache:false, estimatedBytes:Number(xml.page.video[0].@estimatedBytes)});

    parentQueue.getLoader(QUEUE_NAME).append( v0_loader );

    v0_loader.addEventListener(VideoLoader.VIDEO_COMPLETE, loopVideo);

     

    Anyone have any ideas? HELP!

  10. In my onComplete function is there a way to get what type of loader just completed?

     

    trace(event.target)

     

    lists what I need but it also list a whole bunch of other stuff I don't need. Fo example I get:

    VideoLoader 'loader2' (videos/video5.f4v)

     

    But all I want is the "VideoLoader" part?

     

    I can't seem to figure it out for the life of me.

     

    Help!

  11. I have several images and videos that are loaded in my loaderMax. And I have an stage resize event, but I'm trying to figure out how to target the loaders or the movieclips that contain the image or video, but still keep the settings or proportions I originally set. Does that make sense?

     

    For example say I have:

    var mc:MovieClip = new MovieClip()

    addChild(mc)

    var video2:VideoLoader = new VideoLoader("woman.f4v", {name:"myVideo", y:300, container:mc, width:1200, height:720, scaleMode:"proportionalOutside"});

     

    in my stage event listener I would want to resize the video but keep the scaleMode and different parameters.

    mc.width = stage.stageWidth

    mc.height = stage.stageHeight

     

    Is there a way to target the loader and not the "mc"?

     

    Thanks in advance.

×
×
  • Create New...