| 19.06.2007 by Zoltan | ![]() |
NikeSB + SWFForceSize

NikeSB updates today with a fresh design from odopod. However its not really the design that grabbed me, but more the very clever use of dynamically scaling the height of the flash movie, without having to refresh the HTML… the result is that the browser’s scrollbar functions as usual (when required, when not it simply disappears), but the entire height of the window is a flash movie.
This is not something I’ve seen too much of before, so I’ve asked around here at de-construct and funnily enough, they’re using some of my mate Gabes’ open source .js :) anyway what happens is this (courtesy of Matt): “looks like an event from the flash is being called on each new ‘page’ in the flash, which in turns calls a resize of the swf embed:”
function updateSwfSize(w,h){
var forcesize = new SWFForceSize( so,w,h );
}
make sense? good! :-P



Niklas says:
Hi there!
I’m very curious about this! I’ve managed to call the function “updateSwfSize” from within flash with ExternalInterface but the scrollbar will not update to the new width and height until I resize the browser window. How can I refresh these values without refreshing the html? At first I thought it had something to do with the function updateBrowserScroll(y){window.scrollTo(0,y);} that is there on the NIKE site - but no luck. Anyone?
Niklas
seb says:
thanks I finally got it!