A Flash Developer Resource Site

Search:

Type: Posts; User: Multihunter

Page 1 of 2 1 2

Search: Search took 0.02 seconds.

  1. Replies
    5
    Views
    801

    I uhh... I may have caused it to happen again......

    I uhh... I may have caused it to happen again... I have no idea why, but when I moved it from a movieclip into an as file it started being unable to work out the proper possible directions again...
    ...
  2. Replies
    1
    Views
    970

    ok, so I got it working by making the actual...

    ok, so I got it working by making the actual drawing part a function and calling the function; why is it that THAT works?
  3. Replies
    1
    Views
    970

    Draw a shape inside a movieclip

    I have a class; "Game".
    I have a bitmap in the library; "Grass"
    I want to be able to run a function from the main timeline that uses the bitmap inside of a movieClip.
    My current attempt is as...
  4. Replies
    5
    Views
    801

    I did, I just had to add in the...

    I did, I just had to add in the "TileArray[CurrentSection][0]=1;"
  5. Replies
    5
    Views
    801

    Ok, thanks for doing that, but I already had code...

    Ok, thanks for doing that, but I already had code for drawing it, I just wanted to know why my while loop wasn't working, and I see you worked it out too. I realised like 5 minutes after I turned my...
  6. Replies
    5
    Views
    801

    What's wrong with my code?

    Using the source code on this webpage as a guide, I've basically re-written it in AS3. Unfortunately, it doesn't work as it should.

    I've attached the code that I am using that is just in the root...
  7. Replies
    3
    Views
    701

    Oh, ok, by "error" I meant find out which line is...

    Oh, ok, by "error" I meant find out which line is unable to run. Then use that to follow where the error is coming.
    For trace(), when you put:

    trace("Hello")
    It will put "Hello" in the output...
  8. Ok, so if I understand correctly, you have: ...

    Ok, so if I understand correctly, you have:

    var count:uint = count+1
    looped?

    You're declaring it a new variable every loop. You only need to delcare it once, so at the beginning of your code...
  9. Replies
    1
    Views
    535

    Absolute directory

    I want to reference an object at what would have been at _level0 or _root in AS2, but I don't know how to do it in AS3...
  10. Well, really var count will be the equivalent of...

    Well, really var count will be the equivalent of your ImageNumber, so:

    if (count >= numberOfImages) {
    count = 0
    }

    Just watch where you put that stuff; make sure that count isn't going to...
  11. Replies
    3
    Views
    701

    You could always manually check over all the...

    You could always manually check over all the places where the things is modified in some way.
    If you use the error and trace() to find out WHERE it becomes undefined you can know WHY it is.
  12. Replies
    9
    Views
    1,064

    I use arrays for this kind of thing. I don't...

    I use arrays for this kind of thing.
    I don't know if it's the most efficient method, but it works fine for me... until I get too complicated for myself to follow, but, you know... it works.

    What...
  13. Replies
    19
    Views
    12,311

    Nice try, Eager Beaver, but; -That ones...

    Nice try, Eager Beaver, but;
    -That ones collision detection is no better than a simple: "If the distance between them will be the averaged(?) radius next frame, then they have collided".
    -They...
  14. Replies
    8
    Views
    5,797

    EDIT: When you are colliding two objects, you do...

    EDIT: When you are colliding two objects, you do a for() loop on the array inside of itself, so each one is checked against every other one. There is a way to optimise that, since a lot of the...
  15. Replies
    8
    Views
    5,797

    EDIT3: Yeah, read this part first. What you are...

    EDIT3: Yeah, read this part first. What you are going to eventually have to do is put all of the circles into an array and then check each circle against each other. I'm too tired to explain how to...
  16. Replies
    8
    Views
    5,797

    Cool, I have my own method? Yeah. It's flawed...

    Cool, I have my own method?
    Yeah. It's flawed in the timing, but the math is fine. I was going to go in and fix up the timing somewhat. In fact I will do that now! (As a side note, at the moment I...
  17. Replies
    8
    Views
    5,797

    Ok, if you are only going to do it approximately,...

    Ok, if you are only going to do it approximately, you only have to check each frame whether they are touching by measuring the distance between them. Which, we use pythagora's rule of c^2 = a^2 +...
  18. Replies
    19
    Views
    12,311

    Thank you newblack, you helped me so much. I...

    Thank you newblack, you helped me so much. I didn't realise that it was so simple; dx was the proportion of the xvelocity that takes part in the collision! My problem was that I over complicated the...
  19. Replies
    19
    Views
    12,311

    Ok. We did a lot on graphs last year in Maths, so...

    Ok. We did a lot on graphs last year in Maths, so I decided to try once again to work it out with gradients, see if it looked like what the vectors were and see if I could link them or come up with...
  20. Replies
    19
    Views
    12,311

    Well that last bit was edited in before the...

    Well that last bit was edited in before the "earlier" edit, hence the 2 next to it to indicate it came later.

    If you look at the original formula you gave for impulse; j = ( -( 1 + e ) * ( m1v1 -...
  21. Replies
    19
    Views
    12,311

    Ok, nearly there (I think). I worked out that...

    Ok, nearly there (I think).

    I worked out that according to that you had there;
    Momentum of Circle1 - Momentum of Circle2 = dx*dvx + dy*dvy
    How does that work?
    EDIT2: Maybe that's the dot...
  22. Replies
    19
    Views
    12,311

    Ok, I now have a much better understand of where...

    Ok, I now have a much better understand of where this is all coming from.
    Thank you.

    Just... I still can't quite figure out what you've done there...
    When you normalised dx and dy, you made it...
  23. Replies
    19
    Views
    12,311

    So what you have in the "resolve" function is: ...

    So what you have in the "resolve" function is:


    var cn:Vec2D = w.normal;
    var dv:Vec2D = p.v;
    var impulse:Number = cn.dot( dv.times( -2 ) ) / cn.dot( cn.times( 1 / p.mass ) );
    p.v.plusEquals(...
  24. Replies
    19
    Views
    12,311

    That's a useful formula, it does help, but it...

    That's a useful formula, it does help, but it doesn't explain how your 6 lines of coding works.
    Sorry I'm not understanding; I shouldn't expect you to explain it all, I'm sure I would be able to get...
  25. Replies
    19
    Views
    12,311

    WAIT A SECOND! Are you using the dot product to...

    WAIT A SECOND! Are you using the dot product to calculate where it would be if it collided between frames?
Results 1 to 25 of 50
Page 1 of 2 1 2




Click Here to Expand Forum to Full Width

HTML5 Development Center