A Flash Developer Resource Site

Search:

Type: Posts; User: nicolanicola

Page 1 of 3 1 2 3

Search: Search took 0.02 seconds.

  1. ok I think I get it. So if I store say...

    ok I think I get it. So if I store say level.brick inside an array in parent_mc.level, then what does it store? Because I thought if I was saying in my parent_mc removeChild(brick) that I am...
  2. *deleted*

    *deleted*
  3. can't remove children and not sure how to solve it

    Think I'm missing a fundamental here with AS3. Another poster suggested all the bricks I am adding to my program should be added to an array for ease for looping rather than looping through all the...
  4. Ahh I see, thank you.

    Ahh I see, thank you.
  5. I was just trying to call a function that had set...

    I was just trying to call a function that had set up bonus_mc and added t the stage. The bonuses needed certain parameters such as the x value etc in order to add them. I wasn't trying to get a...
  6. in fact ignore that, I missed a bracket off

    in fact ignore that, I missed a bracket off
  7. [RESOLVED] Can I add parameters to an event listener's function?

    I'm trying and it doesn't seem to like it. I'm guessing it's not possible?

    :

    bonus.addEventListener(Event.ADDED_TO_STAGE,addBonus(hitArray["xPos"],hitArray["yPos"])
  8. Replies
    4
    Views
    510

    Thank you. That makes life a whole lot easier :D

    Thank you. That makes life a whole lot easier :D
  9. Replies
    4
    Views
    510

    Thats great. I'm sure I tried it before and it...

    Thats great. I'm sure I tried it before and it didn't work though. Can I manually add them to the array eg myArray:Array = new Array(function1(),function2()...)
    or do it do it by way of...
  10. Replies
    4
    Views
    510

    store functions in an array?

    is it possible? I want to generate a random number and use that number to run whatever function appears at that index in the array. Is it possible?
  11. Is there an event that tells you once the video...

    Is there an event that tells you once the video has finished playing? have a look and if so, add a listener for that event then remove flv via the listener function.
  12. Is it possible and if so, is it good practice to...

    ..test one of about 100 bricks for a hit test from any object? I know the object it will be, but I don't want to be so specific as to say to the brick, this.parent.ball.

    Hmm, what I could do I...
  13. Thank you. That's a valuable bit of knowledge I...

    Thank you. That's a valuable bit of knowledge I have gained through the last 4 hours of nothing to show for work! That's great, it will no doubt help me structure things better and avoid future...
  14. Ahhhhh I seeeeeee. So if there's a function in...

    Ahhhhh I seeeeeee. So if there's a function in the constructor function that says addEvent() and it goes off to do that, it hasn't completed constructing yet, so the parent and stage are null until...
  15. What I don't understand still though is, whilst...

    What I don't understand still though is, whilst my code works by only adding the keyEvent handlers once this has been added to the display list, if I call that same listener function (taking out the...
  16. thank you times a million though for your help

    thank you times a million though for your help
  17. You know what? I just seen in the paddle's...

    You know what? I just seen in the paddle's parent function in the constructor function before I even created a new paddle, the words paddle.addEvent(). Oops, sorry for wasting your time! I cannot...
  18. Yes, I just added it directly from the document...

    Yes, I just added it directly from the document class (previously I was adding it from one displayobject down from doc class) and it traced the stage no problem. I guess it's something to do with...
  19. Just done that, no avail. Maybe it's a bug,...

    Just done that, no avail. Maybe it's a bug, although its a pretty massive big if so.
  20. Yes I get null. I know, it doesn't make sense.

    Yes I get null. I know, it doesn't make sense.
  21. Yes, here is the whole thing. I only added...

    Yes, here is the whole thing. I only added addEvent in this one class

    package {
    import flash.display.*;
    import flash.events.*;
    public class Paddle extends MovieClip {
    var left:Boolean;...
  22. When I put comments around the code in addEvent...

    When I put comments around the code in addEvent the code all runs and the trace statement works. When its uncommented I just get TypeError: Error #1009: Cannot access a property or method of a null...
  23. Can you see if there is something wrong with this...

    Can you see if there is something wrong with this snippet of code, because I am doing as you say, only adding keylisteners when item added to stage but I am still getting that null error:
    ...
  24. Thanks for your help. I'll use that ADDED to...

    Thanks for your help. I'll use that ADDED to stage listener to check whats going on.
  25. No it should be on the display list. I traced...

    No it should be on the display list. I traced this.parent and it displays it's parent. Also, the object is added to the stage when I export the swf, its just functionally it doesn't work.
Results 1 to 25 of 62
Page 1 of 3 1 2 3




Click Here to Expand Forum to Full Width

HTML5 Development Center