Groups | Blog | Home
all groups > flash actionscript > september 2007 >

flash actionscript : Playback differences in IE and Firefox, WHY?


reinhat
9/7/2007 11:24:17 PM
Hi,
I have been working on a web site that I have just recently tested and noticed
a wierd error:
The playback appears fine in IE however in Firefox the scripted animated
elements do ot apper correctly.

Please visit the site in IE and Firefox:

http://www.attila.reinhardt.com/clients/mfcardamone/home.htm

Then click on Herbarium Specimens and select any of the pictures. When the
large image loads I have created a script that adds up the width of the image
and the position of the image and also adds 15 pixels to it in order to
position the text description fields accordingly.
Viewing it on Windows XP in IE 6 works while in Firefox 2 it does not display
the positioning correctly. Also in Firefox the included Fuse scripts does not
work while in IE they display fine.

Thank you for your help in advance, Attila

I have attched the code for your review:




//Loading Large Image:
//
containerMC._alpha = 0;
TitleTxt._alpha = 0;
TypeTxt._alpha = 0;
SizeTxt._alpha = 0;
but_Back._alpha = 0;
//
TitleTxt.text = workName;
TypeTxt.text = workType;
SizeTxt.text = workSize;
//
startLoading(selectedPicture);
//
//loading contents and transitions functions:
function startLoading(whichImage) {
loadMovie(whichImage, "containerMC");
_root.onEnterFrame = function() {
infoLoaded = containerMC.getBytesLoaded();
infoTotal = containerMC.getBytesTotal();
percentage = Math.floor(infoLoaded/infoTotal*100);
infoField.text = "Loading Image "+percentage+" %";
if (percentage>=100) {
//positioning texts to right of the image:
TitleTxt._x = (containerMC._x+containerMC._width)+15;
TypeTxt._x = (containerMC._x+containerMC._width)+15;
SizeTxt._x = (containerMC._x+containerMC._width)+15;
but_Back._x = (containerMC._x+containerMC._width)+15;
//setting alpha values to default:
TitleTxt.alphaTo(100, 0.5, "linear", null, null);
TypeTxt.alphaTo(100, 0.5, "linear", null, null);
SizeTxt.alphaTo(100, 0.5, "linear", null, null);
but_Back.alphaTo(100, 0.5, "linear", null, null);
containerMC.alphaTo(100, 0.5, "linear", null, null);
//
delete this.onEnterFrame;
infoField._visible = false;
}
};
}
//
stop();
GWD
9/8/2007 12:00:00 AM
myIP
9/8/2007 3:24:46 AM
Crazy, right after reading your post I check my current project online using
FireFox and IE 6 and noticed they are inconsistent. I am also loading an
external image into Flash and with FireFox it seems that it doesn?t recognize
the image instantly however with IE it does (hence with your issue it doesn?t
know the width of the image). Comparing your code with mine, we are both using
an onEnterFrame event handler and Fuse script. So those would be the culprits.
I think you are using an older version of Fuse then I (I am using the latest
version). With your code, you can use the MovieClipLoader class to retrieve
the bytes loaded for the loading image instead of onEnterFrame. That might
solve your issue. If I find out a solution I will post back here.

But this is not uncommon, finding one browser acting different then the other,
I have witnessed it several times.
DMennenoh **AdobeCommunityExpert**
9/8/2007 9:07:09 AM
[quoted text, click to view]

I second that. Our sites are always the same in FF and IE. If you ask me,
MCL is the only right way to load in external movies & images.

--
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/

reinhat
9/10/2007 4:46:18 AM
Thank you for the suggestion. You were right!
Using the MovieClipLoader solved the issue.
thanks,
AddThis Social Bookmark Button