Now go to (or any section that resizes the scrollbar):
http://www.yetiriders.com/#/support/
And then click in the nav back to Features (or just hit the back
button). It's as if the swf isn't resizing in time....
This is how I'm doing it now (and it's working in all other browsers):
var availHeight:uint = ExternalInterface.call("(function(){ return
window.innerHeight || document.body.clientHeight; })();");
SWFFit.minHei = availHeight;
SWFFit.stopFit();
SWFFit.minHei = _currentHeight;
SWFFit.startFit();
On any other browser it works - except for safari 4.04 (latest
version) on Mac OSX Snow Leopard.
So the good news is that it's only a bug on every web designer's
computer in the world. :)
Any thoughts?
rob
//get window inner height
var availHeight:uint = ExternalInterface.call("(function(){ return
(window.innerHeight)? window.innerHeight : ((document.documentElement.clientHeight)?
document.documentElement.clientHeight : document.body.clientHeight); })();");
--
You received this message because you are subscribed to the Google Groups "SWFFit" group.
To post to this group, send email to swf...@googlegroups.com.
To unsubscribe from this group, send email to swffit+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/swffit?hl=en.
http://209.85.27.124/swffitbug/
http://209.85.27.124/swffitbug/alert.html (with an alert on the
setStyle method so you can step through the calls being made)
From what I can see, the minimum height gets set to 1400px correctly
(and Flash correctly recognizes the new stage size in the Event.RESIZE
handler), but then Flash immediately jumps back to the original height
(and a RESIZE event occurs). Scrolling or resizing the browser window
then causes Flash to throw another RESIZE event and it correctly sees
the 1400px height.
The exact opposite happens when resizing back to the smaller height.
The minimum height is set, a RESIZE event occurs, the stage size
reflects the new height and then another RESIZE event occurs
immediately and the stage reflects the larger height. Scrolling or
resizing the browser window fixes the issue.
You can download the code here:
http://209.85.27.124/swffitbug/code.zip
chris
On Dec 20 2009, 9:57 pm, Miller Medeiros <millermedei...@gmail.com>
wrote:
> > swffit+un...@googlegroups.com<swffit%2Bunsu...@googlegroups.com>
window.scrollTo(0,1);
window.scrollTo(0,0)
On Jan 7, 6:38 pm, Miller Medeiros <millermedei...@gmail.com> wrote:
> Chris, thanks for the detailed report.
>
> I only had time to test it on a mac today and it really happens..
>
> I have plans to release a completely new version of swffit (swffit 3.0) the
> only problem is that I'm not having time to code it (http://code.google.com/p/swffit/wiki/Todo)
>
> I will try to fix this problem as soon as possible.. - probably I only have
> to change the way that webkit forces the redraw.. check this post (http://mir.aculo.us/2009/09/25/force-redraw-dom-technique-for-webkit-...)
When I open a new section:
_resizeTimer = new Timer(300, 30);
_resizeTimer.addEventListener(TimerEvent.TIMER, _dispatchResize);
_resizeTimer.start();
protected function _dispatchResize(e:TimerEvent):void
{
Resizer.getInstance().updateSize();
StageReference.getStage().dispatchEvent(new Event(Event.RESIZE));
Resizer.getInstance().updateSize();
SWFFit.startFit();
}
in Resizer:
protected function _updateSize():void
{
_currentHeight = __currentHeight;
//if(ExternalInterface.available) ExternalInterface.call
("updateSwfSize",1090,_currentHeight);
SWFFit.minHei = _currentHeight;
setTimeout(function():void{StageReference.getStage().dispatchEvent
(new Event(Event.RESIZE))}, 400);
}
private function get __currentHeight():Number
{
//return Container.getInstance().height + Container.getInstance().y +
100;
if(Controller.getInstance().currentSection != null && !
Controller.getInstance().changingSections) return
Controller.getInstance().currentSection.forceHeight;
else return 599;
}
public function updateSize(e:Event = null):void
{
if(ExternalInterface.available)
{
if(__currentHeight != _currentHeight)
{
_updateSize();
}
SWFFit.startFit();
}
}
I realize this is a total hack and completely redundant - but anything
I take out makes it stop working. LOVE IT. :)