AS3 stupid question

Out of context: Reply #14

  • Started
  • Last post
  • 18 Responses
  • WOPR0

    hey ornj (not to hijack the thread)... but i'm a newb to 3.0 too...

    ... if you call a specific listener for an object... can you call that listener again and apply a new function/method to it and expect the old listener to be removed?... or do you have to be specific and remove the old listener first? It seems everything needs to be datatyped or have a listener setup before you can even use it 3.0 (in other words... there's no room for forgiveness!)... therefor, if you wish to re-datatype or apply the listener to your target but w/a diff method/function call... you must always remove the old one first?

    • i'm having a problem w/a stage listener...WOPR
    • if your listener is assigned to an object on the stage than it has access to stage. Not sure if that's what you meant though.tommyo
    • it's just a stage listener that adjusts everything on stage when the stage is resizedWOPR
    • Old listener will not be removed, you have to remove them manually even when you remove the object from the display listornj
    • display list. Listeners are independent.ornj
    • For example if I have buttons and want the same roll over effect, i just write 1 function and use it for multiple listeners.ornj

View thread