WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Q. onEnterFrame in DHTML?, Scott Barnes, April 25, 2004
     Re:Q. onEnterFrame in DHTML?, Mikael, April 25, 2004

Subject: Q. onEnterFrame in DHTML? From: Scott Barnes Date: April 25, 2004
I have a component made in DHTML which basically draws a 2 DIV bevel effect, kind of short cutting some graphic work.

Problem I have faced is how do you invalidate with dhtml? In ActionScript we could basically add a series of method calls to a que and then on the next frame/interval it basically processes that que.

The cool part about this technique is it can reduce method calls. An example of such would be say I generate a DoubleBevel Panel (ie 2 panels ontop of eachother). Now to build this I need to size each panel? so basically in my layoutChildren() method, I have two calls per Bevel (SetSize,moveTo). This is i guess ok, but sadly the setSize and moveTo each have a draw() call within their methods, resulting in the draw method for a SingleBevelPanel object being called twice?

Instead It would be great to be able to add the draw method to a que, and if another request for draw is requested, it then checks the que and if it already exists, basically continues on. This results in 1 draw call vs many. Of course if you wanted to request the draw method be called twice or more you can over-ride the que.

How do people out there do this style of technique with DHTML. The only way I can think of is using a SetInterval style approach? but is that a good idea?


Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.

View All Messages
Back to WebFX