Hey, that's pretty close to how I'm doing it too. I tweaked it a little:
http://www.amirai.net/misc/platformai2.cap
Now it works properly if the player doesn't move from the top platform.
Edit: Er, realized that I probably should have commented my edits to the .cap... sorry.
Edits: jump boxes now tell the direction of the jump by their angle
Event 3&4: added when on ground condition
Events 5&6: enemy doesn't turn directions in midair, but does continue forward if stopped by the edge of a platform
Event 10: Added if angle of 'badguy' is equal to angle of jump to prevent incorrect jumps
Set 'badguy' air acceleration/deceleration to 0