Welcome to WebmasterWorld Guest from 54.161.147.106

Forum Moderators: open

trouble resizing movie

   
5:55 pm on Aug 17, 2006 (gmt 0)

10+ Year Member



I have a video player that may contain very small videos from camera phones, etc., or very large Camtasia videos (small and large here being in terms of their dimensions). When the player receives a file that's larger than it's default size, it automatically adjusts itself.

My problem is that, if I do nothing, the player is cropped outside the bounds of the original size, so only the top left corner is visible. If I attempt to resize it with Javascript, the whole thing scales, and I still see the top left corner, only I see it much larger. Has anyone dealt with this? I assume there's some setting I'm missing or something...

Here's the resize function from Actionscript:

function expandFrame() {
Stage.scaleMode = noScale;
// sets the height and width of the object element in HTML
getURL("javascript:resizeFlash(" + (vWidth+20) + "," + (vHeight+50) + ")");
// vHeight and vWidth are the video file's height and width from its meta info
fTop._width = vWidth + 20;
fBottom._width = vWidth + 20;
fBottom._y = 8 + vHeight;
fLeft._height = vHeight;
fRight._height = vHeight;
fRight._x = 8 + vWidth;
// controls and buttons
rwdBtn._y = 8 + vHeight + 7;
playBtn._y = 8 + vHeight + 4.5;
ffwdBtn._y = 8 + vHeight + 7;
volSlide._y = 8 + vHeight + 12.9;
posSlide._y = 8 + vHeight + 12.9;
posSlide._x = fBottom._width/2 - 60;
tmd._y = 8 + vHeight + 14;
tmd._x = fBottom._width - 127;
mInfo._y = 8 + vHeight + 13.9;
mInfo._x = fBottom._width - 60;
}

Thanks in advance!

9:43 pm on Aug 17, 2006 (gmt 0)

10+ Year Member



Aha. I figured out part of the problem. This line:

Stage.scaleMode = noScale;

should be this:

Stage.scaleMode = "noScale";

Now my only problem is that the movie shows up centered on the expanded stage area. Worse, it doesn't recognize 0,0 as the top left corner. The top left corner's x and y coordinates are negative numbers. Does anyone know a way to fix this?

Thanks!

 

Featured Threads

Hot Threads This Week

Hot Threads This Month