Ivan - Problem with the first frame (white screen)

A place for tutorials on how to get the most out of Flash

Ivan - Problem with the first frame (white screen)

Postby Ivan-Aedler » Fri May 10, 2013 5:18 am

I've been having this problem since some weeks ago. I use Flash CS6.
Developers call this problem 'White Screen of Death'.

I already tried google: http://www.newgrounds.com/bbs/topic/1075398 and http://www.newgrounds.com/bbs/topic/957033
When publishing a flash game, the first frame gets clogged up with 11mb (the size of the whole game!)
The interesting thing: I dont call any function or use any huge MC. Its only a black screen with a preloader.

Frame # Frame Bytes Total Bytes Scene
------- ----------- ----------- -----
1 11615067 11615067 Scene 1 (AS 2.0 Classes Export Frame)
2 35810 11650877
3 133386 11784263
4 659394 12443657
5 49 12443706
6 230 12443936

My current Scene1 frames: (please click to expand). This frame 1 code has: 'stop();'

frames.jpg
frames.jpg (53.51 KiB) Viewed 2863 times

I tried to:
1 - Make a new empty frame before preloader - FAILED.
2 - Make a new empty frame after the preloader - FAILED
3 - Delete all function calls (#includes) in frame 3 - FAILED
4 - Created a lonely frame, say , frame 10, with the preloader, and put gotoAndPlay(10) in the empty frame 1: - FAILED
5 - Select several movie clips and set 'Export to Frame 1 as 'NO' - FAILED and the game crashed, with no music. Game size went down from 11 to 6mb. (I use huge level MCs, and I use an instance name, but not exactly the 'export to frame1' thing). Anyway, didnt work.

problem.jpg
problem.jpg (68.22 KiB) Viewed 2860 times

6 - Erase all the frame1 (leaving only the default background color, with only stop() there). - FAILED
7 - Publish Settings - Script: ActionScript AS2 (settings icon) -> Export frames for classes: 2 (also tested 3): FAILED


Frame # Frame Bytes Total Bytes Scene
------- ----------- ----------- -----
1 11614046 11614046 Scene 1
2 133247 11747293 (AS 2.0 Classes Export Frame)
3 659336 12406629
4 49 12406678

I use AS2 and I always export using Flash 11.2, with DEFLATE option and JPEG deblocking on.

Thanks for all the possible help!
User avatar
Ivan-Aedler
 
Joined: Fri Jun 03, 2011 6:34 am
Location: GMT -3

Re: Ivan - Problem with the first frame (white screen)

Postby OwnerOfSuccuby » Fri May 10, 2013 9:00 pm

I really do not understand the problem - becouse i can not understand what you have on enter and on exit. It is better to see video for problems like this :lol:
(And my english is not enough to get some data - becouse even in russian language one word can have a lot of different meanings).

If i understand you wright and - it just not load anything and after some time - you wait and all loads and work then:
Do you use CS6 or another versions before ? May be the problem is in CS6 ? I have some the same problems in new projects - but I newer had the same in old - but i make all the parts the same.

If it do not work in any way - and i do not understand you correct:
But lets go step by step and think. What can flash dislike. But lets first think may be it is possible to fix the problem another way.

Do not worry. Do you have more early made copy of the game version ? Some backups ?

Try to test it on older version will it work ?

Some times it is very very not often - but flash have bug in itself - and if you work to much it start work with bugs - i get that problem only once - but have. Restart your computer.

Now lets try - work or do not work ? Do not work than ->try to find another version - that were before version with changes.

If we have it try to make the same changes. If do not work than ->

Chech the folder where the game is -> make no strange symbols and the full path to it have not be like С:#$%^&*()(*&^%$#@#$%^&*(
Try to make it like
c:/xcv/game/MyFile.fla and etc.

Next - check the levels names - do not you have more than one part with the same name. May be you use some name with latters that is not possible to use.

Try check on names. And how that names are look like.
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm

Re: Ivan - Problem with the first frame (white screen)

Postby Ivan-Aedler » Fri May 10, 2013 10:42 pm

OwnerOfSuccuby Wrote:If i understand you wright and - it just not load anything and after some time - you wait and all loads and work then:

Yes, it's not loading anything (WHITE screen), then ALL loads all of a sudden (Immediatelly).

OwnerOfSuccuby Wrote:Do you use CS6 or another versions before ? May be the problem is in CS6 ?

I'll try to downgrade to CS5.

OwnerOfSuccuby Wrote:Do not worry. Do you have more early made copy of the game version ? Some backups ?

Yes I have. But the problem is, ANY game I upload (even old playshapes one) is with white screen. It might be a Flash update problem or my computer problem. Something with UPLOAD (network settings? something corrupting the files?)

OwnerOfSuccuby Wrote:Some times it is very very not often - but flash have bug in itself - and if you work to much it start work with bugs - i get that problem only once - but have. Restart your computer.

I did it!

OwnerOfSuccuby Wrote:Chech the folder where the game is -> make no strange symbols and the full path to it have not be like С:#$%^&*()(*&^%$#@#$%^&*(
Try to make it like c:/xcv/game/MyFile.fla and etc.


I use C:\Users\IN\Documents\MIM AE. No problem at all.

OwnerOfSuccuby Wrote:Next - check the levels names - do not you have more than one part with the same name. May be you use some name with latters that is not possible to use.

Flash can have two or more AS linkages with the same name (Flash will warn me if equal). It didnt warn me so far, so no duplicates.
I use names like l_1_0, l_2_2.
User avatar
Ivan-Aedler
 
Joined: Fri Jun 03, 2011 6:34 am
Location: GMT -3

Re: Ivan - Problem with the first frame (white screen)

Postby OwnerOfSuccuby » Sat May 11, 2013 4:12 pm

What do i find in the internet - may be it will help:

1)Remove "Export in first frame" and put all exporting things in some frame next to the preloader and you can attach it next the frame it was.
Or try to export not in first but in second frame.
2)Do not use attach and use duplicate.


Try to read this: http://translate.google.ru/translate?sl ... 38&act=url

I use another way of programming so do not have such problem. I put all in frames - there are some another bugs and a little bug on loading some times (it needs to load some thing and do not show until 20% was load). May be thats why i start to have problems in XS6 and it is not CS 6 mistake - or may be it is - do not test it.
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm

Re: Ivan - Problem with the first frame (white screen)

Postby Ivan-Aedler » Sat May 11, 2013 4:38 pm

OwnerOfSuccuby Wrote:1)Remove "Export in first frame" and put all exporting things in some frame next to the preloader (or in second frame) and you can attach it next the frame it was.

This means putting all 23 levels in the stage on frame 2 just to load them all? Then it goes to frame 3 which is empty and I can attachMovie? It might cause lag :/ And what if I have 200 levels in the future? I'll try this approach just to see.

EDIT: It works! But now, after the preloader, if the player press PLAY!, the game loads between 10 to 20 seconds and its still 4mb on frame1. This delay occurs only once. Thats because frame2 is full of all levels and music. I disabled 'Export to Frame1' on them because it only works this way. And it will be a problem when I have, say, 200 levels.

I gave up using the method above. But I've preloaded the music instead, in FRAME2. (I've put all instances without 'export to first frame') in a special MC with all songs copied to its frames. Now, 7.6mb instead of 12mb. But as I've said, its unpractical to have tons of levels loaded in frame2 (in a hidden area). Is there another way to force the system to load MCs with AS code and instance, with no 'Export to first frame'?

OwnerOfSuccuby Wrote:2)Do not use attach and use duplicate.

In order to use duplicateMovieClip, you need to have another movie clip already placed in the stage with a name (say, source_Level).
Each level is a new huge MC, like l_0_1, l_0_2... I use attachMovie. Using duplicateMovieClip, I would need a source MC, like 'source_level', then l_0_1 would be duplicated. But source_Level has nothing, as its a empty MC on the stage. And when finishing this level, the new source_level will have to be l_0_2, and so on. Its like having an empty paper and trying to duplicate to an apple. In another level, the same paper needs to be duplicated to an orange. Its non sense as I can put an apple directly. But it does not work when I disable 'export to first frame', even being frame 3 (I use all my attachmovie calls on frame 3).

I just dont know why the program doesnt accept attachMovie with l_0_1 and others in frame 3, once I remove 'Export to First Frame'. When we call them, it's supposed to be called and to be put in the stage.
I also tried to put frame 2 or even frame3 as First Frame, in As2 settings (in Publish Settings). So each level is now showing 'Export to Frame 3'. Even enabling it, Frame 1 still retains 11mb.

OwnerOfSuccuby Wrote:Try to read this: http://translate.google.ru/translate?sl ... 38&act=url

I will, thanks!

OwnerOfSuccuby Wrote:I use another way of programming so do not have such problem. I put all in frames - there are some another bugs and a little bug on loading some times (it needs to load some thing and do not show until 20% was load). May be thats why i start to have problems in XS6 and it is not CS 6 mistake - or may be it is - do not test it.

I dont use level objects spread along the main frames anymore (that is, each frame with tons of objects without a level container). It makes Flash slow over time and LALEM bugs start to appear (Level After Level Mangling/Mix), that is, you see part of the former level when loading a new level.

But hmmmmmmmm I can try something!
I can put all the levels in a special MC IN THE LAST FRAME of Scene1 (main timeline), not the second/third!! So it wont lag. It will navigate through the frames except the last one. Flash only needs a frame IN THE STAGE that says to him: 'hey, I am here, please load me too, even not having a Export to Frame, ok'?

EDIT: Nothing. The levels dont load via attachMovie in frame 3. Nothing loads (blue screen). Even with the size report showing that all levels were included in the SWF (my game has 12mb and the report says 12mb total). It's like the levels dont exist to be attached.

Frame # Frame Bytes Total Bytes Scene
------- ----------- ----------- -----
1 5486919 5486919 Scene 1 (AS 2.0 Classes Export Frame)
2 3918777 9405696
3 874268 10279964
4 49 10280013
5 230 10280243
6 2183644 12463887

levels.jpg
User avatar
Ivan-Aedler
 
Joined: Fri Jun 03, 2011 6:34 am
Location: GMT -3

Re: Ivan - Problem with the first frame (white screen)

Postby IrrelevantComment » Mon May 13, 2013 5:02 pm

Under Actionscript settings, change "Export classes in frame: " to something higher than one.

When you test the game, try looking at View->bandwidth profiler and view -> frame by frame graph
IrrelevantComment
 
Joined: Tue Mar 15, 2011 7:46 pm

Re: Ivan - Problem with the first frame (white screen)

Postby Ivan-Aedler » Tue May 14, 2013 3:03 am

IrrelevantComment Wrote:Under Actionscript settings, change "Export classes in frame: " to something higher than one.

Thanks but it doesnt work, as said above.
The main problem is that I have tons of levels so far (more than 25) that uses AS export code! (1_1, 1_2..) and I have to call them during gameplay, using attachMovie.
When I put 'dont export for ActionScript', the levels ARENT put in the SWF because there arent any level instance in the stage. I call them on-the fly.
I even tried to put all of them in, say, frame 7 (it was huge, just imagine 25 large squares). Even so, the game didnt load them, because I need to put them on , say, frame2,
and call them on frame 3 (when the game starts). This creates a delay of 10~20 seconds or even more in slower computers.

Frame # Frame Bytes Total Bytes Scene
------- ----------- ----------- -----
1 7967557 7967557 Scene 1
2 3899128 11866685
3 657655 12524340 (AS 2.0 Classes Export Frame)
4 49 12524389
5 230 12524619

IrrelevantComment Wrote:When you test the game, try looking at View->bandwidth profiler and view -> frame by frame graph

Cant find it. I use CS6.
User avatar
Ivan-Aedler
 
Joined: Fri Jun 03, 2011 6:34 am
Location: GMT -3

Re: Ivan - Problem with the first frame (white screen)

Postby IrrelevantComment » Tue May 14, 2013 8:36 am

Ivan-Aedler Wrote:
IrrelevantComment Wrote:When you test the game, try looking at View->bandwidth profiler and view -> frame by frame graph

Cant find it. I use CS6.


So do I:
The attachment view.PNG is no longer available

Its under the view menu on the Flash Projector that appears when you run it in CS6. It just has some helpful debugging tools like Simulate Download.

Okay, could you host the levels on your website, then load each level when the player goes on it? Not sure the exact method, but I know it uses the Loader class and URLRequest


EDIT: Just realised you are using AS2, don't know what to suggest for that.
Attachments
view.PNG
view.PNG (17.28 KiB) Viewed 2664 times
IrrelevantComment
 
Joined: Tue Mar 15, 2011 7:46 pm

Re: Ivan - Problem with the first frame (white screen)

Postby OwnerOfSuccuby » Tue May 14, 2013 11:04 am

Thanks but it doesnt work, as said above.
The main problem is that I have tons of levels so far (more than 25) that uses AS export code! (1_1, 1_2..) and I have to call them during gameplay, using attachMovie.
When I put 'dont export for ActionScript', the levels ARENT put in the SWF because there arent any level instance in the stage. I call them on-the fly.
I even tried to put all of them in, say, frame 7 (it was huge, just imagine 25 large squares). Even so, the game didnt load them, because I need to put them on , say, frame2,
and call them on frame 3 (when the game starts). This creates a delay of 10~20 seconds or even more in slower computers.


Do it make that 10-20 seconds delay even if you make them invisible or do not use frame 2 and go frame 3 after one ? Or this method do not work too ?

How did you make loader - do you use some standart components - or what code do you use for it ?

By the way is there any way to cheat it ? I mean i have a problem once with loadinf FLV - and i put it in frame 2 in another object :mrgreen: And play it only when i need - but it things that it was loaded even when it loads only first frame of that object - that was empty. And do not start play it as i need it :mrgreen:

Becouse in another way it start play without my permision. May be there is some way like this too ?
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm

Re: Ivan - Problem with the first frame (white screen)

Postby AnotherArrow » Tue May 14, 2013 5:21 pm

Ah... i remember having this problem... i think.

I only have a few minutes, so...

I just want to clarify, the game still loads, but just skips the preloader because everything (including the preloader) are being downloaded in frame 1. Right?

After reading most of the post, I'm not sure were to begin.

Well, lets start with what you've tried already.
I tried to:1 - Make a new empty frame before preloader - FAILED.
2 - Make a new empty frame after the preloader - FAILED
3 - Delete all function calls (#includes) in frame 3 - FAILED
4 - Created a lonely frame, say , frame 10, with the preloader, and put gotoAndPlay(10) in the empty frame 1: - FAILED
5 - Select several movie clips and set 'Export to Frame 1 as 'NO' - FAILED and the game crashed, with no music. Game size went down from 11 to 6mb. (I use huge level MCs, and I use an instance name, but not exactly the 'export to frame1' thing). Anyway, didnt work.
6 - Erase all the frame1 (leaving only the default background color, with only stop() there). - FAILED
7 - Publish Settings - Script: ActionScript AS2 (settings icon) -> Export frames for classes: 2 (also tested 3): FAILED

1, 2, & 4 failed because they don't address the main problem, everything is still being loaded in frame 1.
3 : No comment, not sure what that would have done without seeing the code.
5, 6, & 7 all potentially could have worked but you would have had to do some re-coding elsewhere.

I personally solved my problem with this experience using method 7 by having all MCs (other then the preloader which was on frame 1) exported to frame 2. Of course I was also using AS3, so that might have helped.

Without seeing first hand what code you using and what your actual game structure is, its hard for me to think of a solution at the moment. I'll get back to you when I've got a little more time if you haven't solved it by then.
User avatar
AnotherArrow
 
Joined: Fri Oct 29, 2010 3:22 am

Re: Ivan - Problem with the first frame (white screen)

Postby Ivan-Aedler » Tue May 14, 2013 5:38 pm

OwnerOfSuccuby Wrote:Do it make that 10-20 seconds delay even if you make them invisible or do not use frame 2 and go frame 3 after one ? Or this method do not work too ?

I can try, but, for sure, when you import them on the stage, they will loaded FIRST, then they will be invisible. This will take the same time to load :/
I can try the 'frame skipping' method. E.g. Frame1 'gotoAndPlaying' to Frame 3.

OwnerOfSuccuby Wrote:How did you make loader - do you use some standart components - or what code do you use for it ?

Standard components.
Code: Select All Code
var total:Number;
var loaded:Number;
 
this.onEnterFrame = function()
{
total = _root.getBytesTotal();
loaded = _root.getBytesLoaded();
ratio = _root.getBytesLoaded() / _root.getBytesTotal();
bar._xscale = 100 * ratio; //fill the bar

if(loaded >= total){
   delete(onEnterFrame);
   gotoAndStop(nextFrame());
   }
};
stop();


Again, the problem is not the preloader, but the first frame having more than 7mb. interfering with the own preloader.

OwnerOfSuccuby Wrote:By the way is there any way to cheat it ? I mean i have a problem once with loadinf FLV - and i put it in frame 2 in another object :mrgreen: And play it only when i need - but it things that it was loaded even when it loads only first frame of that object - that was empty. And do not start play it as i need it

Another project? I will defeat the main reason of using only one SWF. And I'll lose the ability to put the flash game online as an 'alone' game.

AnotherArrow Wrote:I just want to clarify, the game still loads, but just skips the preloader because everything (including the preloader) are being downloaded in frame 1. Right?

Yes! Thats it.

AnotherArrow Wrote:3 : No comment, not sure what that would have done without seeing the code.

I only commented out this code in frame 2, becase I was thinking those code was forcing MCs to appear earlier:
Code: Select All Code
#include "_variables.as"
#include "_functions.as"
#include "_balloontext.as"
#include "_enemies.as"
#include "_musicsound.as"


AnotherArrow Wrote:5, 6, & 7 all potentially could have worked but you would have had to do some re-coding elsewhere.

Yes, the problem is that I use HUGE Mcs. Those arent loaded in the end SWF at all if they're not somewhere (physically placed) in the frames. It gets only included in the SWF if I re-enable 'export As to frame1/2/3/...n'.

AnotherArrow Wrote:I personally solved my problem with this experience using method 7 by having all MCs (other then the preloader which was on frame 1) exported to frame 2. Of course I was also using AS3, so that might have helped.

It also works here, but I have 25 levels, and the game has a goal of having 60 or even more. 25 huge MCS make the game loads up to 20 seconds or more. Just imagine 60, 100, 200 levels. It's unpractical :/

AnotherArrow Wrote:Without seeing first hand what code you using and what your actual game structure is, its hard for me to think of a solution at the moment. I'll get back to you when I've got a little more time if you haven't solved it by then.

Ok thank you really! I can send the code to you, but its 420mb (uncompressed).
The game code is not an alien one. its like in the pictures above. The main scene only has 6 frames, and I load levels in frame 3. I use attachMovie to load each level:
e.g. attachMovie ("Level","1_1",_currentDepth); //just an example.

So, level 2: attachMovie ("Level","1_2",_currentDepth);
level 3: attachMovie ("Level","1_3",_currentDepth);
level 4: attachMovie ("Level","1_4",_currentDepth);

The levels arent loaded anywhere in the timeline. They are in the library only. But why not making them appear in the SWF, even without 'export AS to the 1st/2/3 frame'?
Is it a way to force this? like 'force movie clip to be loaded regardless of being in the timeline or not' -> ON/OFF.
User avatar
Ivan-Aedler
 
Joined: Fri Jun 03, 2011 6:34 am
Location: GMT -3

Re: Ivan - Problem with the first frame (white screen)

Postby AnotherArrow » Mon May 20, 2013 2:16 am

blah.png

Try this... though I'm not sure if it will work.

Using the example above as a guide...

Frame 1 is your preloader (after preloader finishes... it must go to 3... skipping 2).
Frame 2 is "empty"
Frame 3+ is your content.

So, you basically putting an empty frame column between your preloader and your game frames.
Next, change the settings to export to frame 2 (the empty frame).
file.jpg
file.jpg (128.85 KiB) Viewed 2553 times

....

So after re-reading the thread, sounds like you already did this... but did you have the preloader go to frame 3 (the main menu i presume) and skip playing 2 (the empty frame)? It sounded like that 10-20sec lag was because the game was actually trying to run that content instead of skipping it going to the main menu.

Also, where are your levels loaded in the current timeline...

If you want, you can email me the file....
or if you have the time, email me a dumbed down version of the file... change all lvl mcs to basic squares, delete all unnecessary characters and reference images and materials....i doesn't have to compile... what I want to see is the code and structure. From there, I can do a better analysis. Also, send as flash 5.5 fla... i still haven't upgraded yet.
User avatar
AnotherArrow
 
Joined: Fri Oct 29, 2010 3:22 am

Re: Ivan - Problem with the first frame (white screen)

Postby Ivan-Aedler » Mon May 20, 2013 9:54 pm

AnotherArrow Wrote:Try this... though I'm not sure if it will work.
Using the example above as a guide...
Frame 1 is your preloader (after preloader finishes... it must go to 3... skipping 2).
Frame 2 is "empty"
Frame 3+ is your content.

It didnt work. Even using 'export to frame 3' :/

Frame # Frame Bytes Total Bytes Scene
------- ----------- ----------- -----
1 8289311 8289311 Scene 1
2 134 8289445 (AS 2.0 Classes Export Frame)
3 3755283 12044728
4 654940 12699668
5 49 12699717
6 229 12699946

The problem is that those 8289 Kbytes will be loaded regardless of AS 2.0 classes export frames (1,2,3,4 frames ahead).
I'm not calling any of these levels in frame 1. I'm stunned.
If I disable 'export frame' altogether, the levels will only be included in the compiled SWF if I put them physically in a given frame.
I have 25 levels and I plan 60 or more. If 25 levels (those huge Mcs loaded in a given frame I've shown way above) lasts 10 to 20 seconds to be loaded when the playhead passes over that frame, Imagine 60 levels.

The best approach would be NO levels physically loaded but a way to FORCE flash to INCLUDE those levels in the end SWF so I can spawn them using attachMovie.
Thank you for all your help so far!
User avatar
Ivan-Aedler
 
Joined: Fri Jun 03, 2011 6:34 am
Location: GMT -3

Re: Ivan - Problem with the first frame (white screen)

Postby AnotherArrow » Tue May 21, 2013 12:12 am

Ivan-Aedler Wrote:I have 25 levels and I plan 60 or more. If 25 levels (those huge Mcs loaded in a given frame I've shown way above) lasts 10 to 20 seconds to be loaded when the playhead passes over that frame, Imagine 60 levels.
I think that was the point you may have missed in my post. The playhead must never play the frames those levels are loaded onto.

Once the preloader has finished, and the player hits play, the code must do a "gotoandplay(3)"... or gotoandstop(3)... thus skipping frame 2... which is where the levels are loaded... regardless of whether the levels are physically loaded there or exported there.

The fact that the first frame is still 8mbs suggest there is still a lot of content being loaded in the first frame.
User avatar
AnotherArrow
 
Joined: Fri Oct 29, 2010 3:22 am

Re: Ivan - Problem with the first frame (white screen)

Postby Ivan-Aedler » Tue May 21, 2013 2:41 am

AnotherArrow Wrote:Once the preloader has finished, and the player hits play, the code must do a "gotoandplay(3)"... or gotoandstop(3)... thus skipping frame 2... which is where the levels are loaded... regardless of whether the levels are physically loaded there or exported there.

Then I'll put all those huge MCs back again, this time on frame 2, then i'll make the preloader to skip frame2 right to frame3. But something might occur (more below).

AnotherArrow Wrote:The fact that the first frame is still 8mbs suggest there is still a lot of content being loaded in the first frame.

Yes but I didnt find out the root cause (the affecting Mc's) yet. The first frame only contains a black screen with the preloader.
When I remove the 'export to first frame' property in all levels, THEN I must put them anywhere in the timeline (like the frame 2 above).
I hope the playhead wont be laggy when passing over frame 2. There will be HUGE mcs there. I know it will go to frame 3, but I've made some tests and , in fact, Flash does read something in each frame, even putting 'gotoAndPlay' to skip frames.
User avatar
Ivan-Aedler
 
Joined: Fri Jun 03, 2011 6:34 am
Location: GMT -3

Re: Ivan - Problem with the first frame (white screen)

Postby AnotherArrow » Tue May 21, 2013 4:31 am

Thanks for the file Ivan,

I've done several test...

and all I've got to say is...

Spoiler (click to show/hide):

YOU ARE SO SCREWED!





First off. Your file was giving me about 2mb for Frame 1and 0kb for Frame 2. I made frame 2 an empty frame beforehand.
So I changed classes to export to frame 2 and made my modifications to make it work. Still 2mb for Frame 1 and ~29bs in Frame 2. Hmm... 29bytes for class code I guess. Where's the content?
I changed you AS code to load later (after the preloader)... no change.
I commented out your AS Code... no change.

I changed all symbols with a linkage to export to frame 2. 2mbs in Frame 1 and ~29b in Frame 2. Okay...
I deleted all sound files. Frame 1 = 1.3mbs, Frame 2 = ~29b Okay, some progress. Sounds were loading into frame 1 even though I was trying to export to frame 2.
I decided to make almost every single MC export to frame 2 for the hell of it. Frame 1 now 2.2mb, Frame 2 at ~29b. ... ... ... da fuck? wait... what? Let me double check... yea... i exported right...
Undo the mc conversion... ok, let me delete all tweens. Frame 1 = 1.3mbs, Frame 2 = 29kb.. No significant change from deleting the sound. Wasn't expecting it to.
Let me try exporting to oh... frame 10.
Spoiler (click to show/hide):

Code: Select All Code
Mario is Missing PUT TEST.swf Movie Report
-------------------------------------------

Frame #    Frame Bytes    Total Bytes    Scene
-------    -----------    -----------    -----
      1        1309875        1309875    Scene 1
      2             29        1309904   
      3        1315029        2624933   
      4        1017735        3642668   
      5            407        3643075   
      6              3        3643078   
      7              1        3643079   
      8              1        3643080   
      9              1        3643081   
     10              1        3643082     (AS 2.0 Classes Export Frame)

Da fuck... wait.... shouldn't the export frame (frame 10) have the 29kbs? WTH?


Something is up with your file that, regardless of whether I tell it to export to frame 2 or 10, everything is still being loaded in frame 1... unless it appears in later frames.
This isn't normal, but may be something related to AS2. Though, I can't say for certain. I've just never seen flash act the way it just did. Changing MCs to export to frame 2 causing frame 1 jump in size is odd.

At this point I'm just going to start deleting shit to see what takes the biggest part out of the 1.3mbs remain. The sound took 0.7.


Let me delete all the enemies, and "graphic" folder.... no change. at all.... hmm thats odd... maybe there wasn't anything in those folders...
Let me delete 4Objects...
Spoiler (click to show/hide):

Code: Select All Code
Mario is Missing PUT TEST.swf Movie Report
-------------------------------------------

Frame #    Frame Bytes    Total Bytes    Scene
-------    -----------    -----------    -----
      1        1120194        1120194    Scene 1
      2             23        1120217   
      3         702742        1822959   
      4         617072        2440031   
      5            216        2440247   
      6              3        2440250   
      7              1        2440251   
      8              1        2440252   
      9              1        2440253   
     10              1        2440254     (AS 2.0 Classes Export Frame)
Some changes, will move export back to 2.


Good bye Un-categorized folder!... hmm... this is taking for ever to compile now... odd. I don't care if it runs, I'm looking where its putting stuff in the size report. Crashed Flash.
Trying again.
Spoiler (click to show/hide):

Code: Select All Code
Frame #    Frame Bytes    Total Bytes    Scene
-------    -----------    -----------    -----
      1         940484         940484    Scene 1
      2             21         940505     (AS 2.0 Classes Export Frame)
      3           2453         942958   
      4         663415        1606373   
      5            148        1606521   


I went back and ran a similar test with one of my old AT v2 projects to see if AS3 was loading content on frame 1 and got these results. Mind you, Frame 1 is the preloader, Frame 11 is the postloader, (not shown in size data) Frame 21 is the main menu and frame 31 is the game.
version 2.1.png

Spoiler (click to show/hide):

Exporting to frame 5
Code: Select All Code
Frame #    Frame Bytes    Total Bytes    Scene
-------    -----------    -----------    -----
      1          29696          29696    Scene 1
      2              1          29697   
      3              1          29698   
      4              1          29699   
      5        1407654        1437353     (AS 3.0 Classes Export Frame)
      6              1        1437354   
      7              1        1437355   
      8              1        1437356   
      9              1        1437357   
     10              1        1437358   
     11         214592        1651950   

For actionscript validation. Exported to frame 4.
Code: Select All Code
    1          29696          29696    Scene 1
      2              1          29697   
      3              1          29698   
      4        1407654        1437352     (AS 3.0 Classes Export Frame)
      5              1        1437353   
      6              1        1437354   
      7              1        1437355   
      8              1        1437356   
      9              1        1437357   
     10              1        1437358   
     11         214592        1651950   

So, AS3 is properly loading the exported content to the right frame.




In conclusion, I can't find out what is exactly causing all your content to load in frame 1. Exporting to another frame didn't work. Modifying code didn't work. Deleting content worked... but... that defeats the purpose. My only thought right now is that AS2 loads "unassigned" content to frame 1... but I'm also confused when I set all the MCs to export to frame 2, frame 1 exploded in size.

At this point, you may have to consider creating an external pre-loader... I've never personally done any project this way, but it was something I came across while researching causes for your constantly large frame 1. Another option will be to convert to AS3, but seeing how big your file has gotten, trying the external preloader is definitely be a better solution... and also I can't guarantee AS3 will save you.

I'll keep trying different test in the when I have more free time... but I doubt I'll have any luck... something wacky is going on here.

-AA out.
User avatar
AnotherArrow
 
Joined: Fri Oct 29, 2010 3:22 am

Re: Ivan - Problem with the first frame (white screen)

Postby AnotherArrow » Tue May 21, 2013 4:35 am

Ivan-Aedler Wrote:Yes but I didnt find out the root cause (the affecting Mc's) yet. The first frame only contains a black screen with the preloader.
When I remove the 'export to first frame' property in all levels, THEN I must put them anywhere in the timeline (like the frame 2 above).
I hope the playhead wont be laggy when passing over frame 2. There will be HUGE mcs there. I know it will go to frame 3, but I've made some tests and , in fact, Flash does read something in each frame, even putting 'gotoAndPlay' to skip frames.

I had no problems with changing the preloader to skip frame 2. All I did was change the the "play" button in the preloader to use "_root.gotoAndPlay(3)" instead of "_root.play()"
User avatar
AnotherArrow
 
Joined: Fri Oct 29, 2010 3:22 am

Re: Ivan - Problem with the first frame (white screen)

Postby Ivan-Aedler » Tue May 21, 2013 4:42 am

Hmmmmmmmmmmmmmmmmmm
detective.jpg
detective.jpg (20.82 KiB) Viewed 2491 times

AnotherArrow Wrote:I had no problems with changing the preloader to skip frame 2. All I did was change the the "play" button in the preloader to use "_root.gotoAndPlay(3)" instead of "_root.play()"

I know but the game will have a delay of 100 seconds (ONCE!) if you try to skip a given frame with 100 levels, for example.

AnotherArrow Wrote:YOU ARE SO SCREWED!

:o :shock:

AnotherArrow Wrote:At this point, you may have to consider creating an external pre-loader... I've never personally done any project this way, but it was something I came across while researching causes for your constantly large frame 1.

But does that make possible the use of ONE swf only?

AnotherArrow Wrote: Another option will be to convert to AS3, but seeing how big your file has gotten, trying the external preloader is definitely be a better solution... and also I can't guarantee AS3 will save you.

I'm almost choosing that path. I know, the code is huge, but you see that most of it is now in external AS files.

AnotherArrow Wrote:I'll keep trying different test in the when I have more free time... but I doubt I'll have any luck... something wacky is going on here.

Thank you! I'm fighting too!
User avatar
Ivan-Aedler
 
Joined: Fri Jun 03, 2011 6:34 am
Location: GMT -3

Re: Ivan - Problem with the first frame (white screen)

Postby AnotherArrow » Tue May 21, 2013 5:30 am

Ivan-Aedler Wrote: AnotherArrow wrote:I had no problems with changing the preloader to skip frame 2. All I did was change the the "play" button in the preloader to use "_root.gotoAndPlay(3)" instead of "_root.play()"
I know but the game will have a delay of 100 seconds (ONCE!) if you try to skip a given frame with 100 levels, for example.

Odd... let me test.

Since I don't have your levels... lets try a few random things.

I added ~4mbs of bitmaps to frame 2. No problems
Code: Select All Code
Frame #    Frame Bytes    Total Bytes    Scene
-------    -----------    -----------    -----
      1        3158239        3158239    Scene 1
      2        3877526        7035765     (AS 2.0 Classes Export Frame)
      3        1676262        8712027   
      4        1291687       10003714   
      5            513       10004227   


I bit traced 5 of the bitmaps with a 100 color threshold and 1 pixal threshold.
Made it less in size... but with all those vectors, I was expecting some slow down... but got none.
Code: Select All Code
Frame #    Frame Bytes    Total Bytes    Scene
-------    -----------    -----------    -----
      1        2956699        2956699    Scene 1
      2        3484247        6440946     (AS 2.0 Classes Export Frame)
      3        1566106        8007052   
      4        1206803        9213855   
      5            479        9214334   


Drag and dropped over 400 symbols from the library on the stage for frame 2 with the bitmaps still there... successfully crashed flash. =/

My point is, as long as the playhead never reads frame 2, it should never lag. If it is lagging, then most likely its still reading frame 2. After looking at your game setup. It should never have to read frame 2. Ever!
This is the code I was using on the play button in the preloader.
Code: Select All Code
on (release)
{
   //_root.play();
    _root.gotoAndPlay(3);
}
on (keyPress "<Space>")
{
   //_root.play();
    _root.gotoAndPlay(3);
}

Again, I'm also assuming you placed an empty column of frames between 1 and 3. (empty... well.. before you put your levels on them).
User avatar
AnotherArrow
 
Joined: Fri Oct 29, 2010 3:22 am

Re: Ivan - Problem with the first frame (white screen)

Postby Ivan-Aedler » Tue May 21, 2013 7:08 am

AnotherArrow Wrote:Again, I'm also assuming you placed an empty column of frames between 1 and 3. (empty... well.. before you put your levels on them).

Ok I'll do this test with my 25 levels on frame 2!

EDIT: Sorry about the delay, lack of time. I'll still test it.
EDIT2: (updated July 2013) still lack of time, I will print out my discoveries here when I can.
User avatar
Ivan-Aedler
 
Joined: Fri Jun 03, 2011 6:34 am
Location: GMT -3


Return to Tutorials



Who is online

Users browsing this forum: No registered users