Hi. I want to be able to load an FLV into my embedded video object and if it is smaller than the video object, I want to center it within the frame. If it is bigger than the video object I want to re-size it to the object size. My code follows. When I try to load a small FLV in, it expands to fit the embedded video size. "videoClip" is the MC, "theVideo" is the embedded video.
Thanks in advance, JP myStream.onStatus = function(info) { flvWidth = videoClip.theVideo.width; flvHeight = videoClip.theVideo.height; if ((flvWidth != 0) && (flvWidth <= 320) && (flvHeight != 0) && (flvHeight <= 240)) { videoClip.width = flvWidth; videoClip.height = flvHeight; videoClip._x = ((320-flvWidth)/2); videoClip._y = ((240-flvHeight)/2); } else if ((flvWidth != 0) && (flvWidth > 320) && (flvHeight != 0) && (flvHeight > 240)) { flvWidth = 320; flvHeight = 240; videoClip._x = 0; videoClip._y = 0; } } _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com