I created an xml image gallery. Click on a thumb, full image pops up, click on the full image and it closes. The gallery closes whenever I click on a navigation button to go to a different section of the site. But if I click on a thumb to load a full image, and then click on a button to navigate to another section of the site without clicking on the image again to close it, the full image will carry over to the new section. If I click on it again in the new section, it will close just like in the portfolio section, but then I get ActionScript compiler errors. Basically I need to add a double function of the navigation buttons or something that will close the full images if they're open.
I tried removeChild(full_mc); at the beginning of each new section of the site, and it works if you view that section after the portfolio section. If not, while it doesn't cause harm and does the job of removing any still open full images, it gives ActionScript compiler errors. So for example, when first loading the page, you'll receive AS comp errors at the home page because you aren't coming from the portfolio section. Any help again would be great. The code is attached. Thanks.
This is mine image gallery add-on which contains multiple image reading, editing and saving as well as multiple corresponding image add-ons, such as image barcode creator and scanner, image ocr reading and twain scanning, and many more. However, they are written within java and .net prorgamming projects, just check it can help you or not.
You have to remove or visible = false your full image when you click other sections, and check if that image is not "null" , then proceed to remove it.
firstSection.addEventListener(MouseEvent.MOUSE_DOW N, check);
secondSection.addEventListener(MouseEvent.MOUSE_DO WN, check);
thirdSection.addEventListener(MouseEvent.MOUSE_DOW N, check);
function check(e:MouseEvent):void
{
//check for the FullImage to exist to remove it
if(FullImage != null)
{
removeChild(FullImage);
//if the FullImage is inside another movieclip, use //otherMC.removeChild(FullImage);
FullImage = null;
}
//Now, procceed to corresponding sections
switch(e.currentTarget.name)
{
case "firstSection":
//gotoAndStop(firstSection Frame Number Here);
break;
case "secondSection":
//gotoAndStop(secondSection Frame Number Here);
break;
case thirdSection:
//gotoAndStop(thirdSection Frame Number Here);
break;
}
}
Already mastering AS3. It was so fun. Now into Javascript and PHP and all its libraries
This is mine image gallery add-on which contains multiple image reading, editing and saving as well as multiple corresponding image add-ons, such as image barcode creator and scanner, image ocr reading and twain scanning, and many more. However, they are written within java and .net prorgamming projects, just check it can help you or not.