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.
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.
if ((hasGold == ture)&& (hasEnemy == false) || (rating > 75)){....}
BlueLight Wrote:I think i get the gist of what your saying. Question about the "If statements" Do you use multiple conditions likeI 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.
- Code: Select All Code
if ((hasGold == ture)&& (hasEnemy == false) || (rating > 75)){....}
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") ;
}
}
}
}
}
}
}
}
}
}
}
}
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 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 There are some differences in work with some externall functions in them and i am a little lazy to learn them
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
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 ) - 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
gotoAndPlay ("position a");
on(release){
gotoAndPlay("position b");
}
gotoAndStop ("choice");
BlueLight Wrote:Having big objects would make some stuff slow down but booleans take so little data that you should worry.
Users browsing this forum: No registered users