Last week I put up a petition on Ipetitions.com that called for granting asylum and temporary protected status for Mexican nationals fleeing the drug war violence.
Every seemed to working great with the site, except that I was continually given a prompt to verify my email account. I tried but I never received an email from Ipetitions. Now, my petition has expired. I’ve tried to contact Ipetitions several times but have gotten no response.
So it looks like they have some bugs. I hope they can work it out. It provides a very useful service.
























Cloning a MouseEvent
I’ve seen the question of how to dispatch a MouseEvent through code, but i’ve never seen it answered. I figured it out so i’ll share it with your here.
Let’s say you have a BallSprite class and a RectSprite class (BallSprite being a graphic of a ball…..etc). And i want a MouseEvent.Click on an instance of BallSprite to trigger a MouseEvent.Click on an instance of RectSprite
Give the instance of BallSprite access to the instance of RectSprite. Note how i dispatch a clone of the click on the BallSprite instance. Now any MouseEvent.Click listeners on RectSprite instance will be triggered.
{
import flash.display.Sprite;
import flash.display.DisplayObject;
import flash.events.MouseEvent;
public class Ball extends Sprite
{
private var _rect:Rect;
public function Ball(dispObj:DisplayObject)
{
_rect = dispObj:DisplayObject;
addEventListener(MouseEvent.CLICK,clickHandler);
this.graphics.beginFill(0x00ff);
this.graphics.drawCircle(50,50,50);
this.graphics.endFill();
}
private function clickHandler(e:MouseEvent):void {
trace('ball click, now dispatch click');
_rect.dispatchEvent(e.clone());
}
}
}