|
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Member
Join Date: Aug 2007
Posts: 34
|
on enterframe makes the balls fly out in differant directions from the Stage center
Hi,
Gude me to on enterframe makes the balls fly out in differant directions from the center of the Stage. ThankX. Praful |
|
|
|
|
|
#2 |
|
Student
Join Date: Apr 2001
Location: -
Posts: 4,756
|
please DON´T create multple threads on the same matter.
__________________
my new home: polycount old: Curing C. tech | Curing C. designs | tank | ortho. | zelda LTTP | Tile Edit. | scrolling 3d: 3d engine kit | ASE format | 3d binary format |
|
|
|
|
|
#3 |
|
Member
Join Date: Aug 2007
Posts: 34
|
Hi,
Sir tell me How you make the balls fly out in differant directions? |
|
|
|
|
|
#4 |
|
Feeling adventurous?
Join Date: Mar 2004
Posts: 850
|
You could just use ANGLE = Math.random*360; beware that this is in degrees, you probably need to convert it to radians to use in Math.cos and sin, just look in flash help for how to do that.
__________________
I don't have a photograph, but you can have my footprints. They're upstairs in my socks. |
|
|
|
|
|
#5 | |
|
crossconscious
Join Date: Sep 2005
Location: Belgium
Posts: 1,186
|
Quote:
Seriously mate, you post two threads on the same topic, someone points out ttat that's not appropriate behaviour, and you tell them - not ask them politely, no, you tell them - to explain something to you.
__________________
www.crossconscious.com |
|
|
|
|
|
|
#6 | |
|
Member
Join Date: Aug 2007
Posts: 34
|
Sorry for the language that i used.
Quote:
i tryed, to do it of my own, one movieclip in moving,but remaing duplicates are not changing there angles and not moving. Thanks. Praful. |
|
|
|
|
|
|
#7 |
|
Feeling adventurous?
Join Date: Mar 2004
Posts: 850
|
Then posting what you have done usually helps, because then you show that you actually have tried. Also post the code you have written, then maybe we can help you rewrite it so it works
__________________
I don't have a photograph, but you can have my footprints. They're upstairs in my socks. |
|
|
|
|
|
#8 |
|
Student
Join Date: Apr 2001
Location: -
Posts: 4,756
|
we are NOT here to do other´s work, come with something that can be discussed about like T1ger suggested.
It propably will a onEnterFrame event and some trigonometry- but lets first show us what you got
__________________
my new home: polycount old: Curing C. tech | Curing C. designs | tank | ortho. | zelda LTTP | Tile Edit. | scrolling 3d: 3d engine kit | ASE format | 3d binary format |
|
|
|
|
|
#9 |
|
Member
Join Date: Aug 2007
Posts: 34
|
Hi,
T1ger this is the code: stop(); speed = .2; angle = 0; raj.onEnterFrame = function() { speed += speed; angl++; xpos = Math.cos(speed); ypos = Math.sin(speed); for (p=1; p<=6; p++) { this["raj"+p]._rotation = angl; this["raj"+p]._x += xpos; this["raj"+p]._y += ypos; } }; |
|
|
|
|
|
#10 |
|
Feeling adventurous?
Join Date: Mar 2004
Posts: 850
|
I guess you have dragged 6 movieclips onto the stage and named them raj1 - raj6? Alternative to this is to create them dynamically. Right click on the MC in the library, and click "linkage", choose export for actionscript, and write "ball" in the identifier input field, then ok.
then you can put this in first frame: PHP Code:
__________________
I don't have a photograph, but you can have my footprints. They're upstairs in my socks. |
|
|
|
|
|
#11 | |
|
Member
Join Date: Aug 2007
Posts: 34
|
Thanks for the help.
Quote:
Hi T1ger this script works exectly i wanted to, Thakns once again for your help. do you suggest any book or any article on the net to developed the scripting skill Thanks once again! Regards. Praful. |
|
|
|
|
|
|
#12 |
|
Feeling adventurous?
Join Date: Mar 2004
Posts: 850
|
Read the readme-thread http://board.flashkit.com/board/showthread.php?t=513006 if you havent already, and google tonypa, and read his excellent tile tutorials. They learn you making tile-based games, but also syntax and scripting
__________________
I don't have a photograph, but you can have my footprints. They're upstairs in my socks. |
|
|
|
![]() |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|