homepage Welcome to WebmasterWorld Guest from 54.235.36.164
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe and Support WebmasterWorld
Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

    
trouble resizing movie
garann




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

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!

 

garann




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

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!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved