dcsimg
A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Image Gallery - Closing Full Image

  1. #1
    Junior Member
    Join Date
    Mar 2009
    Posts
    6

    Image Gallery - Closing Full Image

    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.
    Attached Files Attached Files

  2. #2
    Junior Member
    Join Date
    Jul 2013
    Posts
    22
    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.

  3. #3
    Designer, Programmer, Musician angelhdz's Avatar
    Join Date
    Mar 2010
    Posts
    971
    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

  4. #4
    Senior Member
    Join Date
    Nov 2001
    Posts
    1,145
    ... did you just answer a 3 year old question?

    You need to introduce Chester to Akel

  5. #5
    Designer, Programmer, Musician angelhdz's Avatar
    Join Date
    Mar 2010
    Posts
    971
    Oh, i know what happened, I saw
    Chestertonpdf's post, 2014, and i thought the thread was new from 2014 hehehe so i replied. Take care moot
    Already mastering AS3. It was so fun. Now into Javascript and PHP and all its libraries

  6. #6
    Junior Member
    Join Date
    Aug 2013
    Posts
    24
    Quote Originally Posted by Chestertonpdf View Post
    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.
    only for java and .net ?

  7. #7
    Junior Member
    Join Date
    Aug 2013
    Posts
    24
    if java program can help , think about this java barcode SDK

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center