Add

If a tree falls in the woods…


If a tree falls in the woods and nothing is there to hear it, does it make a sound?

I'd have to say yes and no. No to the fact that sound is based solely on perception, and if nothing is there to perceive a sound, then it can't be a sound. Yes to the fact that sound is made up of tiny fluctuations in atmospheric pressure. Just because someone isn't there to perceive a sound, doesn't mean there aren't variations in pressure. This became clearer to me when I came across a Flash conundrum when creating a pulse Sprite using the ENTER_FRAME event…

If a DisplayObject isn't attached to a display list, does it have a framerate?

Of course this is true, otherwise how would the event fire. However, how do we access the framerate of the Sprite if it isn't attached to a display list or has any references to the stage? Using sprite.stage won't work, so of course we can't use sprite.stage.framerate. If the Sprite is instantiated, and an ENTER_FRAME is attached to the DisplayObject, then how does it know how fast to run?

I've created a Bitmap transition class/framework that uses a Sprite to generate a pulse for transitioning from one visual state to another using two sources. I don't want to create any references to the stage or the display list associated with the source and target Bitmaps. Some might say, well why not? I considered doing this, but my answer was A: I want to make it cleaner, encapsulated, and self contained (Hence my reason for not using HydroTween). B: Garbage Collection. The less references to anything else, the less chance of a memory leak.

It's possible the answer to this question is simple and I'm being deep, philosophical, and difficult for no reason. If you know the answer, then send it on over!

Until then, I've decided to file a bug/feature request with Adobe.

Given the current architecture of Flash, you can only have one Stage per compiled clip. So wouldn't it make sense to me to have static access to the Stage properties? I'm assuming that the Sprite in the forest (pardon the pun) is finding some way to know how fast it needs to cycle from frame to frame. If it can, then I want to be able to as well:)

So if you agree with me, click on the above link and vote for this issue to be addressed. Otherwise it's safe to say the only sound you'll hear is the chipmunk the tree is falling on.

The Discussion

see what everyone is saying

  • phil August 25th, 2008 at 11:41 pm #1

    wow, i never thought about that, it just bothered me all the time. thanks for bringing this up, you got my vote.

  • Hector September 9th, 2008 at 8:52 am #2

    I think the same, and, in my humble opinion, the same goes for the stage width and height.

  • nk October 29th, 2008 at 5:37 pm #3

    using a reference of Stage in a singleton?

Respond

get in on the action.

* Required

  • Viagra online
  • Order cheap cialis
  • Buy viagra no prescription
  • Cialis online
  • Buy generic cialis
  • Order propecia no prescription
  • Cheap propecia online
  • Propecia online pharmacy
  • Order levitra online
  • Cheap price cialis
  • Online pharmacy levitra
  • Buy viagra online
  • Buy discount levitra
  • Cheap cialis online
  • Propecia hair loss