I am currently working on a web application which will allow easy management of photograph web galleries. It uses alot of flash and a little javascript.
We were using javascript to change the size of movies. Now, we’d been happily trundling along in La-La Land (Firefox and Safari world) and negelected to check out Reality. As soon as I opened the main functionality page of our appplication in IE 6 on an XP laptp, I found that we were out of luck. Our movie size changes didn’t work at all. This rendered the application unusable.
Well, after looking at different flash/javascript communication postings, and tutorials , I started to see a pattern emerging. It was that the embed code was very non-standard and you had to edit one thing to get IE to see it and another to get all others to deal with it.
I remembered Flash Satay from A List Apart and so I grabbed the object code out of one of the projects I had used it in and threw it into the php page for our web application:
Sure enough, now the flash movie would resize in IE, FireFox, and Safari.
The resize function looked something like this:
function Resize(theEl, number) {
window.document.getElementById(theEl).height = number;
}
The goal with this was to hide a portion of the flash movie (as a tab) until the user wants to edit the cotent held within that particular movie.
Now, when the tab is hit, that movie’s height can be changed from tiny to large or large to tiny. Also, thanks to the “noscale” parameter value, the content of the movie doesn’t stretch or change dimensions. The height value only changes the vertical amount of movie visible.