Larger image loading and when dropped

Hey.  I'm working on this image clipping, where the thumbnails of the images are displayed.  I get each image

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 and drop off the thumbnail image

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, it's perfect, because if the image is not filed in the clip, called 'film', it will be placed in the dial in the correct position.  I have just a coupld of questions currently.  I don't want pics/1.png to appear on every drop, this was used for a test.  What I need is for each image of the "big picture to display, all of which have the same name as the smaller image, just in a different folder.  The images are in the xml as file

<image>
      <url>pics/img_1.png</url>
  </image>

So is there anyway I could use the code above to load the image large associated with the small image?  If event.target points to the current tile picked up, I could do something like event.target.url to point to his name or something?

Any advice appreciated

You should be able to store the filename as a variable of the thumbnail image and then use it when it comes to loading the image, as in...

my_loader. Load (new URLRequest("pics/"+event.target.variable));

Tags: Adobe Animate

Similar Questions

  • OutOfMemoryError come when discovers the large image (2048 * 1024) and 89 KB

    Hello

    Please someone help me solve my problem of "OutOfMemory" coming in my Strøm BB device while I don't want to see the size of the large image. The size of the image that I use is about 89Ko and 2048 x 1024 px.

    I could see the image that is 140 kb and 1024 x 768 px, but not for 89 KB and 2048 x 1024 px.

     

    Here is my code to see the picture: -.

         

           public static Bitmap getBitmapFromUrl (String photourl) {}
    Bmf bitmap = null;
    data Byte [] = null;
    try {}
        
    FileConnection fconn = (FileConnection) Connector.open (photourl, Connector.READ_WRITE);
    java.io.InputStream entry = fconn.openInputStream ();
        
    ByteArrayOutputStream Baos = new ByteArrayOutputStream();
    int j = 0;
    While ((j = Input.Read ())! = - 1) {}
    Baos.Write (j);
    }
                
    data = baos.toByteArray ();
               
    Baos = null;
    Input.Close ();
    fconn. Close();
    entry = null;
    fconn = null;
                
    BMF = Bitmap.createBitmapFromBytes(data,0,data.length,1);<-- at="" this="" step="" i="" am="" getting="" the="" outofmemory="">

    data = null;
            
    } catch (Exception e) {}
    System.out.println ("Exception getBitmapFromUrl() DeleteIndividualPhoto :"); ")
    }
    return the bmf;
    }

    Thank you

    TEJ

    My understanding is that a Bitmap is a full image, uncompressed, and the Blackberry uses 2 bytes per pixel to represent the color, then the image of 2048 * 1024 means about 4 MB of storage.  It's not bad, especially since I suspect that you have more than one of them.  And of course the follow-up to this question is how you view this image size on the device?  Seems to me that this file size is a bit of an overdose.  But even if you don't need it, have you considered using the scale parameter of

    Bitmap.createBitmapFromBytes

    scaling of the image according to a more reasonable size before you create the Bitmap image?

  • When I look at my pictures on library it loads and it is super grainy, as my iso was too high, but when I look on developing it seems. What is happening and how I keep good fixed when I get back to the library and export?

    When I look at my pictures on library it loads and it is super grainy, as my iso was too high, but when I look on developing it seems. What is happening and how I keep good fixed when I get back to the library and export?

    Please see: photos look grainy on library but not on developing

    soft blurry images / when you view in the library but strong in develop mode? Lightroom forums

    Kind regards

    Mohit

  • I recently bought two pictures for my youth group. When I looked behind them image is a larger image, but, when I downloaded it it's a smaller image. How can I get the enlarged image?      #93598775 &amp; #18109349

    I recently bought two pictures for my youth group. When I looked behind them image is a larger image, but, when I downloaded it it's a smaller image. How can I get the enlarged image?#93598775 & #18109349

    Follow these steps: I downloaded my 10 free images and they all have the Adobe watermark on them, so I can't use them. Why do they have a watermark on them?

  • How load and access bitmap images?

    Hey there!

    After a few days of frustration and of searching the Web, I finally understand how to make a sheet of sprite and animate it.  I understand the classes and how to import external actionscript files that contain in my Flash project.  The problem is, I can't understand how to name and load a bitmap from the folder and pass on my functions as arguments.  > _ <

    How load and access an external bitmap in Actionscript 3.0?

    I use a class that I found online here: http://www.bensilvis.com/?p=229

    The problem comes when I try to access my bitmap parts, while he tries to do here: http://www.bensilvis.com/?p=317

    var currentSprite : SpriteSheet = new SpriteSheet (sheet, 20, 20) ;


    It is the only line that confuses me because it uses a variable "sheet", which is a bitmap, and I don't know how to set a name / my external bitmap image as such.

    SpriteSheet(tileSheetBitmap:Bitmap, width:Number = 16, height:Number = 16)
    • tileSheetBitmap: the bitmap of the sprite sheet that we will use
    • width: the width of the tiles in the map
    • height: the height of the tiles in the map

    Thank you!  < 3

    you use the loader class to load a bitmap.  When the loading is complete you can cast content loader as a bitmap for the help of the compiler with more coding.

  • Thumbnail images, more large images and text PROBLEM

    Unclear title, with a problem difficult.

    What I am wanting to do is, when I click on a thumbnail image, I want to have the content of the DIV to display the image and the thumbnail information you just clicked the right to change accordingly. I use Dreamweaver CS5 on MAC:

    -J' have a page divided into 2 vertical columns. On the left, I have 6 thumbnails in their individual DIVs, all wrapped together in another DIV container

    -on the right side of the page, I assigned a large DIV to display a large image with a description below what the project was etc...

    I know that you can attach a behavior to the thumbnail to change the big picture on the right, but I have a short paragraph of the text below the big picture too, and I don't particularly want to make the image and text a huge image. I want to keep the text, text.

    How can I do? Is it a simple thing? or y at - there a lot of coding to do this with JQuery, Javascript or something? Is there something to do with the data record sets involved?

    Is it possible to do that when you click on the thumbnail it can charge the relevant image and text in the div on the right?

    Sorry if it did not clearly explain, do not know how do it, so don't know if I'm describing correctly.

    As always, all the help and advice very welcome.

    In the right column, you would-

    Legend legend legend

    Legend legend legend

    ...

    The CSS would be-

    {of signs

    display: none;

    / * Add other styles as needed for the caption * /.

    }

    The thumbnails would each of the following behaviors:

    * onclick set the desired right column div to "display: block" using behavior ChangeProperty of DW.

    * also onclick set all the other div of the right column on ' display: no "DW ChangeProperty behavior.

    Be aware that how to apply this behavior for inches is one) first to wrap every inch in an anchor null () and then apply the behavior to the anchoring of the packaging not to the image.  Alternatively, you can apply the behavior to the image and then using the behaviors panel, change the behavior of "onClick" event to " onClick.

  • Photoshop CS5 crashing my Mac when resizing of large images

    I have not much to explain this further, but Photoshop CS5 crashes my Mac when I resize large images.  Small images are very good but big 300 dpi images it crashes without warning.  Don't know what to do.  The only other similar thing is that after Effects CS5 crashes my Mac when I cut a clip.  It completely disables my Mac when I cut a clip.

    I have 8gigs of Ram and am under iMac 27 "Core i5

    Any help would be appreciated!

    Thank you

    HAL

    Solved!     Thank you all.

    Yes, it's the RAM. Despite the Ram chips all being the same type and properly spec'd and be swapped round and reinstated by replacing them with a manufacturer different type solves the problem.

    If someone else decided to buy third-party Ram for their 27 "iMac - buy the Samsung because they seem to work without problem.

  • Part of the browser screen will flash intermittently and when trying to select a link out of my drop-down lists, click with the mouse selects the link above it.

    These problems occur only when you use Mozilla Firefox. I am using a Lenovo Thinkpad:
    1 site Web seem to flicker on the images, videos, maps, when the mouse moves around the screen.
    2 pointing the mouse over a link in the browser and a left click activating the link above (if it exists)

    Do not experience problems with google or ie. It started a few days ago.

    Thoughts?

    Hello paulo.eichelberger, try Disabling graphics hardware acceleration.

    You will have to perhaps restart Firefox for it to take effect, so save any work first (e.g. you compose mail, documents online that you are editing, etc.).

    Then perform the following steps:

    1. Open the Firefox Options window as follows:

      • Click the menu button

        then select Options.

    2. In the Options of Firefox window, click the Advanced tab, and then select general.
    3. You will find in the list of parameters, the checkbox use hardware acceleration when available . Clear this check box.
    4. Now restart Firefox and see if the problems persist.

    In addition, please check the updates for your graphics driver by following the steps in the following knowledge base articles:

    This solve your problems? Please report to us!

    Thank you.

  • I get emails with pictures and when I send them to others. they open them but the images are not displayed. The photos are there when I send them. Thank you

    I get emails with pictures and when I send them to others. they open
    their place but the images are not displayed. The photos are there when I send a
    them. Thank you

    Make sure that your security software (antivirus) is not blocking attachments.

  • I get "failed to load your firefox profile. It may be missing or unreachable. "When I open firefox and when I try to open the Profile Manager.

    I get "failed to load your firefox profile. It may be missing or unreachable. "When I open firefox and when I try to open the Profile Manager.

    OK I don't know what helped me exactly... but that's exactly what I've done so far.

    1 windows-key + r & open '% appdata%\Mozilla '.
    2 right click somewhere on the empty space in this folder, go to properties and make sure all protection read only for containinh the files and folders of
    3. Open firefox (version 13) has not been opened. Error as seen in the screenshot above.
    4 uninstall firefox.
    5. install firefox beta 14.6.
    6. Open firefox, works very well.

    I'm not sure if step 2 has helped as well as of the uninstall and reinstall.

    Thank you once more for the answer.

  • I've updated for picture with the captain and when I plug in my iPhone it loads the same pictures twice each time how it stop loading the same things every day?

    I've updated for picture with the captain and when I plug in my iPhone it loads the same pictures twice each time how it stop loading the same things every day?  I tried to make the old default iphoto but picture still open when I plug in my iPhone?

    I tried to make the old default iphoto but picture still open when I plug in my iPhone?

    When the iPhone is connected and Photos opens, select iPhone in sideba of the windowr of Photos. Then, uncheck the option 'Open for this iPhone Photos' below the toolbar.  Do this for all your iPhones. The hook should be unmarked for each device individually.

  • The CPU usage of Flex-2 15 30% when idle after upgrade to Windows 10 * contains large Images *.

    BTW my 15 Flex-2 upgrade to Windows 10 Home took place, working after a few minor updates manual driver (WLAN, graphics)...

    However, since the upgrade, I feel an annoying symptom, which has been reported by users of other brands as well.

    Although I already follow most of related advice (known assassination unnessary process, change of reports), the CPU usage is still constantly around 30%, causing the fan to operate continuously and even more unsatisfactory: extremely affecting the battery life! Using processexplorer that I discovered, that svchost (or one of its processes) is at the origin of the problem, not one of the applications. As I am not able to dig deeper, I wonder what measures taken so far by Lenovo to have the Microsoft fix this problem.

    Attached: screenshots 'notification', 'Treaty', 'system '.

    Other tips are appreciated.

    Mod edit: added warning about large images for those who have slow Internet service.

    UPDATE Oct10:

    Went to manually check tile Lenovo Support and offered an update of SystemInterfaceFoundation.exe.

    Run the update and believe it or not: the CPU usage is almost back to normal (about 4%) with browser open FF and AV SW race. less than 2.5% use svchost. Fan turns down to 'stop' or low speed.
    Can someone pls? Be wary of situation for the next few days...

    Update Oct11:

    No idea how to mark this "resolved" thread: System runs stable like a charm. Quiet, low CPU utilization and the normal battery life.

    No other text. Problem solved. See above

  • Computer is very slow to download programs, especially at the start and when I try to watch a video clip, it takes forever to load.

    Original title: slow and jerky

    My computer is very slow to download programs, especially at the start.  I tried to reduce the programs start, but in vain.  Also when I try to watch a video clip, it takes forever to load, and then when he does, she plays in 2-3 seconds intervals.  Help

    Hi LouisBode,

    1 Windows operating system you are using?

    2 did you a recent software or hardware changes to the system?

    3. What is the brand and model of the computer?

    4. what program you use to play the videos?

    5. this happens with all the videos that you try to play?

    Method 1:

    If you are using Windows 7, you can run the troubleshooter of performance and check if it helps.

    Open the troubleshooter of Performance

    If you use Windows Vista, then try to run the Fixit from the link:

    Difficulty of Windows system performance slow computer problems

    Method 2:

    You can read the article and try the steps to solve the problem:

    How to resolve performance issues during startup in Windows Vista

    Note: This article also applies to Windows 7.

    Method 3:

    You can also refer to the computer or the device manufacturer's Web site and install the latest version of the drivers for graphics cards.

    Updated a hardware driver that is not working properly

    Update drivers: recommended links

  • I try to play a game online game and when it loads it says that the firewall is bloacking it helped me

    I try to play a game online game and when it loads it says that the firewall is bloacking it helped me

    Hello
    You can turn your firewall on and outside:
    http://Windows.Microsoft.com/en-us/Windows-Vista/turn-Windows-Firewall-on-or-off
    hope this helps,
    B Eddie

  • When I start the system, I get the message "failed to load Launcher dll" I hit OK and the system load and seems to work.

    I am under Windows Vista Home and when I start the system, I get the message "failed to load Launcher dll" I hit OK and the system load and seems to work. I'm afraid that something is not correct, what do you recommend? The two available Service Packs have been installed.

    Discussions were merged.

    Deleted duplicate.

    Original title: failure of the Dll

    The error seems to be a common problem with Dell laptops:

    http://en.community.Dell.com/search/#q=Lanucher%20dll&sort=rating%20desc&defaultAskForumId=0&pi1680537405=1

    It seems that apoint.exe gives the error that indicates that the problem is with the Alps touchpad driver.

    Try to uninstall the Alps touchpad driver and then install the latest version available from Dell for your laptop:

    http://www.Dell.com/support/home/ca/en/cabsdt1/product-support/product/Inspiron-1545/drivers

Maybe you are looking for