Flash CS5.5 freezing on Export/Testing

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

Flash CS5.5 freezing on Export/Testing

Postby The Illusive Man » Sun May 27, 2012 2:58 am

I've been working on one scene in particular which relies heavily on gotoAndPlay and gotoAndStop loops. 8 Positions consisting of 71 individual Action frames to be precise, not including buttons. The basic idea is a "Choice system" with branches out into different scenes, dialogue, and endings depending on your choices.

The problem is that ever since adding the latest "Position" Flash freezes every time I try to export or test the scene.

I know that having a lot of "gotoAndPlay" loops can cause problems, but I'm slowly learning ActionScript, and don't know any alternatives to gotoAndPlay for looping scenes. I'm going to try converting my tweens to keyframes to see if that changes anything, but I'm not holding my breath.

Any suggestions would be greatly appreciated.

Thanks!

- Humanity First.

T.I.M.
"Beware that, when fighting monsters, you yourself do not become a monster... for when you gaze long into the abyss. The abyss gazes also into you."
User avatar
The Illusive Man
 
Joined: Wed Apr 25, 2012 5:12 pm
Location: Undisclosed Location

Re: Flash CS5.5 freezing on Export/Testing

Postby BlueLight » Sun May 27, 2012 8:43 pm

What version of action script? 2
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Flash CS5.5 freezing on Export/Testing

Postby Mr D » Sun May 27, 2012 9:42 pm

I think he uses AS2 since its easier to learn (and he did say he is learning). The only advice i can give you is to switch to CS4 or CS6 since they should be more stable. I personly use CS4 and I do gotoAndPlay and gotoAndStop loops all the time and never had problems with it. Other than that I cant help you.
1 game (oh I mean story slideshow -_-) and 5 flash loop FINISHED...fuck yea
My mini flashes link : http://legendofkrystal.com/forum/viewto ... f=7&t=1972
Also I am working on a project right now.But remember, it's a secret to everybody >:D
User avatar
Mr D
 
Joined: Tue Jun 01, 2010 12:44 am
Location: Alphabet

Re: Flash CS5.5 freezing on Export/Testing

Postby BlueLight » Sun May 27, 2012 9:55 pm

From what AS2 sounds like to me is more of a hack then a real modern programming language.
That's a problem because learning it doesn't ready you for something like java, c, C# or any object ordinate language.
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Flash CS5.5 freezing on Export/Testing

Postby Mr D » Sun May 27, 2012 10:11 pm

yea you could say that AS2 is a hack compared to "real modern programming language". But a lot of people just need to learn how to go to some scene after you press a button and in AS2 you can learn that in 5 minutes with only 2 commands with less than 10letters in them. And you can learn that even if you never worked with any coding before.
And he does not need "java, c or C#" he just need an answer to this 1 problem so he can make his flash game he does for fun.
1 game (oh I mean story slideshow -_-) and 5 flash loop FINISHED...fuck yea
My mini flashes link : http://legendofkrystal.com/forum/viewto ... f=7&t=1972
Also I am working on a project right now.But remember, it's a secret to everybody >:D
User avatar
Mr D
 
Joined: Tue Jun 01, 2010 12:44 am
Location: Alphabet

Re: Flash CS5.5 freezing on Export/Testing

Postby GoRepeat » Mon May 28, 2012 12:53 am

CS5.5 is pretty terrible. Constant crashes, lag, conversion failures. As D said, you are better off taking a step back to 4 or a step up to 6.
Picarto LiveStream: https://picarto.tv/GoRepeat
Other Stuff: Click Here
User avatar
GoRepeat
Moderator
 
Joined: Wed Jul 21, 2010 2:26 am
Location: Behind the Looking Glass

Re: Flash CS5.5 freezing on Export/Testing

Postby The Illusive Man » Mon May 28, 2012 3:45 am

CS5.5 is pretty terrible. Constant crashes, lag, conversion failures. As D said, you are better off taking a step back to 4 or a step up to 6.

Yeah, the whole 5.5 package is pretty bad for that, but given that it's a legal, pre-paid copy, I can deal with its quirks.

think he uses AS2 since its easier to learn (and he did say he is learning). The only advice i can give you is to switch to CS4 or CS6 since they should be more stable. I personly use CS4 and I do gotoAndPlay and gotoAndStop loops all the time and never had problems with it. Other than that I cant help you.


Well then, it appears that I'm using AS1 (Just used default settings). What can I expect from my project if I convert to AS2 or AS3. Will that affect the coding already in place?

In other news, I discovered that the problem may lie in the last "choice" I animated. Removing the new position and pasting it to a new "Scene" allowed both to be played (albeit after some lag), meaning if worse comes to worst, I can divide the whole thing up into two or three scenes and move some of the buttons into my master track to link them together... but I'd much rather have a centralized scene to prevent a similar problem with my master track.

Thanks for the suggestions, and if anyone else has some, I'll be glad to hear them.

On a side note, I'm having difficulty finding the right dimensions to show the scenes without going to full screen, but anything outside of 800 x 200 shows only a part of the background. Any way to change the "Camera Angle" without physically moving every individual frame in every scene?
"Beware that, when fighting monsters, you yourself do not become a monster... for when you gaze long into the abyss. The abyss gazes also into you."
User avatar
The Illusive Man
 
Joined: Wed Apr 25, 2012 5:12 pm
Location: Undisclosed Location

Re: Flash CS5.5 freezing on Export/Testing

Postby BlueLight » Mon May 28, 2012 6:42 pm

I thought they removed AS1 since CS3. AS2 will get the ball rolling faster but it's design with artist in mind. AS3 is more complex and harder to learn but you can go farther with it since it's looks and feels like most programming languages.
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Flash CS5.5 freezing on Export/Testing

Postby OwnerOfSuccuby » Mon May 28, 2012 9:48 pm

I use AS3 now - but i can not say that it is better then AS2. It gives me smaller more than nothing - i only forget AS2 lol :mrgreen: but i did not learn some thing trully new when i start to use it. But i have not got lugs in AS5.5 - i do not like AS5 becouse have some problems in it and i do not use 6 version but CS4 was good i think.

The if then else / function structures is the same in each AS2 and AS3 =) The same for gotoand stop / play.

Add/Remove listeners have a lot of bugs too. So i can say that for me AS2 was more comfortable and faster to make something, then AS3 but i am useing AS3 too long to go to AS 2 again :lol: :mrgreen: There are some differences in work with some externall functions in them and i am a little lazy to learn them :mrgreen:

I little do not understand you problem, but as i know there are loop in each part of krystal in LoK2 AS2 version. So it adds 3 strings of working kod for each part like this every 12 or 24 times in second.

If you want to remove them you can go to a simple way - put it only on first frame of each body part. For example (gotoAndStop(a) where are is a var it can be (parent as movieclip).mylegbodypart for example in AS3 or _root.a).

1)When you will need to change them you will only need to change A and make our part gotoAndPlay(1) - and it will use code in it and go to A.
2)Or you can make function like MyFox where you will have MyFox.Legs.gotoAndStop(a) and etc. for each body part. But some times you will drop ypur parts for 1 frame and then you will have to say it go to that frame again (the first way will make it automatickly, but it will work a little slower).

3)Or you can make like it is now - it always will work as you will need but will eat more PC.

4)Or you can make some thing like that:

1 and 2 is good if your work with a small team 1-3 humans.
3 is good if it is open source - it is easy to use by some body who do not like code
4 is good if there are a lot of peolpe work with it and all parts are changing every day by designers, but it is much harder to share and i think it is not good solution for open source projects based on flash (if you will not do some big portal on flash and you do not want it to be share).

May be i am wrong - and sorry for my bad english again :mrgreen:

Or for example remade version by 2 way of Corta's components.

I had much more batter solution but i can not find it (have more than 100GB of flash now on my computer - so it start look like big box where is imposible to find some thing :mrgreen: ) - it was very very old one solution when i only start it so it is not good i think but as example.

If i did not understand what do you mean then say it more simply please - i am not good in english so i can not understand you some times :mrgreen:
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm

Re: Flash CS5.5 freezing on Export/Testing

Postby BlueLight » Mon May 28, 2012 10:41 pm

I think i get the gist of what your saying. Question about the "If statements" Do you use multiple conditions like
Code: Select All Code
if ((hasGold == ture)&& (hasEnemy == false) || (rating > 75)){....}
I know there will be syntax differences but i want to know if they if statement handle more than one or two things the same between the AS2 and AS3. no reason, just want to know.
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Flash CS5.5 freezing on Export/Testing

Postby OwnerOfSuccuby » Mon May 28, 2012 11:30 pm

BlueLight Wrote:I think i get the gist of what your saying. Question about the "If statements" Do you use multiple conditions like
Code: Select All Code
if ((hasGold == ture)&& (hasEnemy == false) || (rating > 75)){....}
I know there will be syntax differences but i want to know if they if statement handle more than one or two things the same between the AS2 and AS3. no reason, just want to know.


You blow up my mind :lol: i really do not think that i translate it correctly :mrgreen: :D

I test that structure:

Code: Select All Code
var hasGold:Boolean = true;
var hasEnemy:Boolean = false;
var rating:int = 75;

if ((hasGold == true)&& (hasEnemy == false) || (rating > 75)&&(hasGold == true)&& (hasEnemy == false) || (rating > 75)&& (hasEnemy == false) || (rating > 75)&&(hasGold == true)&& (hasEnemy == false) || (rating > 75)&& (hasEnemy == false) || (rating > 75)&&(hasGold == true)&& (hasEnemy == false) || (rating > 75)&& (hasEnemy == false) || (rating > 75)&&(hasGold == true)&& (hasEnemy == false) || (rating > 75)&& (hasEnemy == false) || (rating > 75)&&(hasGold == true)&& (hasEnemy == false) || (rating > 75)&& (hasEnemy == false) || (rating > 75)&&(hasGold == true)&& (hasEnemy == false) || (rating > 75)){
trace("111111");
}

if (hasGold == true) {
   if (hasGold == true) {
      if (hasGold == true) {
         if (hasGold == true) {
            if (hasGold == true) {
               if (hasGold == true) {
                  if (hasGold == true) {
                     if (hasGold == true) {
                        if (hasGold == true) {
                           if (hasGold == true) {
                              if (hasGold == true) {
                                 if (hasGold == true) {
                                   trace("2222")   ;
            
                                 }
                              }
                           }
                        }
                     }
                  }
               }
            }
         }
      }
   }
}


And make it work in cycle by 100+ times and i have no lags. If you think that there can be lugs in it i am not sure that it can be critical in his project to make a lot of lugs in it. I always use not more then 2 operators of (and/or) - and i have newer lugs in it. There i use more than 10 in cycle and no lugs.

But i always have lugs when i use heavy animation - big vector images and etc (music some times). So may be i am wrong - if you will make flash game for your android - do not use heavy vector pictures or big pictures - it lags !
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm

Re: Flash CS5.5 freezing on Export/Testing

Postby BlueLight » Tue May 29, 2012 12:19 am

Having big objects would make some stuff slow down but booleans take so little data that you should worry.
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Flash CS5.5 freezing on Export/Testing

Postby The Illusive Man » Tue May 29, 2012 12:44 am

I use AS3 now - but i can not say that it is better then AS2. It gives me smaller more than nothing - i only forget AS2 lol :mrgreen: but i did not learn some thing trully new when i start to use it. But i have not got lugs in AS5.5 - i do not like AS5 becouse have some problems in it and i do not use 6 version but CS4 was good i think.

The if then else / function structures is the same in each AS2 and AS3 =) The same for gotoand stop / play.

Add/Remove listeners have a lot of bugs too. So i can say that for me AS2 was more comfortable and faster to make something, then AS3 but i am useing AS3 too long to go to AS 2 again :lol: :mrgreen: There are some differences in work with some externall functions in them and i am a little lazy to learn them :mrgreen:

I little do not understand you problem, but as i know there are loop in each part of krystal in LoK2 AS2 version. So it adds 3 strings of working kod for each part like this every 12 or 24 times in second.

If you want to remove them you can go to a simple way - put it only on first frame of each body part. For example (gotoAndStop(a) where are is a var it can be (parent as movieclip).mylegbodypart for example in AS3 or _root.a).

1)When you will need to change them you will only need to change A and make our part gotoAndPlay(1) - and it will use code in it and go to A.
2)Or you can make function like MyFox where you will have MyFox.Legs.gotoAndStop(a) and etc. for each body part. But some times you will drop ypur parts for 1 frame and then you will have to say it go to that frame again (the first way will make it automatickly, but it will work a little slower).

3)Or you can make like it is now - it always will work as you will need but will eat more PC.

4)Or you can make some thing like that:

1 and 2 is good if your work with a small team 1-3 humans.
3 is good if it is open source - it is easy to use by some body who do not like code
4 is good if there are a lot of peolpe work with it and all parts are changing every day by designers, but it is much harder to share and i think it is not good solution for open source projects based on flash (if you will not do some big portal on flash and you do not want it to be share).

May be i am wrong - and sorry for my bad english again :mrgreen:

Or for example remade version by 2 way of Corta's components.

I had much more batter solution but i can not find it (have more than 100GB of flash now on my computer - so it start look like big box where is imposible to find some thing :mrgreen: ) - it was very very old one solution when i only start it so it is not good i think but as example.

If i did not understand what do you mean then say it more simply please - i am not good in english so i can not understand you some times


Fair Enough,

Basically, I'm using the simplest of loops:

1 frame will be called "position a"
At the end of the animation I'll throw in actionscript saying something like

gotoAndPlay ("position a");


and in another frame underneath it I will have a button which is set up with
on(release){
gotoAndPlay("position b");
}


This creates the loop for Position A, with a button to force it to move to Position B.


Other Times I will have one frame named "choice" and add actionscript saying:
gotoAndStop ("choice");


with two buttons. linked to "submit" and "resist" positions to move on.

This is what I'm trying to create, and how far I've come.
Attachments
SCENE DESIGN.jpg
"Beware that, when fighting monsters, you yourself do not become a monster... for when you gaze long into the abyss. The abyss gazes also into you."
User avatar
The Illusive Man
 
Joined: Wed Apr 25, 2012 5:12 pm
Location: Undisclosed Location

Re: Flash CS5.5 freezing on Export/Testing

Postby OwnerOfSuccuby » Tue May 29, 2012 1:23 am

BlueLight Wrote:Having big objects would make some stuff slow down but booleans take so little data that you should worry.


I mean some thing like big images :mrgreen: Just for example:

Just for example (i made a lot of mistakes when i made it so i can show them like samples now :lol: ):

1)This is the simple algoritm - it is much much more simple then my tank game - but it use 50 % of PC
2)When i make it smaller it eats less PC by half (25%)
3)My tank game eat 25% of PC - but its algoritms is much more heavyer. http://ownerofsuccuby.narod.ru/news/flashnews/17.swf
4)The base tank algoritms eats 8-10% of PC usage but it lugs some times. http://ownerofsuccuby.narod.ru/news/flashnews/8.swf
5)http://ownerofsuccuby.narod.ru/news/flashnews/14.swf - there are no algoritms - but when you start to move text it use 30% of PC
6)When the gotoandplay is used (you can see as cicle PC usage go UP):.

It is my test site so i test a lot of thingth there (i am lazy to remake it normally :lol: :mrgreen: - but some times like now they are useful).

Why do it lugs ? There are 4 reason - that i found.

Long long time ago i try to make all on timer - but timer in flash works like shit - so i remove it - all become beter.

Then when i go that way there are frame rate - if it is lesser then less lugs.

1)But what is interesting: my first example - very very easy code - but lugs like shit - why ?
The answer is simple. I use very big objects and then resixze them in smaller one. But why when i resize it to more smaller it starts worl better ?
Then smaller your object that you move are then less it lugs. If you move some thing big, even if it is not hard by animation - it starts lug.
2) 3 - i use very heavy animation of tanks and objects. Tank have real size like 400*400 or 500*500 but its size in game is 60*60 or some thing like that.
If i will use picture 60 * 60 it will be lesser lugs but i found it in the internet and did not change, then i resized it so many times that it is not so simple to remake it better now - when image is resized in 10 differents objects some problem with coordinates starts =(
3) 4- has the same algoritms as 3 but very light animation - why do it lugs on some window resolution ? The answer is simpl - i resized it many times in different components. If you have image for example with with and height 7*7 and resize it to size 4*4 in your object and then make the window of your browser make it to resize to 3*3 - it starts lugs again (i thing becouse it start to round its proportion in pixels by the browser window or some problems when it try to calculate x and y).

The latest version of my algoritms that i made for some thing like LoK game (it was in progress but i have problems with time now) - i moove big objects / move heavy algoritms and animations - but it works faster then the base LoK2 version and all my other projects - why is it so ?

4) Each time you use redrawing your object you use PC. I did not make my 1-3 mistakes. And i redraw each object once - like i show in the *.fla (Zip files i post earlyer). Lok 2 as2 version try to redraw each object by more (i do not know 12 or 24 frames per second it is - all my stuf is 24 per second) 12 (or 24) times per second - when it try to understand what kind of armoris on. It is good when you use 1 characters - but as you can see there where a lot of games in internet based on LoK2 version - so when there where more then 2-3 character each made on that algoritm it start lugs.

If you redraw object it will stay in that fraim until it will be removed from 1 or more frames on your movie. If it was on 1/2/3/4/5 frames and it will be removed in 6 and apears in 7 - you have to redraw it again becouse it will go to and play 1 st frame automatically.

So all that code you can put on the first frame and even if you will forgot to redraw it directly it can make it by itself.
When you need to change gear you can make function on confirm button that will redraw your character to new armor or gotoand play 1st frame of it - where it will be the function that will redraw it by go to and stop ("xArmor") frame.

Sorry for my bad english again.
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm

Re: Flash CS5.5 freezing on Export/Testing

Postby The Illusive Man » Wed May 30, 2012 2:44 am

I see where you're coming from, and size is probably the problem. My background frames are 2553 x 1386, and the BG moves sometimes to adjust the "camera frame." On just the new position alone the performance goes from 4% to 25%. Means I'll probably have to resize everything, but that might fix other problems too.

Thanks!

- Humanity First
"Beware that, when fighting monsters, you yourself do not become a monster... for when you gaze long into the abyss. The abyss gazes also into you."
User avatar
The Illusive Man
 
Joined: Wed Apr 25, 2012 5:12 pm
Location: Undisclosed Location

Re: Flash CS5.5 freezing on Export/Testing

Postby OwnerOfSuccuby » Wed May 30, 2012 10:58 am

Moving only BG can not be a big problem i think. I try to move 4000*1500. If you move bigger one then yes may be. Some times big units are seporated on a smaller one and load dinamicly in progress of game. But if ypur BG have a hard structure with a lot og objects than may be.

May be there a a lot of objects that are moving on your map (baground) when they are out of camera range ? Try to on/off them than they are in/out of view.

If you move a lot of objects with Alpha<100 - i hear that it will lug more (but i do not test it).

Some day i saw good solution where some guy move thousands of object and had no lugs. It was my very big mistake i did not learn how to make that - i could not find that tutorial now and a little stuck in it =)
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm


Return to Tutorials



Who is online

Users browsing this forum: No registered users