It is currently Thu Oct 02, 2014 4:29 pm Advanced search

Problem with Flash

Technical support, bug reports, feature requests and more.

Problem with Flash

Postby EarlyOut » Mon Apr 07, 2008 3:42 am

I'm trying to incorporate the Flash display into my JAlbum skin software, and have run into two odd little problems.

If I use both swfobject.js and easing_equations.js, the Flash display isn't centered properly in the popup window in Firefox: [test site removed]. On this page, the regular images work fine, but the third one shows the error.

That same page in IE7 shows the Flash presentation properly, but the floating "Tina glatt" text doesn't move. In effect, the Flash presentation becomes a static image. It works OK if the Flash presentation is the first thing you open on the page, but if you open one of the other regular jpg's, then open the Flash again, it's static.

If I remove the call to the easing equations, it behaves properly in Firefox, but the IE7 problem seems to occur even without the easing equations, so I don't understand what's happening there, at all.

Any ideas?
Last edited by EarlyOut on Mon Apr 14, 2008 5:50 am, edited 1 time in total.
User avatar
EarlyOut
 
Posts: 1705
Joined: Sun Nov 11, 2007 11:22 pm
Location: Sector R

Postby torstein.honsi » Mon Apr 07, 2008 10:30 am

I can't see anything wrong immedieatly with your pages, and I think these Firefox/IE7 issues are two different things, since they not seem related. Do you mind letting the page live for some days, so I can come back and check it in detail?
User avatar
torstein.honsi
Site Admin
 
Posts: 9199
Joined: Thu Nov 09, 2006 1:22 pm
Location: Vik i Sogn, Norway

Postby EarlyOut » Mon Apr 07, 2008 12:59 pm

I agree - at first, I thought the FF and IE7 problems were both indications of the same thing, but the more I played with it, the more it appeared they were different.

No problem with the page staying live for a while. I'll keep messing around with it, and will post back if I stumble on anything interesting.
User avatar
EarlyOut
 
Posts: 1705
Joined: Sun Nov 11, 2007 11:22 pm
Location: Sector R

Postby torstein.honsi » Fri Apr 11, 2008 11:40 am

I found the Firefox related bug. Firefox is not able to handle the decimal values that are the result of certain easing operations. The fix is to simply round the numbers. It will be included in the next release. Until then,

Replace this:
Code: Select all
hs.setStyles(this.mediumContent, { left: (this.x.min - to.x) +'px',
            top: (this.y.min - to.y) +'px' });


with this:
Code: Select all
hs.setStyles(this.mediumContent, {
            left: Math.round(this.x.min - to.x) +'px',
            top: Math.round(this.y.min - to.y) +'px'
         });

This only applies to the configs using Highslide HTML.
User avatar
torstein.honsi
Site Admin
 
Posts: 9199
Joined: Thu Nov 09, 2006 1:22 pm
Location: Vik i Sogn, Norway

Postby torstein.honsi » Fri Apr 11, 2008 11:45 am

The fix for the stopping flash is to set hs.preserveContent = false. You can do this for either the whole page or the single Flash expander. If it is not false, IE stops it on close and it doesn't start again.
User avatar
torstein.honsi
Site Admin
 
Posts: 9199
Joined: Thu Nov 09, 2006 1:22 pm
Location: Vik i Sogn, Norway

Postby EarlyOut » Fri Apr 11, 2008 1:14 pm

Oh, you are good! Yes, those two changes appear to have taken care of the weird behaviors in FF and in IE. Thanks!
User avatar
EarlyOut
 
Posts: 1705
Joined: Sun Nov 11, 2007 11:22 pm
Location: Sector R

Postby EarlyOut » Fri Apr 11, 2008 1:56 pm

Some related issues...

Usually with SWFObject, you can specify either the height and width, or specify a percentage, like:

var so = new SWFObject("Flash.swf", "my-flash", "100%", "100%", "7", "#FFFFFF");

That doesn't work in this context, however - the HS popup ends up being the wrong size.

Similarly, in your bare-bones example, if I change the height and width from 300/250 to 600/500, the height is correct, but the width is chopped off.
User avatar
EarlyOut
 
Posts: 1705
Joined: Sun Nov 11, 2007 11:22 pm
Location: Sector R

Postby torstein.honsi » Mon Apr 14, 2008 9:44 am

I don't think percentages will work very well in this setting. The size of the Highslide wrapper is determine after the Flash. But, as you raise the width of the Flash to 600, you also have to raise the with of the expander itself, by using CSS or hs.width.
User avatar
torstein.honsi
Site Admin
 
Posts: 9199
Joined: Thu Nov 09, 2006 1:22 pm
Location: Vik i Sogn, Norway

Postby EarlyOut » Mon Apr 14, 2008 2:04 pm

Yes, I had a gut feeling that percentages would create horrendous problems with determining the size of the expander! For setting the width of the expander, hs.width works very nicely.

Now, I need to figure out how to determine the size of a Flash presentation. Something tells me that's going to be ugly, and full of land mines. Probably best to tell the users of my software that they need to pick a size, and let Flash use it, no matter what the "native" size of the SWF object is.
User avatar
EarlyOut
 
Posts: 1705
Joined: Sun Nov 11, 2007 11:22 pm
Location: Sector R

Postby torstein.honsi » Tue Apr 15, 2008 9:08 am

Apparently there are PHP libraries to get the native dimensions of a flash movie.

Googling http://www.google.no/search?q=php+get+flash+width returns some hits, for example http://forum.mambo-foundation.org/showthread.php?t=9755
User avatar
torstein.honsi
Site Admin
 
Posts: 9199
Joined: Thu Nov 09, 2006 1:22 pm
Location: Vik i Sogn, Norway


Return to Highslide JS Usage

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 9 guests