Imagine that you could draw a shape, then add code to that shape that determines how it looks, what it does (visually), or even triggers other events (like play audio files or spawn other shapes), that interact with the user (click, mouse over, drag events, etc), or interact with other shapes.
A good way to imagine it is: What if Adobe Illustrator allowed code to be attached to any drawn object, allowing changes in properties and behaviors.
And it would be best if it were "live" at all times …
Some mock-up software sort of does this, but tends to generate code, rather than USE code.
At this point, I'd create an active demo for you to see how I'd like it to behave, but to do that, I'd actually need the software I'm looking for :)