flash button stops working after 1 click
So i have 3 buttons and when i click neither of them ,the clicked one loads the image that i want and them all of them stops working.
import flash.events.MouseEvent;
import flash.net.URLRequest;
imgbtn1.addEventListener(MouseEvent.CLICK, OnReleaseMyButton1);
function OnReleaseMyButton1(event:MouseEvent):void
{
infoField.visible = true;
var imageLoader:Loader = new Loader();
imageLoader.load(new URLRequest("picture1.png"));
addChild(imageLoader);
trace("BUtton1");
}
imgbtn2.addEventListener(MouseEvent.CLICK, OnReleaseMyButton2);
function OnReleaseMyButton2(event:MouseEvent):void
{
infoField.visible = true;
var imageLoader:Loader = new Loader();
imageLoader.load(new URLRequest("picture2.png"));
addChild(imageLoader);
trace("BUtton2");
}
imgbtn3.addEventListener(MouseEvent.CLICK, OnReleaseMyButton3);
function OnReleaseMyButton3(event:MouseEvent):void
{
infoField.visible = true;
var imageLoader:Loader = new Loader();
imageLoader.load(new URLRequest("picture3.png"));
addChild(imageLoader);
trace("BUtton3");
}
//
/*function startLoading(whichImage)
{
var imageLoader:Loader = new Loader();
imageLoader.load(new URLRequest("whichImage"));
addChild(imageLoader);
} */
Here is a link to the .swf file to see what exactly i mean.http://www.fileconvoy.com/dfl.php?id=gf45387fd831a092a999199587cb570046f7c5cf00
