PDA

View Full Version : Loading in XML;


liam.smart
07-29-2008, 10:40 PM
Hi everyone,

Has anyone got experience loading in PNG's into empty movieclips?

For some reason, certain PNG's will load in no problem, but other dont. And its not the small filesize ones that are successfully loaded. It varies. If I load in Jpeg's its fine so I know the code is right, but here it is anyways (i have excluded the xml part as that isnt the issue:

//now lets create the movieclips for the images
if (strH)
{ _root.createEmptyMovieClip("ImageHolder"+[i],getNextHighestDepth());
this["ImageHolder"+[i]].loadMovie(strH);
this["ImageHolder"+[i]]._x = intB;
this["ImageHolder"+[i]]._y = intC;
this["ImageHolder"+[i]].width = intD;
this["ImageHolder"+[i]].height = intE;
}

I set the co-ords and width etc in the XML file.

So has anyone ever tried this out importing PNG's? I am exporting for Flash Player 8 and have also tried 9 but that didnt help.

liam.smart
08-14-2008, 02:48 PM
After searching and searching, I finally found the problem. Apparently flash cant load in any png's (or maybe its only transparent png's) that have a width of 2880 or greater. So just made them 2879px and they all load fine.

And if a transparent gif larger than the above size is loaded, flash crashes. Strange one but there it is. I found this on the Adobe bug section of their website.

This thread can be closed now I suppose...

CyanBlue
08-14-2008, 03:06 PM
Thanks for posting what you have found out... That will help people who search the forum with the same issue... Appreciate it... :)

That ain't really a bug... It's rather a limitation... Flash won't be able to load any type of image that is wider than 2880 pixel...

liam.smart
08-14-2008, 05:00 PM
Hi CyanBlue,

I tested it with jpg's that were bigger and they loaded fine. Its just gif's and png's. Having said that, it might only be images that are saved with transparency. I shall test go test it with large png's that aren't saved with transparency.

There is also a limitation with the height but I will go find the page again and add that to this post incase someone finds this topic through searching endless pages of Google like I did.

Yeah 'bug' was a strong word. Apologies. Just wish an error stating the limitation would have appeared in the output box telling me! But Im glad I finally got past the problem.

liam.smart
08-14-2008, 08:35 PM
Just tested it with different image formats. jpegs are the only images that will be loaded if there dimensions exceed 2880 either width or height.

Heres the link to the Adobe webpage I mentioned before where I found out about this.

http://bugs.adobe.com/jira/browse/FP-42

Hope this helps someone one day...

CyanBlue
08-15-2008, 12:34 AM
Glad to see you coming up with more answers... Appreciate it... :)

Just wanted to point out that you somehow forgot to post the actual links...