Problem with mutiple photo library...

Hello

I'm new to As3.0 (I'm a designer...) but I need to create a photo gallery, so I found a tutorial on lynda.com.

I use a code that works perfectly and changed it (copy and paste) to have 2 SAME photo gallery (using different images) displayed on the page.

If I use a 2 (one for each gallery) thumbnails and scrolling on the x-axis of each thumbnail, you can see the differnet images available in the gallery. By clicking, it displays the image enlarged in a container.

So far so good.

The problem is that when you go to a gallery to another, the first view Gallery does not allow the other main size of gallery image display simply because it is below... As if it was a layer under a different top layer...

I would like to know if there is a way to make each gallery unload their enlarged image by clicking on the Gallery on the other.

SORRY IF THIS IS A BIT DIFFICULT BUT CAN EXPLAIN IF YOU ASK...

HERE IS THE CODE

var xml;

var xmlList:XMLList;

var xmlLoader:URLLoader = new URLLoader();

var container: MovieClip = new MovieClip();

var imageLoader:Loader;

var fullLoader:Loader = new Loader();

var frontIndex:int = 0;

var containerMask:MovieClip = new MovieClip();

var: segment number.

Container.x = 115;

Container.y = - 185;

fullLoader.x = 275;

fullLoader.y = - 185;

container.addEventListener (MouseEvent.MOUSE_MOVE, changeThumb);

container.addEventListener (MouseEvent.CLICK, showPic);

xmlLoader.load (new URLRequest("data/images.xml"));

xmlLoader.addEventListener (Event.COMPLETE, xmlLoaded);

function mcunload1(event:MouseEvent):void

{

fullLoader2.unload ();

fullLoader.load (new URLRequest (xmlList [frontIndex] .attribute ("full")));

}

function xmlLoaded(event:Event):void

{

xml = XML (event.target.data);

xmlList = xml.children ();

for (var i: int = 0; i < xmlList.length (); i ++)

{

imageLoader = new Loader();

imageLoader.load (new URLRequest (xmlList [i] .attribute ("thumb")));

container.addChild (imageLoader);

}

}

function changeThumb(event:MouseEvent):void

{

segment = container.width / container.numChildren;

frontIndex = Math.floor(container.mouseX / segment);

if (frontIndex < = container.numChildren - 1).

{

for (var j: int = 0; j < container.numChildren; j ++)

{

container.getChildAt (j) .visible = false;

}

container.getChildAt (frontIndex) .visible = true;

}

}

function showPic(event:MouseEvent):void

{

fullLoader.unload ();

fullLoader.load (new URLRequest (xmlList [frontIndex] .attribute ("full")));

}

addChild (fullLoader);

Container.filters = [new DropShadowFilter()];

addChild (container);

SECOND IMAGE GALLERY

SECOND IMAGE GALLERY

var xml2:XML;

var xmlList2:XMLList;

var xmlLoader2:URLLoader = new URLLoader();

var container2:MovieClip = new MovieClip();

var imageLoader2:Loader;

var fullLoader2:Loader = new Loader();

var frontIndex2:int = 0;

var containerMask2:MovieClip = new MovieClip();

var segment2:Number;

container2.x = 115;

container2.y = - 80;

fullLoader2.x = 275;

fullLoader2.y = - 185;

container2.addEventListener (MouseEvent.MOUSE_MOVE, changeThumb2);

container2.addEventListener (MouseEvent.CLICK, showPic2);

xmlLoader2.load (new URLRequest("data/images2.xml"));

xmlLoader2.addEventListener (Event.COMPLETE, xmlLoaded2);

function mcunload(event:MouseEvent):void

{

fullLoader.unload ();

fullLoader2.load (new URLRequest (xmlList2 [frontIndex2] .attribute ("full")));

}

function xmlLoaded2(event:Event):void

{

xml2 = XML (event.target.data);

xmlList2 = xml2.children ();

for (var i: int = 0; i < xmlList2.length (); i ++)

{

imageLoader2 = new Loader();

imageLoader2.load (new URLRequest (xmlList2 [i] .attribute ("thumb")));

container2.addChild (imageLoader2);

}

}

function changeThumb2(event:MouseEvent):void

{

segment = container2.width / container2.numChildren;

frontIndex2 = Math.floor(container2.mouseX / segment);

if (frontIndex2 < = container2.numChildren - 1).

{

for (var j: int = 0; j < container2.numChildren; j ++)

{

container2.getChildAt (j) .visible = false;

}

container2.getChildAt (frontIndex2) .visible = true;

}

}

function showPic2(event:MouseEvent):void

{

fullLoader2.unload ();

fullLoader2.load (new URLRequest (xmlList2 [frontIndex2] .attribute ("full")));

}

addChild (fullLoader2);

container2.filters = [new DropShadowFilter()];

addChild (container2);

It's just a quick guess.  Whenever you call... fullLoader.unload ();  also called fullLoader2.unload (); and vice versa.

Tags: Adobe Animate

Similar Questions

  • Performance problems with large Photo library size

    Did anyone seen performance issues when the library becomes too great? I used to keep a few different libraries, since some of my libraries are already 1 TB. So, if I merge into one, the file will be 2-3 Tb when it's said and done. Anyone know if it is recommended to size limits or is it more important with El Capitan. Obviously, the response time will be affected by the hard drive and the speed of the laptop, but before you begin merging into one file libraries, I wanted to see if anyone had any suggestions/recommendations or other related advice. Thank you!

    It is not documented, but how many pictures a library can contain pictures, you can migrate photos iPhoto libraries and libraries Aperture, so you should be able to store at least 1 000 000 photos in a photo library.

    I haven't noticed any performance issue with a large library of Photos.  My largest library has 40000 photos.

    During the regular work with the size of the library is not serious at all, as long as you want to keep enough free storage on your system drive. Don't let the photo library fill in your system drive. Keep at least 10 GB free at all times, better more.

    However, there are rare occasions when the size will be discussed:

    • When you need repair library, it will take more time, if the library is large.
    • When you first migrate your libraries of photos, the initial treatment will take longer - scanning for faces and places, creating thumbnails.
    • If you use iCloud library synchronization can take a long time for a large library.
    • Too many smart albums can make pictures a little slower, if the library is large.  I noticed a drop in performance, after that I created 200 smart albums with a search for text across the entire library.
  • Problems with file photo library and music/photo.

    Original title: Photo Gallery

    I have two questions. I have somehow copied mistakeningly my picture folder in my music folder. So I had two large image (18 GB) folders. I thought they were two separate files, so I deleted the one in the photo folder and it delete the two files. I had the backup on an external hard drive.

    So when I tried to open the photos in the Gallery of photos from the disk external hard he told me that I needed to update my photo gallery and I do not know how and why he wants me to do.

    I always have a file in my folder of music called images and when I try to open my photos (the little I have left) it goes into the music file to pick them up.

    I can seem confusing. Hope you can help me.

    Thank you

    Theresa

    Hello

    1. What is the exact message that you receive when you try to open the photos in the photo gallery?

    2 are you referring to the default music library in the library folder?

    To update the Photo Gallery, follow these steps:

    a. launch of Windows Photo Gallery.

    b. in the few minutes library loading completely to the top, you will see a small notification pop window - up in the lower right corner of the window.

    c. If you see such a notice indicating that the updates are available for photo gallery, click on the link to download the updates.

    d. wait to open after clicking on the download of Internet Explorer link. The page that opens will include a download button and specific instructions on how to install the software.

    e. click Download and open the file when the download is complete.

    f. follow the on-screen guests and guidance from Microsoft site to install the updates.

    g. Photo Gallery to restart for the changes to take effect.

    You can move the image folder in the music folder, and then try to open the images.

    You can also reset the library folder and check.

    Try these steps and check the result.
    Restore default libraries
    a. click Start, click computer.
    b. right click on libraries in the navigation pane, and then click 'restore default libraries'
    c. restart the Windows Explorer and check the result.

  • Removal of old photos of the iPhone with iCloud photo library on

    I had a 6 128 GB iPhone for a couple of years and I bought a Macbook Pro about a year ago. I've been running iCloud photo library - but not Photostream - and without really look deep into the settings exactly, when I take pictures on my phone they usefully automatically found in the Photos app on my macbook. When I remove photos from my phone, they also seem to disappear too from my mac.

    Recently, in an arrangement of happy until I started running low on space on my phone. My question is, is my library in 'mirror' between my devices? IE if I say, delete all my photos from 2012 to 2014 my phone, they are removed from my macbook too? Obviously, it would be disastrous.

    I guess my question is, what are the best settings to have a situation where my photos will be driven by my phone to my laptop, but then stored on my laptop indefinitely?

    Any help is appreciated.

    Hello

    When you use iCloud photo library, deletion of a photo or a video on any device that uses the service will remove this item in all of them and also to iCloud.

    The following resources may help explain how the photos and videos are managed by iCloud photo library, including the possibility to optimize the storage on your iPhone:

    To manually import pictures to your laptop, you can follow the steps detailed here:

    Other resources:

  • Photos on macOS Sierra: Album of peoples does not synchronize with iCloud photo library

    Using Photos has just been updated for Sierra, and we finally have it in writing:

    https://help.Apple.com/photos/Mac/1.2/?lang=en#/phtf5e48489c

    Note: Persons identified in the album people are not synchronized between devices.

    And as far as I know, it really does not synchronize between my libraries of Photos on the MacBook Pro and my iMac.

    It's different in the 10 user guide iOS for the iPhone and iPad:

    http://help.Apple.com/iPhone/10/#/iph9c7ee918c

    People are synchronized between devices where you are connected with the same Apple ID.

    I wonder how this is supposed to work, if a Mac and iPhone are synchronized with iCloud User Library.

    None of the faces that I named on my iPhone did sync it with my Mac.

    Another indication that the lack of synchronization of the people and names is deliberate:

    This document has now also been updated:

    Use iCloud photo library on several Mac - Apple Support computers and Photos

    https://support.Apple.com/en-us/HT204486

    After have connected you, these items appear in the Photos app on all your Mac computers:

    • All photos and original videos
    • All folders and albums
    • Smart albums
    • Keywords
    • Memories
    • Key photo selections

    He used to say, tags searchable faces will perform synchronization between devices, but the tags are more is mentioned. Now we have the 'memories' instead.

  • With iCloud Photo library function enabled, this means that photos taken with the phone are saved only on the cloud, not on the phone? Can I turn off the photo library feature and do not miss the photos on the phone?

    iCloud photo library

    These two articles should help answer your question and provide you with information on how iCloud library works with your iOS device:

    iCloud Photo library FAQ - Apple Support

    iCloud Photo Library help - Apple Support

    See you soon,.

    GB

  • Confused about the disk space with the photo library

    I understand that Photos uses hard links, and that therefore the photo library should not take much more space than the old Aperture library. But in a sense, I think that's not strictly true, and ' t actually takes this amount of space.

    My current photo library is 174 GB. The old library of opening that I imported in April is 155 GBs I have a couple of other files in images, representing perhaps 10 MBs. Finder reports my folder of photos using 330 GBs.

    Worse still, the disk hard integer (which is 500 GB) said I have only about 8 GB of free. When I look at the files that take the place, it seems that the GBs 330 is exact, so the vast majority of the use of the disk is duplicated libraries.

    I kind of thought maybe I had actually an extra GBs 155 or something, because old files of opening were now linked to the photo library. But this doesn't seem to be the case.

    Can someone explain this to me? I want to blow the Aperture library, because I have no intention to never use Aperture again, but I'm afraid that there are files in this library that have never in Photos, so duplication.

    Thank you!

    My current photo library is 174 GB. The old library of opening that I imported in April is 155 GBs I have a couple of other files in images, representing perhaps 10 MBs. Finder reports my folder of photos using 330 GBs.

    Storing hard linked files is reported incorrectly.

    This is because the hard linked files are identical to the original files, and so the storage is counted twice by the Finder.

    See: Six colors: the (hard) link between iPhoto and photo

    The library of Photos that is created from your Aperture library should have approximately the same size as the original opening library, but the image inside the library are stored on the same disk as the same pictures blocks in the original Aperture library.

    But once you start working with the new photos of library, more links will break for the preview images.  If you change a photo, a new preview will created, and who will no longer be linked to the preview in Aperture. It will be saved there less storage, so. Also, if you used a custom size for previews in Aperture, the new extracted in pictures will need extra storage.

    Or, if you use iCloud library synchronization with iCloud may break references.  Original on your Mac could be replaced by iCloud original during synchronization and verification duplicates.

    If you no longer use the Aperture library, move it to an external drive to free storage on the internal drive.  If you discover missing photos in the photo library, you can access the Aperture library on external drive as well.

    See this document on what kind of reader to use: use locally mounted volumes extended, Mac OS X for your Aperture library

  • I have a problem with importing photos from iphone to photo

    I have a problem with importing the photos from the iphone to the photos. I have the OS X El Capitan 10.11.1

    It seemed to me that I can't push the button import. It is grayed out.

    Your picture-click the camera icon to add a picture

    How the phone is connected?

    LN

  • HP AIO 1515: problem with printing photo 13 x 18

    Hi I have a problem with the print photo (13 x 18) size she cut in the end of photo I use hp photo creations but if choose 100% size or fullscreen, same result please what can I do;  I am disappoint bought this printer if photo print well

    Please help me

    Hi @nik1,

    I see by your post that the printer cuts off the image when printing on paper 13 x 18. I want to help you.

    According to the specifications of the printer, it does not support this paper size. You will need to use a supported paper size. The largest size is US legal 8.5 x 14 inches.

    Specifications of printer for printer HP Deskjet 1510 and Deskjet Ink Advantage 1510 All - in - One Printer Series.

    If you appreciate my efforts, please click on the "Thumbs up" button below. Thank you.

  • Problems with iphone photos to the Gallery of windows

    When I try to change the images that I imported from my iphone using windows photo gallery it I cannot save any of my changes.  He said: "this photo cannot be saved due to a problem with the properties of the photo file.

    someone else this experience?  all solutions?
    Thank you!

    I don't know if the following links answer your question, but
    they may be worth a visit:

    Good luck and * proceed at your own risk *.

    FWIW... There is a very long discussion (several pages) to the
    following link:

    Cannot change the imported iPhone 4S photo
    https://discussions.Apple.com/thread/3444951?start=0&TSTART=0

    More Discussion

    iPhone 4S image properties is not compartible with Windows?
    Editing can be done on the computer due to the error
    "Windows Photo Viewer cannot save changes to this picture.
    because there is a problem with the properties of the image file".
    Any help?
    https://discussions.Apple.com/message/17291884#17291884

    More Discussion:

    We cannot turn a few photos in Windows 7 (but can turn others)
    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-pictures/cant-rotate-some-photos-in-Windows-7-but-can/3a809845-9144-4BB1-9bb3-ab4f5b856524

    A simple solution is to open the photos in paint or most other
    digital image editor and modify it.

    Some people have reported success using the following free download
    to remove the metadata.

    Property restrictions stripper iphone 4S (JPEG & PNG Stripper)
    http://www.SteelBytes.com/?mid=30&cmd=download&PID=15

    Here's a way to turn...

    Easily turn locked iPhone 4 and 4 s Photos in Windows 7 with
    the rotator Lossless JPEG free
    http://www.daleisphere.com/easily-rotate-locked-iPhone-4-and-4S-photos-in-Windows-7-with-the-free-JPEG-lossless-Rotator/

    Free download JPEG Lossless rotating
    http://annystudio.com/software/jpeglosslessrotator/

  • Need of XLSX files tested to see if there is a problem with the content library

    Hello

    I have a file which causes an error when you use the library of Stellent. The file is a file XLSX and when we open and then save the file again, then does not cause the error. This leads me to believe that the file has been successfully created or something wrong with the library. More than likely it is the file. Is there any tool that I can use to test the file that will tell me what exactly is the problem? The file is automatically generated by a survey company. And so if we can show a problem with the file itself, then they will have to solve the problem in their autogenerator.

    Thank you
    Larry

    Published by: 1000345 on April 16, 2013 06:44

    Published by: 1000345 on April 16, 2013 06:45

    Published by: 1000345 on April 16, 2013 07:00

    Published by: 1000345 on April 16, 2013 07:00

    Which, in my view, that we use it for is to get out of text or metadata files to create an index on the data.

    Yes, it's also OutsideIn. I believe you can use the SDK to export research.

    If I were you, I'd do some testing base of the new version and it doesn't help, create a service request in Metalink so that management can take a peek inside.

  • Problem with joining photos for the Windows 8 library mail program and error message 'create an association in the default program control panel '.

    Original title: E-mail question

    I want to send pictures of the library in Windows 8. Cannot do. He told me to create an association in the default program control panel. Been there, no help.

    Hello Jeff,.

    Please keep us updated on the status of the issue.

    I will certainly help you in the right direction to solve the problem. However, I would be grateful if you could let us know that you have set the email client that you use as default to the Control Panel program to send and receive electronic messages from the computer.

    Please respond with the requested information, in order to help you solve the problem.

    Thank you

  • Problem with the photo app

    I have can´t open my photo app, it just says: "library of closing". What can I do to fix my problem and review my photos?

    ellibelli wrote:

    I have can´t open my photo app...

    There is no application called 'photo' which is made by Apple.

    • What version of Mac OS X are you running?
    • What is the exact name of the app?
    • Are there any other symptoms that you don't have not told us?
    • Have you tried restarting your Mac?
  • Problem with opening of library saved on the remote server. Can anyone advice please?

    I saved the library on the remote server. When I try to open it, I get the following message:

    "Libraries cannot be saved to this location. . The format of the selected hard drive or network volume is not supported. Select another location. »

    Can anyone help please?

    I don't think I have made it clear that the problem is with iMovie on iMac ElCapitan 10.11.3 running. Thank you

  • Problems with the photos in El Capitan-cant app drag in other applications and can not find the photos when using Word

    I feel very disappointed with the new iMac (27 inch high range) I bought specifically so that I can work quickly with video editing - BUT who currently my old iMac with Snow Leopard on my desk and still use it to create documents in Word, etc, among other things. He really miss the old iPhoto - all about it. Not like the new photos app at all and I was wondering if I can install iPhoto on the new computer? We're stuck with the white background of the screen and do not like the new editing panel either - I had my screen tonic to a shade of gray that is visually not too exhausting to watch as the white. Is there a way to customize the color of the workspace I have forgotten?

    I'm not also able to drag and drop photos from the app directly in other applications - this was a great feature that could work very quickly. Can't believe that Apple went backwards with this? Or am I still missed something once?

    Also, now, I tried to create a new document in Word and when you open the photo browser to import an image from photos in the document, there is no pictures - all other media is accessible but no pictures, not so to drag picture on the desktop then document - once again, having Apple went backwards , or I'm going crazy?

    Hoping that I do not regret this purchase very expensive!

    A beautiful (and expensive) iMac. Congratulations.

    The latest version of iPhoto still works in (a little hard to get 'quiet' Photos.app) ElCapitan, see a lot of discussions here.

    Drag-and - déposer is depending on the applications. There is still work, as usual.

    Word is updated to the latest? I heard there were a few problems, but they should be solved now.

    Lex

Maybe you are looking for

  • I can add fractions more keyboard &gt; text in the system preferences.

    I want to add more fractions to the keyboard > text in the system preferences. When I type in 1/2 he returned half. When I type 7/32 I get 7/32. Y at - it an easy way to get 7/32 to look like this: > ½? Thank you.

  • How can I restore bookmarks in the sidebar?

    I have restored the bookmarks, but while my restored Favorites appear in the drop-down menu, they do not appear in the sidebar. My Favorites bar is empty. How to restore the bookmarks in the sidebar?

  • No synchronization of contacts

    When I add a contact in my iPad, it does not sync on my iPhone. But if I add a contact in my iPhone, it syncs to my iPad. I don't know what the problem is. Please help me!

  • I can't start my computer!

    Hey! My mini compaq laptop (vista) does not start! I had 2 anti virus top programs before it happened but I uninstalled it before I restarted the computer. I think that there is something left after uninstalling. Thought about it because I know that

  • system freezes and the screen goes black or watch horiz lines

    When you use my laptop I'll hear a little wink (could be in the 5 min or 2 h) as his and my screen will go completely dark or display horizontal lines.  This crashes the system.  I am unable to do anything.  The only way to restart is a strong power