gRiD_89a User
 Posts: 0 | Re: My First INTERACTIVE Tron Flash Animation on Saturday, February, 04, 2006 3:30 AM
if you sent me the .fla I could take a look and make suggestions  order abortion pill http://unclejohnsprojects.com/template/default.aspx?morning-after-pill-price where to buy abortion pillwhere to buy abortion pill abortion types buy abortion pill online
|
wwwmwww User
 Posts: 1,230 | Re: My First INTERACTIVE Tron Flash Animation on Saturday, February, 04, 2006 10:41 AM
Boingo_Buzzard Wrote:
I was wondering who would catch that. The problem I faced is that the turret and tank body are two separate objects. However, they have to rotate at the same angle. The tank body rotates at a different axis than the turret does. In Flash the center of rotation is the center of the image, so the center of the turret and the center of the tank are different. I had to compromise by making the center of the turret and the tank the same, by offsetting the tank body to match the center of the turret (e.g. increasing the image area size). This, unfortunately, makes the tank body rotate off-center.
Kudos to Todd for catching this. Do you have a solution by any chance?
|
This jumped out at me too. Still I find this very cool so don't take that as a negative. I know zero about flash so I don't have a flash solution for you however I know how I'd deal with this in POV-Ray so something similiar might work in flash.
(1) Assume the tank is always pointing in the x-direction and centered on positioned at 0,0.
(2) Assume the turret is also cenetered at 0,0 and pointing forward (also the x-direction). The turret isn't in the correct position relative to the tank but that's ok.
(3) Apply the rotation needed to the turret to get it pointed in the direction relative to the tank that you want.
(4) Translate the turret so it's center will be over the location it should be on the tank. This position is fixed, remember the tank is always at 0,0 facing in the x-direction. The translation will not affect the turrets rotation.
(5) You should now have an image of the tank with the turret properly position and pointing in the right direction. Now apply the rotation you need to get the tank pointing in the direction you want to this image.
(6) Finally apply the translation you need to get the tank where you want it on the grid.
I hope that helps,
Carl
 |
Boingo_Buzzard User
 Posts: 0 | Re: My First INTERACTIVE Tron Flash Animation on Saturday, February, 04, 2006 12:25 PM
Actually, I think I may be able to do this in the code. ActionScript allows you to apply whatever action you just did on an object to any other root object. So I can have the tank body centered, and the turret off-center so it spins at the dome (not the center of the barrel), but apply movement to both at the same rate, just offset the x-y values for the turret so it's positioned over the tank in the correct spot. That might work.
Grid_89 I may try that out, but thanks for the offer.
where to buy abortion pill ordering abortion pills to be shipped to house buy abortion pill online
 |
Boingo_Buzzard User
 Posts: 0 | Re: My First INTERACTIVE Tron Flash Animation on Saturday, February, 04, 2006 1:09 PM
Well, that didn't work at all  I still have two seperate x-y coordinates of rotation, so the turret doesn't stay in the same spot in relation to the tank body as they rotate. There may be some mathmatical way to tell the turret where it's supposed to be in relation to the body at all times, but I'll never figure that out.
EDT: Actually sitting here thinking about it, the problem is that I need to different points of rotation for the turret. Center, for when it rotates with the tank, and Off-Center at the dome for when it rotates by itself. Grid_89a, can ActionScript specify the point of rotation for a symbol? I checked out the parameter for the "_rotation" property and didn't see where I could do that.
order abortion pill http://unclejohnsprojects.com/template/default.aspx?morning-after-pill-price where to buy abortion pillabortion pills online abortion pill online purchase cytotec abortion  |
Capt_Capacitor User
 Posts: 0 | Re: My First INTERACTIVE Tron Flash Animation on Saturday, February, 04, 2006 2:22 PM
this has the makings of a fun and addictive flash game, very nice program 
All that is visible must grow beyond itself, and extend into the realm of the invisible
"and it glows like...TROOOOOON!!!!" - Tommy Talirico
"Nice, now you can have hours of fun playing with your thick glowing rod " - Me
|
Sketch Sector Admin
 Posts: 2,939 | Re: My First INTERACTIVE Tron Flash Animation on Saturday, February, 04, 2006 3:16 PM
Looks great Bongo. Can't wait to see what this leads to.  order abortion pill http://unclejohnsprojects.com/template/default.aspx?morning-after-pill-price where to buy abortion pill https://www.flickr.com/photos/blue_bezel/ |
Boingo_Buzzard User
 Posts: 0 | Re: My First INTERACTIVE Tron Flash Animation on Wednesday, February, 15, 2006 1:27 PM
I need some math help. Hopefully there are some mathmaticians in our group. I need a math formula.
I am trying to "orbit" one object around another in Flash.
Given that object 1 will have a x and y value on a grid of a certain number (doesn't matter what), and that the value of rotation will be a constant (1 to 180 moving right and 1 to -180 moving left), I want to offset object 2's x and y value when the rotaional value is 0 at object1's x -15 and y-42 and then have it maintain that orbit (meaning object 2's x and y value offset would be maintained by whatever the rotation value is.)
Any help?
 |
TheReelTodd Sector Admin
 Posts: 0 | Re: My First INTERACTIVE Tron Flash Animation on Wednesday, February, 15, 2006 5:47 PM
Boingo_Buzzard Wrote:
I need some math help. Hopefully there are some mathmaticians in our group. I need a math formula.
I am trying to "orbit" one object around another in Flash.
Given that object 1 will have a x and y value on a grid of a certain number (doesn't matter what), and that the value of rotation will be a constant (1 to 180 moving right and 1 to -180 moving left), I want to offset object 2's x and y value when the rotaional value is 0 at object1's x -15 and y-42 and then have it maintain that orbit (meaning object 2's x and y value offset would be maintained by whatever the rotation value is.)
Any help? |
Um...
Carl!
Quick - light up the wwwmwww signal...
...and I'm sure he'll come running in with a quick formula for you! 
        
|
MCPcomputer User
 Posts: 1,945 | Re: My First INTERACTIVE Tron Flash Animation on Thursday, February, 16, 2006 3:24 AM
That's very cool...
The tank is nice..
reminds me of like a mini micro machine tank!
Nice job can't wait to see it when you add sound
and make it fire!
"I want him in the games until he dies playing" -MCP
The Grid a Physical Frontier funny Tron Videohttps://www.youtube.com/watch?v=xaMViP_QtZ8 |
wwwmwww User
 Posts: 1,230 | Re: My First INTERACTIVE Tron Flash Animation on Thursday, February, 16, 2006 9:38 AM
TheReelTodd Wrote:
Um...
Carl!
Quick - light up the wwwmwww signal...
...and I'm sure he'll come running in with a quick formula for you!  |
I can probably help. I was out of town yesterday as my father was back in the hospital. It's going to take me most of today to get caught up so if this can wait till tomorrow or maybe this weekend I'd be happy to see what I can come up with.
Carl
 |
Kamui User
 Posts: 0 | Re: My First INTERACTIVE Tron Flash Animation on Thursday, February, 16, 2006 9:42 AM
TheReelTodd Wrote:Boingo_Buzzard Wrote:
I need some math help. Hopefully there are some mathmaticians in our group. I need a math formula.
I am trying to "orbit" one object around another in Flash.
Given that object 1 will have a x and y value on a grid of a certain number (doesn't matter what), and that the value of rotation will be a constant (1 to 180 moving right and 1 to -180 moving left), I want to offset object 2's x and y value when the rotaional value is 0 at object1's x -15 and y-42 and then have it maintain that orbit (meaning object 2's x and y value offset would be maintained by whatever the rotation value is.)
Any help? |
Um...
Carl!
Quick - light up the wwwmwww signal...
...and I'm sure he'll come running in with a quick formula for you!  |
We really need to make an wwwmwww signal. Hey... now there's a new quickly Flash project for me. *Runs off and tackles Flash like a football player*
~Kamui.EXE
===========================
What should I put here today?
http://mediamaniacgeek.blogspot.com/
TALES OF A MEDIA GEEK |
Boingo_Buzzard User
 Posts: 0 | Re: My First INTERACTIVE Tron Flash Animation on Thursday, February, 16, 2006 9:42 AM
wwwmwww Wrote:
I can probably help. I was out of town yesterday as my father was back in the hospital. It's going to take me most of today to get caught up so if this can wait till tomorrow or maybe this weekend I'd be happy to see what I can come up with. |
No rush, any help is appreciated. Hope your Father is doing better.
order abortion pill abortion pill buy online where to buy abortion pill  |
Boingo_Buzzard User
 Posts: 0 | Re: My First INTERACTIVE Tron Flash Animation on Thursday, February, 16, 2006 9:55 AM
Kamui Wrote:Hey... now there's a new quickly Flash project for me. *Runs off and tackles Flash like a football player*
|
Just FYI, I am looking for ActionScript code that will orbit a "child" based on the "parent's" rotation. Not a Flash Movie.
 |
Kamui User
 Posts: 0 | Re: My First INTERACTIVE Tron Flash Animation on Thursday, February, 16, 2006 12:57 PM
Boingo_Buzzard Wrote:Kamui Wrote:Hey... now there's a new quickly Flash project for me. *Runs off and tackles Flash like a football player*
|
Just FYI, I am looking for ActionScript code that will orbit a "child" based on the "parent's" rotation. Not a Flash Movie.
|
*Rapid pause and skids in to an LC wall* I was referning to a little Flash loop about wwwmwww signal. But I can poke my head around for a code if you'd like. ^^
~Kamui.EXE
where to buy abortion pill ordering abortion pills to be shipped to house buy abortion pill online ===========================
What should I put here today?
http://mediamaniacgeek.blogspot.com/
TALES OF A MEDIA GEEK |
Boingo_Buzzard User
 Posts: 0 | Re: My First INTERACTIVE Tron Flash Animation on Thursday, February, 16, 2006 1:01 PM
Kamui Wrote:I was referning to a little Flash loop about wwwmwww signal. But I can poke my head around for a code if you'd like. ^^
|
Ahhhh... gotcha. Yeah I need this solution to be able to impliment tank firing. I found some examples online, so maybe I can work from that. Or Carl or you will come to my resuce
where to buy abortion pill abortion types buy abortion pill online  |
Kamui User
 Posts: 0 | Re: My First INTERACTIVE Tron Flash Animation on Thursday, February, 16, 2006 1:11 PM
Boingo_Buzzard Wrote:Kamui Wrote:I was referning to a little Flash loop about wwwmwww signal. But I can poke my head around for a code if you'd like. ^^
|
Ahhhh... gotcha. Yeah I need this solution to be able to impliment tank firing. I found some examples online, so maybe I can work from that. Or Carl or you will come to my resuce
|
I'll see what I can figure out. If I can't get anything going, I'll at least toss in a "complementary" preloader for you. ^^
~Kamui.EXE
===========================
What should I put here today?
http://mediamaniacgeek.blogspot.com/
TALES OF A MEDIA GEEK |
wwwmwww User
 Posts: 1,230 | Re: My First INTERACTIVE Tron Flash Animation on Thursday, February, 16, 2006 5:18 PM
Boingo_Buzzard Wrote:
I am trying to "orbit" one object around another in Flash.
|
I don't know flash so I can't give you flash code but I like to think I know math or at least enough math.
Boingo_Buzzard Wrote:
Given that object 1 will have a x and y value on a grid of a certain number (doesn't matter what),
|
Ok... object 1 is at (x1,y1).
Boingo_Buzzard Wrote:
and that the value of rotation will be a constant (1 to 180 moving right and 1 to -180 moving left),
|
I take this to mean the angle of rotation can vary from -180 degrees to +180 degrees. I further assume object 1 is the base of the tank and this angle is being used to define the orientation of the base of the tank. Is that correct? If so, lets call this angle theta.
Boingo_Buzzard Wrote:
I want to offset object 2's x and y value when the rotaional value is 0 at object1's x -15 and y-42 and then have it maintain that orbit (meaning object 2's x and y value offset would be maintained by whatever the rotation value is.)
|
Object 2 I take it is the base of the turret. Correct? So what you want is x2 defined in terms of x1, y1, and theta and the same for y2. At least I think that is what you are after.
In that case I need to define 2 other constants:
r1 = sqrt(15^2+42^2) = 44.59821...
t1 = atan(-42/-15) = 250.3462... degrees
x2 = x1 + r1*cos(-theta+t1)
y2 = y1 + r1*sin(-theta+t1)
You must make sure your sin and cos functions take input in degrees otherwise you'll need to convert to radians first. I've also assumed rotation to the right to mean clockwise. If I have the direction of rotation backwards switch to these:
x2 = x1 + r1*cos(theta+t1)
y2 = y1 + r1*sin(theta+t1)
I hope this helps...
Carl
 |
Boingo_Buzzard User
 Posts: 0 | Re: My First INTERACTIVE Tron Flash Animation on Thursday, February, 16, 2006 5:25 PM
I'll give it a shot. Thanks!
 |
wwwmwww User
 Posts: 1,230 | Re: My First INTERACTIVE Tron Flash Animation on Thursday, February, 16, 2006 5:36 PM
I just corrected a sign error I had above. Anyways... I just made this quick excel file to check my math. It seems to work...
If you'd like a copy I can email it to you,
Carl
 |
Boingo_Buzzard User
 Posts: 0 | Re: My First INTERACTIVE Tron Flash Animation on Thursday, February, 16, 2006 6:25 PM
Sure, that would be great. I PM'ed you my e-mail address.
order abortion pill abortion pill buy online where to buy abortion pill
 |
|