Hi All,
this is what im trying to implement:
“Sound instance will dispatch an event each second it plays; Event type: SoundEvent; Event name: SOUND_POSITION_UPDATE”.
I want this to be dispatched by the instance of the Sound class.
I figure i can extend Sound class and add the behavior, but it seems too much of fuzz considering i need to call the new class different name (not ‘Sound’). Id still love to use the ‘Sound’ class in my projects. When i change namespace there is problem:
class Sound extends Sound <- not possible,
and if i just create like another class to check for change in Sound instance and dispatchEvent each time it reached next second, that means creating another class to listen to (which i dont want).
Can i use some kind of Proxy maybe to add this Timer/dispatcher functionality into built-in Sound class itself?
Or simply what’s your best take to accomplish simply the above in flash?
thanks
-w