deleting an object

Out of context: Reply #5

  • Started
  • Last post
  • 8 Responses
  • fourtenlabs0

    i'm creating a motion blur effect class that you call:

    var mb:MotionBlur = new MotionBlur(some_mc, maxBlur);

    so you'll have a variable pointing on the main timeline presumably. then you can call:

    mb.startMotionBlur(); and
    mb.stopMotionBlur()

    starts and stops the interval causing the blur.

    i wanted two other methods to kill all of the blurs and to kill a specific blur object as follows:

    mb.killMotionBlur();
    MotionBlur.killAll();

    that's where i was running into problems. i have an array that is a static property that's getting pushed with "this" each time the class is constructed so that i can kill all of the object references with killAll().

    am i gonna run into problems trying to keep track of variables outside of the class when i try to use killAll() since i guess i have to delete all the variables pointing to the object private or not?

View thread