-
hello AS3.0
In a new design I am trying to do without the library and put objects directly on stage
This makes it easier for us and shortens a lot of codes that I didn't understand
So I designed a new design and put all the things on stage directly and wrote the first code, but I want you to help in completing the game
And because you are an expert and love to help beginners like me, so I want to explain each line of code so that I can understand

new file link
http://www.mediafire.com/file/vyv9z8...yle+2.swi/file
-
Client Software Programmer
I did one that uses math: download
just 1 bug to fix when I get back later is hitting the 20 balls full speed first shot the stick didnt show.
-
Client Software Programmer
bug fixed: download
A balls xvel or yvel wasn't going down to exactly 0 it was staying at decimals
-
It seems to me that you are talking to someone as experienced as you, but I am not. I would like if you would like to explain to me step by step how to build the game from scratch in this file
I will be a happy student
http://www.mediafire.com/file/vyv9z8...yle+2.swi/file
-
Client Software Programmer
For a video presentation it would have to be done using as3 in animate cc not in swish. Would that be ok? I am very new to the swish IDE and I see you can accomplish more using the swish graphics tools. With as2 I am alittle slow because I do not study as2 anymore but I remember the syntax. Or you are asking for comments? I did not get to comments yet.
Last edited by AS3.0; 02-27-2021 at 02:43 AM.
-
I put the objects directly on the stage. This will shorten a lot of codes and the codes will be directly without calling from the library.
Let's get started together
=========================
PHP Code:
onFrame (1) { // start action in frame 1
stop() // stop in frame 1
newgame.onPress=function() { // when i press the newgame buuton
if(Combo_silver.value.text =="choose the number of balls"){ // if user not choose the number of the balls
// not do any thing
}
else if(Combo_silver.value.text ==7){ // if user choose number 7
balls.gotoAndStop(7); // in frame 7 there are 7 balls placed
poolstick.gotoAndStop(2); // red poolstick appear in farame 2 but blue poolstick appear in farame 3
}
else if(Combo_silver.value.text ==10){ // if user choose number 10
balls.gotoAndStop(10); // in frame 10 there are 10 balls placed
poolstick.gotoAndStop(2); // red poolstick appear in farame 2 but blue poolstick appear in farame 3
}
}
}
===============================
Now coding gets easier.
But I do not know where to complete the rest of the codes because it is complex and has many variables and functions
can you try to this file please
-
now you can use the name of any object directly
for example
PHP Code:
_root.poolstick
_root.balls
_root.tablearea
-
Client Software Programmer
Yes I will put the comments if I have time this coming morning.
Last edited by AS3.0; 02-27-2021 at 03:29 AM.
-
-
Client Software Programmer
No I will make an admin tool that lets us design the ball placement and it will generate an array to place the balls for that level design.
-
you are the professor , in this case you need a lot of codes because colors and digit numbers of each balls .
but you can use directly
PHP Code:
_root.balls["Blue_ball"+i]
_root.balls["Red_ball"+i]
good luck and happy time
-
Client Software Programmer
I did 100 lines of comments so far, I will need more time:
I will move your new design to the program I am updating afterwards.
swish file: download
-
-
Client Software Programmer
You can not play with the balls you edit yet, but you can design maps with the editor:
to edit map:
click edit map > drop balls anywhere
use scroll wheel to change ball frame
click red X button to stop edit
to move placed ball:
click red x
hold ctrl + click multiple balls you want to move
use arrow keys to move the balls
or to delete ball click ctrl on multiple balls at once and click 'z' to delete
save map to clipboard
paste your clipboard into the program var map at the top and the number of array it is in is the number to type in the swf and click ok to load it
or do you prefer your way which was to put the balls in the stage in each frame
Not finished: download
Last edited by AS3.0; 03-01-2021 at 03:43 PM.
-
I will come back later after my exam is over
-
Client Software Programmer
ok, ill finish the editor when you tell me this method is ok. What course are you taking?
-
Client Software Programmer
-
Client Software Programmer
2 tray areas 1 for red, 1 for blue: download
the program didn't come with the best code to enter the tray to begin with so it leaves spaces.
Last edited by AS3.0; 03-02-2021 at 03:23 PM.
-
hello AS3.0
I was busy days gone
I am trying to reprogram the file again
-
Client Software Programmer
Ok I left off on post #78 where I put 2 tray areas 1 for blue ball, 1 for red, and the white ball just disappears. I was studying for some other projects when you left. I will add some more comments in the program but first tell me what else is missing and if the comments I left upto line 100 is understandable
Last edited by AS3.0; 03-30-2021 at 12:29 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|