-
1. Re: No Luck Reducing SWF Size
Ned Murphy Aug 13, 2009 8:44 AM (in response to andrewmcgibbon)Even if your zip file clears the queue, which historically is doubtful, but not impossible, chances are the system has corrupted your zip file and it will not be openable. If you have your own server then you should try publishing the file to there so that it can be viewed.
Beyond that, looking at your swf may not provide much information anyways. Can you describe what is in the file and what is the file weight of any content that you imported to the library?
-
2. Re: No Luck Reducing SWF Size
andrewmcgibbon Aug 13, 2009 8:53 AM (in response to Ned Murphy)You can view the actual final ad at http://www.jalc.org/test.html. It's the 336x240 one on the bottom.
This actually raises a larger question that I really could use some guidance on. This ad was created in Illustrator by our creative director (usually in CMYK for print, he says he doesn't know the hexadecimal numbers for the print colors we are using, then when I change the document color mode to RGB the colors all change). I opened Illustrator and would click on an element, copy it, and paste it into Flash as a bitmap. The picture of Wynton Marsalis is probably the largest element in there. This image I saved as a gif to maintain transparency and then I imported it. The creative director had originally created it in Illustrator with a mask on the whole image (cause he doesn't need to worry about file size).
Unfortunately, I am not a Flash expert. I have to know many things in this job, Flash is just one of them. My bigger question is, what should be the proper work flow for this? In researching this it seems as though I am transferring the elements correctly.
Your help is greatly appreciated.
Andy
-
3. Re: No Luck Reducing SWF Size
andrewmcgibbon Aug 13, 2009 1:19 PM (in response to andrewmcgibbon)I have been researching this all day. It seems I could use a loop to play the movie 3 times rather than duplicating the frames, that would reduce the file size. But for the life of me I can't find anything that specifically tells me, using actionscript, how I would specify this. I have tried the following in the first frame, to no avail. If there are any tutorials about how to loop through a movie and then stop it, I would appreciate the heads up.
for (var maxPlays=0;maxPlays<=3;maxPlays++) {
gotoAndPlay(1);
}I also tried the following in the last frame, again, no luck.
var i:int=1;
while (i < 3){
gotoAndPlay(1);
i++;
} -
4. Re: No Luck Reducing SWF Size
Ned Murphy Aug 13, 2009 2:00 PM (in response to andrewmcgibbon)For the looping, try...
In the first frame use:
var loopCount:int;
if(!loopCount){
loopCount = 0;
}and in the last frame use:
loopCount+=1;
if(loopCount == 3){
stop();
} else {
gotoAndPlay(1);
}As far as the rest goes, go you didn't mention what king of fileweight is held by the graphics, but for what I saw in the link you provided, the only thing you probably need to import is the musician portion of the imagery, which could be optimized if it isn't already to some significantly low bytes. Anything else in that file you should be able to create within Flash using the drawing tools. Flash drawn graphics normally do not add much weight to a file.
-
5. Re: No Luck Reducing SWF Size
andrewmcgibbon Aug 13, 2009 2:18 PM (in response to Ned Murphy)Ned, thank you so very much for your help. That solved my problem. I would like to ask you one more question if I may. Could you explain the second line of this section of code:
var loopCount:int;
if(!loopCount){
loopCount = 0;
} -
6. Re: No Luck Reducing SWF Size
Ned Murphy Aug 13, 2009 5:02 PM (in response to andrewmcgibbon)Actually, you can probably get away without using that entire if section in the first frame, especially so since you are using an int Class value which defaults to zero anyways.... the important thing is that you don't assign a value to the variable when you declare it so that it doesn't get reset to that value every time you get back to that frame... which is what would happen had it been declared as... var loopCount:int = 0;
That was something I borrowed from an AS2 version, and I may have used that condition to be sure that loopCount had a value to start with since it is an undefined value initially, which it would be in AS2 by default. And I'm not even sure it's needed there... just avoiding a potential "trying to add numbers to an undefined thing".
That line is saying... IF (NOT loopCount) or in other words... IF (loopCount is undefined)... yeah, it'll confuse you... so try to think of it in terms of wanting to do something if something is false...
You can't use if(false), because false evaluates false and the if won't play out. So what putting the ! in front of it does is say... if(NOT false) which is essentially if(true)... meaning it will evaluate the false status as being evidient (true) and process whatever is in the conditional


