Loading larger image when dropped

Hey.  I am working on this image scroller, where thumbnails of images are displayed.  I get each image by
function urlLoaded(event:Event):void {
     urlLoader.removeEventListener(Event.COMPLETE,urlLoaded);
     xml=XML(event.target.data);
     xmlList=xml.children();
     for (var i:int=0; i<xmlList.length(); i++) {
          var thumb:Thumbnail=new Thumbnail(xmlList[i].url);
          arrayThumb.push(thumb);
          arrayThumb[i].y=150.5;
          arrayThumb[i].x=i*110+280;
          photoContainer.addChild(thumb);
          arrayThumb[i].addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
          arrayThumb[i].addEventListener(MouseEvent.MOUSE_UP, dropIt);
And I pick up and drop the thumbnail image by
function pickUp(event:MouseEvent):void {
     getPosition(event.target);
     stage.addChild(event.target as DisplayObject);
     Sprite(event.target).startDrag(true);
function dropIt(event:MouseEvent):void {
     Sprite(event.target).stopDrag();
     if (event.target.hitTestObject(getChildByName("movie"))) {
          var my_loader:Loader = new Loader();
          my_loader.load(new URLRequest("pics/1.png"));
          movie.addChild(my_loader);
          this.photoContainer.addChild(event.target as DisplayObject);
          event.target.x=xPos;
          event.target.y=yPos;
     } else {
          this.photoContainer.addChild(event.target as DisplayObject);
          event.target.x=xPos;
          event.target.y=yPos;
Now this is perfect, because If the image is not dropped into the movie clip called "movie", it will be placed back into the scroller at its correct position.  I just have a coupld of issues currently.  I dont want pics/1.png to be displayed on each drop, this was used for a test.  What I need is for each image' big image to be displayed, which all have the same name as the smaller image, just in a different folder.  The images are in the xml file like
<image>
      <url>pics/img_1.png</url>
  </image>
So is there anyway I could use any of the above code to load the big image associated with the small image?  If event.target points to the current thumbnail being picked up, could i do something like event.target.url to point to its name or something?
Any advise appreciated

You should be able to store the image file name as a variable of the thumbnail and then use it when it comes time to load the image, such as in...
my_loader.load(new URLRequest("pics/"+event.target.variable));

Similar Messages

  • Safari 7.0.1 does not load large images

    When I use safari and try to load an image with a resolution above, say, 2000x2000, I get a black box, sometimes with a grey area in the corner. The correct image displays for a brief moment, about a half second, but not enough for my viewing pleasure. This usually happens when I click imgur links on reddit, such as this one. I just searched a very large image on google, and was able to load it no problem. I've tried turning off all extensions, but even with no extensions the images do not load. Any advice is much appreciated. Thank you!

    Turning auto graphics off solved the issue for me: http://www.youtube.com/watch?v=QxSlQ-GNbik
    Seems like Safari won´t render large images when you are using integrated grapchis.

  • Safari 7.1 won't load large images on MacBook Air. Turning off Auto Graphics is not an option.

    When I try to load a large image with Safari 7.1, I get a black box instead of an image.
    Chrome and Firefox load the image just fine.
    This is a known problem and others have resolved it by turning off Auto Graphics Switching.
    However, my version of MacBook does not have the capability to turn off Auto Graphics Switching under the Energy Saver preferences. (I guess I have the GPU or chip or whatever that doesn't provide that option.)
    Are there any workarounds?
    Here are two threads about the same problem, but the solutions don't work for me:
    safari 7 won´t load large images...
    Safari 7.0.1 does not load large images

    Safari > Preference > Advanced
    Checkmark the box for "Show Develop menu in menu bar".
    "Develop" menu will appear in the Safari menu bar
    Enable Images.
    Make sure that"Disable Images" is not enabled.
    Best.

  • Loading large images

    Hi there,
    I'm facing lot of problem while loading large image (25+ MB JPG/TIFF) in editor pane using ImageIO. I always get OuofMemory exception or my machine (p4 2.4ghz/512 ddr) get hangs. Is there any way to load large images within a moment in Java? I have seen one s/w (written in vc++) that do the same. I'm trying to replicate that s/w.
    Is there any 3rd party Java API to do the same? Have you guys develop similar s/w before?
    I've tried many ways: by changing heap size, using ImageMagick, spliting the image, etc. but never get satisfactory results.
    Any help would be appreciated.
    Thanks in advance.
    -tamal

    You can use Java Advanced Image
    http://java.sun.com/products/java-media/jai/downloads/download-1_1_2.html
    this will avoid the out of memory error.
    I use it to read and show 20K*20K pixel images.
    the loading is immadiate.
    If you use javax.media.jai.widget.ScrollingImagePanel (deprecated) class to visulize the image is quite quick.
    Obviouse that if you want to visualize the entire image you will need to wait an approprite time for rescaling it.

  • Firefox doesnt load an image when *lots* of tabs are open

    Hi,
    An old website I created has a problem displaying a very large background image when *loads* of tabs are open (which makes me think its something to do with memory).
    An example page of the site in question is:
    http://www.southbankcentre.co.uk/about-us
    The white background image (which is super large for reasons not to discuss now) will show fine when, say, up to 10 tabs are open. However, if you have loads and loads of tabs open, this image doesn't display/render (even though firebug says it has).
    Some info about the image:
    http://www.southbankcentre.co.uk/sites/all/themes/southbank-centre/images/template-3-col.png
    79.6kb
    940px by 23000px (super huge I know)
    The problem is when it doesnt load, the copy is hard to read (as you can imagine).
    This doesnt seem unique to my computer. It happens to other peoples firefox browsers (and they have slightly different versions and different plug-ins).

    I'm not having any problems on that page with over 80 tabs open and the number of tabs shouldn't matter.
    Did you check if you can reproduce it with a clean new profile without extensions?
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • Load Large Image

    Hi.
    I have jpg image with 6.5Mb, 6000px*4500px.
    I load the picture to "Image" control with the same
    size(6000*4500) and the "Image" control is in the "Panel" control
    in order to enable "Scrollbar" so user can navigate picture.
    However, when user browses flash file, memory increases 150MB.!!!!
    Is there any solution dor issue: huge picture with scrollbar
    for navigate?
    Thanks for any read and reply.
    MA.

    The Flash Player has an image limit size of 2880 x 2880
    pixels, so your image is way too large to show up. Strange things
    will happen to it.
    I encourage you to file an enhancement request to let the
    Flash Player team know that you need the Flash Player to accomodate
    large images.
    Adobe
    Feature Request and Bug Report Form

  • Loader won't load large images

    I have some pretty large PNG images stored in a database (example 1000x15000 px, 4.5MB). I am trying to load this using the Loader class...the problem I am having is when I call load(), nothing happens. No events, no errors.
    I can take the same image and embed it. As long as as I set the height to less than 8000px it works fine. If I convert the same image to a ByteArray, and try to load that byte array nothing happens.
    Any suggestions?
    Thanks

    Hmm, so at this point I am just trying to load the image into memory and not display it. I don't really need to display it at full size. Are you saying that I can't even load the image at all?
    I haven't tried stitching. It seems like a lot of effort and I was hoping I wouldn't have to do that. Additionally, the data is already stored as a single PNG file in the database so I don't know how I am going to break it up. I was hoping since I can display the embedded image at 8000px high I could do the same thing with the ByteArray.
    Flash isn't even throwing an error so I can't even tell the user why the image isn't loading. Since the Loader won't load it I can't determine the image height.

  • Can't load large image (png)

    I have a sandbox web page with large image (png file 26000x13000, 14MB packed/330MB unpacked). I can open it in IE but firefox display page without image. I have 1,2GB of free RAM, how can I adjust settings to make allow firefox display the image? Currently there is no difference if I use unpacked BMP, it doesn't work as well. I would prefer to stay with PNG since it's only 14MB on disk.

    Is there an error message?
    We've been able to load more than 100MB files.
    Try setting SQLNET.EXPIRE_TIMEOUT=0 in the sqlnet.ora file
    Fenella

  • Safari does not load large images

    Images like on http://imgur.com/a/ZKhFa#zV5Hq9q do not load properly.
    The load halfway, and when they become a certain size, they do not load anymore.
    I have noticed this since OS X Mavericks.
    Firefox and Chrome load these images properly.

    Might be a Safari extension or third party plug-in preventing the images from loading properly.
    From the Safari menu bar click Safari > Preferences then select the Extensions tab. Turn that OFF, quit and relaunch Safari to test. If that helped, turn one extension on then quit and relaunch Safari to test until you find the incompatible extension then click uninstall.
    If it's not an extensions issue, try troubleshooting third party plug-ins.
    Back to Safari > Preferences. This time select the Security tab. Deselect:  Allow plug-ins. Quit and relaunch Safari to test.
    If that made a difference, instructions for troubleshooting plugins here.

  • Why Mail can´t load html images when it should?

    Hi, This is odd: Mail 6.2 seems unable to load html images on e-mail received even if the preference is set properly. Any clue?

    not at all. It happens since I´ve upgraded to Mountain Lion a few days back

  • Dalinton Karma: 0 Registered member my firefox browser will not load html images when i'm using notepad? It load the html files but not image says cannot find

    I'm creating a webpage with Notepad and wanting to see illustrations using my browser, i have loaded the text html files and that works fine however when i try to load images using this command...<img src="life.jpg" width="403" height="403"> it fails to load...error says cannot find file however the file it says it cannot find is the correct name and the image is located in the same folder save as html...is this a pc security problem? Tried different images...saving as jpg, html...thanks

    Any errors in the Web Developer > Error Console (Ctrl+Shift+J) or Web Console (Web Developer > Web Console;Ctrl+Shift+K)?
    See also:
    *https://developer.mozilla.org/en/Tools/Web_Console
    Are you using relative links to the image files?<br />
    Can you post (part of) the code?
    Make sure that you are using forward slashes in the file paths and not backslashes.
    Check the "Tools > Page Info > Media" tab for blocked images (scroll through all the images with the cursor Down key).<br />
    *http://kb.mozillazine.org/Images_or_animations_do_not_load

  • Pixelated images when dropped into PSE

    Images that look great on my desktop become pixelated when I put them into PSE. This has never happened before and I am not sure what the problem is... Any help would be appreciated! Thanks

    Try viewing your images at a viewing % (percentage) of 100% (actual pixels), 50% or 25%.
    Other viewing %'s will make images look pixelated.
    MTSTUNER

  • Can't load disk image when doing first backup

    Hi
    I've had to erase my Time Capsule's Time Machine sparesebundle as it had a corruption. And now I am trying to do a first backup again.
    Unfortunately, I keep getting an error message telling me the machine can't create a disk image; I have no idea why. I have tried changing my computer name in case that makes a difference (but I don't see why as the previous name worked fine for a year or more).
    Since trying to start this new process, I have noticed that sometimes in the TM preference pane that the TC name is given a Time Capsule-1 as opposed to its normal name of Time Capsule.
    Below is the log captured from the TM widget.
    Starting standard backup
    Mounted network destination using URL: afp://graemeaustin@Time%20Capsule.afpovertcp.tcp.local/Time%20Capsule
    Backup destination mounted at path: /Volumes/Time Capsule-1
    Creating disk image /Volumes/Time Capsule-1/Austin MacBook_001f5bf6a447.sparsebundle
    2010-04-04 12:13:09.184 diskimages-helper[466:1603] Error loading /Library/Plug-ins/DiskImages/NUMPlugin.bundle/Contents/MacOS/NUMPlugin: dlopen(/Library/Plug-ins/DiskImages/NUMPlugin.bundle/Contents/MacOS/NUMPlugin, 262): no suitable image found. Did find:
    /Library/Plug-ins/DiskImages/NUMPlugin.bundle/Contents/MacOS/NUMPlugin: mach-o, but wrong architecture
    2010-04-04 12:13:09.186 diskimages-helper[466:1603] Cannot find function pointer VRPreviewCFPlugInFactory for factory 20D1C6B2-6A02-11D7-B5A6-000393D45566 in CFBundle/CFPlugIn 0x521da0 </Library/Plug-ins/DiskImages/NUMPlugin.bundle> (bundle, not loaded)
    2010-04-04 12:13:09.189 diskimages-helper[466:1603] Error loading /Library/Plug-ins/DiskImages/NUMPlugin.bundle/Contents/MacOS/NUMPlugin: dlopen(/Library/Plug-ins/DiskImages/NUMPlugin.bundle/Contents/MacOS/NUMPlugin, 262): no suitable image found. Did find:
    /Library/Plug-ins/DiskImages/NUMPlugin.bundle/Contents/MacOS/NUMPlugin: mach-o, but wrong architecture
    2010-04-04 12:13:09.191 diskimages-helper[466:1603] Cannot find function pointer VRPreviewCFPlugInFactory for factory 20D1C6B2-6A02-11D7-B5A6-000393D45566 in CFBundle/CFPlugIn 0x521da0 </Library/Plug-ins/DiskImages/NUMPlugin.bundle> (bundle, not loaded)
    Error 35 creating backup disk image
    Failed to create disk image
    Backup failed with error: 20
    Ejected Time Machine network volume.
    Any help is of course so very welcome.
    Thanks in advance
    Graeme

    I tried to start the backup again, after logging out and back in again (as I had done several times before), but this time the sparsebundle loaded ok and the backup started properly.
    So there's no need for anyone to spend any time on me.
    Graeme

  • WAD: Background-Image when dropping Web-Item

    Hi specialists,
    I've got the following issue:
    As soon as I drop an WebItem into (let's say) a div-element, the WAD adds the following items to the XHTML-Code of the div-Element:
    oheight="423" owidth="714" height="423" width="714" iwidth="714px" iheight="423px" src="file://C:/my documents/myname/local settings/Temp/bw/tmp_mime/gen_prevgenbmp377.png"
    and the following into the div's style-attribute:
    BACKGROUND-IMAG E: url(file://C:/my documents/myname/local settings/Temp/bw/tmp_mime/gen_prevgenbmp377.png);
    Can anybody explain this behaviour ? What are this background-Image (which seems to be a dummy-image) and the non-standard attributes used for ?
    So far I always needed to remove this attributes/style-element manually after inserting a new web-item - which is quite inconvenient... - Is there a way to disabble this

    You don't convert code from Spry.  You eliminate Spry and start over with a better Menu.
    If you have a budget to work with, Project Seven's Pop-Menu Magic3 is a good investment and it's mobile &  touch screen friendly.
    http://www.projectseven.com/products/menusystems/pmm3/index.htm
    jQuery Superfish (free)
    http://users.tpg.com.au/j_birch/plugins/superfish/
    jQuery MegaMenu 2  (free)
    http://www.geektantra.com/2010/05/jquery-megamenu-2/
    To answer your first question, you want a persistent indicator.
    Making a persistent page indicator on site wide CSS Menus
    Nancy O.

  • Large images --java.lang.OutOfMemoryError browser

    Hello,
    i am loading a tif file of 174MB into an signed applet.Problem is its not loading very large images in browser,but works fine in appletviewer(1 min) bcus(if i am correct) appletviewer use more JVM memory and i think browsers JVM use 16mb(whihc is not sufficient for loading large images) ,but i increased memory,still its not loading.Anybody has any solution for this,please help me
    thanks
    hithesh

    Hi Everyone.
    i forced my java console which is used by both IE and NN to use 256m
    like -Xmx256m.now its loading large images of 175MB.
    but any of u guys know how to force it in applet code,so that user who is using my applet doesnt have to bother about doing it?
    thanks
    Hithesh Gazzala

Maybe you are looking for

  • How can I get data back with Straight Talk on my 3gs

    I have an iPhone 3GS that I no longer use. I gave it to my daughter and set it up on Straight Talk. Everything was working perfectly except MMS until Monday afternoon ( 7 January) when 3G just disappeared. I called Straight Talk customer service, whi

  • Why can't i see my movies in iPhone 4?

    Why can't I play my movies in iPhone 4 like I use to? Before I could watch movies rented and bought from iTunes store but now I can't. Does enyone have this same issue?

  • New or Backup--Help!!!

    I got the iPad with Retina Display on Friday and love it.  My 4th iPad.  Tonight, I decided to connect it to my MacBook (summer 2012) to try to remove an app that went to the stage of installing but never finished.  When I hold down the icon to try t

  • Blank lines in Export files

    Hello,                                                                                When we export in BPC version 7 there are blank lines in the file. This gets in the way when we automate the export and import into another system since it picks up

  • ICloud imap server rejects my password

    Hi does anyone know how to stop the server from not accepting my password