Enlarging an image

Hi guys.  So I have my image gallery practically sorted.  The final thing I wanted to do is when one of my thumbnails was clicked, for the screen to darken and that image enlarge into the center.  I have to code to do this, but I am having difficulties implementing it.  My images are added to a container here
private function populateItems():void {
            for(var i:int = 0; i < Math.min(COLS * ROWS, data.picture.length()); i++) {
                var item:ModelsItem = new ModelsItem();
                item.data = data.picture[i];
                item.x = PADDING_LEFT + (i % COLS) * (ModelsItem.ITEM_WIDTH + GAP_HORIZONTAL);
                item.y = PADDING_TOP + Math.floor(i / COLS) * (ModelsItem.ITEM_HEIGHT + GAP_VERTICAL);
                item.addEventListener(MouseEvent.CLICK, modelClicked);
                itemsHolder.addChild(item);
                sp.source = itemsHolder;
                items.push(item);
            sp.verticalScrollPolicy = "on";
            sp.horizontalScrollPolicy = "off";
            sp.update();
ModelsItem is a class I have, itemsHolder is a MovieClip, sp is a ScrollPane.  This basically adds my images into their own containers, and then into a scrollpane.  Now on the MouseEvent, I call modelClicked.  I wont show the whole of this method as it is large, but it is complaining about
setChildIndex(e.target.parent as Sprite, (numChildren - 1));
I know its complaining as I am not using a Sprite, and the error is ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.  I have tried changing this to MovieClip, ScrollPane, ModelsItem, and I always get that error or a TypeError: Error #2007: Parameter child must be non-null.
Is there anyway to get pass this error?
I can show the whole function if required.
Many thanks
Nick

What object are you trying to set the child index to the top?  If your listener is assigned to the ModelsItem and the ModelsItem is just one of many children of the itemsHolder, then your line appears to be trying to make the itemsHolder move atop anything else.  I would think that you want the ModelsItem to be brought to the top, not the parent that holds all of them.
If the parent is truly what you want to adjust the index for, what do you trace for e.currentTarget.parent?
One other thing to consider is to use addChild instead of setChildIndex if the intent is to move an object above all others.  addChild does that without alot of extra code to try to deal with, and if you ask what some others often do... addChild is not adding a new child to the display.  It is taking the object you target and adding it as a child to the top index of the display list of whatever object is in the addChild's scope.

Similar Messages

  • The best way to enlarge an image for print?

    Hello
    I've been designing for print for several years. Occasionally I design large display posters/banners (A0, 6-sheet, billboard etc) which use a photographic image. Assuming that the image I have is smaller at 300ppi than the final print, what is the best way to enlarge the image? Based on my experience, it seems that there are three options (to make it simple, the example here assumes that my image is exactly half the size it needs to be printed at. I'm also assuming that the file I will supply to the printer will be a high res pdf exported from Indesign):
    1. Set up the Indesign file at 100% size, place the photo and have Indesign upscale the image to 200%. Export a high res pdf for print.
    2. Set up the indesign file at 50% size, place the photo with no upscaling by Indesign. Export a high res pdf and have the printer blow it up to 200%.
    3. Set up the Indesign file at 100% size, enlarge the photo in Photoshop to 200%, and place the photo with no upscaling in Indesign. Export a high res pdf for print.
    I have been advised that having Indesign upscale the image is not a good idea, and I never do this. I guess that option 3 is probably best, with Photoshop doing the work and the resulting pdf being the correct size. However, it's not always possible to do this – some posters are huge which means that the enlarged photo and the high res pdf will both be huge files, and I think also Indesign has a maximum document set up size anyway. So sometimes I use option 2.
    So firstly, why is it a bad idea for Indesign to upscale the image (as I say, I never do this, but I would like to know the technical reason)? Secondly, if the choice is between re-sizing myself in Photoshop prior to exporting the pdf, or having the printer enlarge a high res pdf, which is better? When I say 'better' I mean in terms of the quality/sharpness of the end result. Also, I assume that vector elements in my design will not be adversely affected in either scenario, is that assumption correct?
    Thanks

    Sorry for the added confusion.  It appears, after doing some checking in my CS2 apps ( InDesign), there is no setting for DPI / Output Resolution.  Only Transparency Flattener Setting. See screen shot below...
    If you select Postscript File in the Print Presets, you can access resolution settings for transparency flattening there, too...
    in the "Advanced" tab dialog...
    But, I like having the option in Illustrator 10 File > Document Setup where I can set the output resolution to whatever is appropriate.  In this case ( below ) I've got it set for 5080dpi / 300ppi.  You also have Effect > Document Raster Effect Setting where you can select 300ppi ( see screen shot below )...
    ...and Raster Effects Resolution setting...
    I may have misled you because the apps I have are not CS6; but you should be able to follow along in your CS6 apps in various settings dialogs.  Mainly, resolution settings can be set in the Print dialog boxes.
    The main thing to keep in mind is, because you are enlarging upon output, the base scaled down file must have enough resolution to maintain its appearance at the final size.  In the case of 50% or 25% file resolution should be maximum ( for current apps it appears 300ppi is considered high resolution.  Most apps now leave output resolution setting adjusted in the RIP / Print driver.
    I still use Distiller because it allows me to setup custom PDF settings and save them for future use.  You very well may be able to do that in CS6 apps; but I have a tried-and-true workflow that utilizes Distiller as a personal preference.

  • I downloaded a vector file from Shutterstock. How do I edit the text in Photoshop? If i enlarge the image- the pixels are awful and the image is distorted.

    i downloaded a vector file from Shutterstock. How do I edit the text in Photoshop? If i enlarge the image- the pixels are awful and the image is distorted.

    jessicae28493569 wrote:
    i downloaded a vector file from Shutterstock. How do I edit the text in Photoshop? If i enlarge the image- the pixels are awful and the image is distorted.
    What is the file format of the vector you downloaded?  Custom Shapes have a .PSP extension, and are placed according to this table.
    Preference filenames and locations in Photoshop CC
    They will then be loadable from the Custom Shapes drop down — click on the cog icon > Load shape > Find your downloaded vector.
    Once placed in the image, it will appear as a Shape layer, and can be edited with the Path, and Direct Selection tools (black and white arrows on the toolbar)

  • How to enlarge an image and not lose quality of picture?

    Hi,
    I'm new to Photoshop!
    I need to enlarge an image to go on A4 paper with a landscape orientation.
    I'm struggling..any help would be great!
    Thanks,
    Kate

    You're welcome.
    What you did was known as "scaling". If there are enough pixels, you can change the print size with noticing anything wrong.
    That's the best, because you are not adding or subtracting pixels, which is called "re-sampling".
    If the scaling did not work then you would use Image Size to enlarge the picture by guessing what pixels to add. Not the best way to go, because you are adding information not in the picture to make it look better.
    My Advice: If you have a camera, use the highest MP setting, shoot jpeg best quality, or even better RAW
    If you scan, plan. 300 ppi is a good start and should give you plenty of pixels at A4.
    That really the simple story. Read up to understand digital images.
    Gene

  • Bridge CC when copying resizes window to both monitors and enlarges all images to maximum size

    Bridge CC when copying an image resizes window to both monitors and enlarges all images to maximum size.

    Details, please.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers: 
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • I want to enlarge an image on a digital photo and save the enlarged image as a seperate photo

    I want to enlarge an image on a digital photo and save the enlarged image as a seperate photo

    We won’t stop you …
    Edit: Actually I’m naturally not entitled to talk for other contributors to this Forum …
    Crop (if necessary)
    Image > Image Size
    File > Save As

  • How do I enlarge a image?

    HI! guys,
    I am now learning to program with J2ME. I want to enlarge a image that is smaller that a smartphone screen, but I don't know what to do. Could anyone give me some hints? thanks! Any information or reference is greatly appreciated!

    Check out
    http://developers.sun.com/mobility/reference/techart/design_guidelines/image_resizing.html
    Regards, Darryl

  • Enlarging an image on mouseover without using Flash

    Enlarging an image on mouseover without using Flash
    I use DW MX 2004 with Windows 2000
    I want to create the following effect. I have two versions of
    an image,
    geyso_scr... (which is screen size) and geyso_sm (which is
    small). On
    mouse-over I want a larger window to open on top of my html
    page (but
    less than the full screen) and show the larger image file in
    whatever
    size I have created it.
    One mouse-off I want to restore the original image.
    I tried this with a straight image swap on the following
    page:
    http://www.tudo.co.uk/testing/hospiz_stiftung/shell/contents/vorstand/vorstand.html
    see row 2, image 1, Peter von Geyso.
    This works all right (on mouseover there is a shift of about
    1 px) but
    the screen sized image has been sized down to the original
    image (sm image).
    How can I conveniently get the large image hovering on top of
    the
    existing page?
    Can someone recommend a tutorial which describes how this is
    done?
    Or is there a utility which does it?
    On similar lines, a client wants to display a list of items
    as text in
    comparatively small font. On mouse-over he wants the
    list-item in
    question to become slightly larger (not only to change colour
    etc). Can
    that be done without converting the text into images.
    Is there any tutorial for that?
    (No point in arguing with the client that the text should be
    made large
    enough to read in the first place. I have tried that in
    vain.)
    Thanks for your help.
    Adrian

    netlace design wrote:
    > Hey Adrian,
    >
    > Maybe this will work for you. Take a look here at this
    demo
    >
    >
    http://www.cssplay.co.uk/menu/magnify
    Hi Netlace Design,
    This looks interesting, but where do I get the code for this.
    How is it
    done without javascript.
    Thanks,
    Adrian

  • Does lightbox just enlarge the image of the original file? What about image resolution?

    I'm in the process of buying cs5 (only have 3 which DW lightbox plugin doesn't support).  I'm interested in it based on all I've read on this forum.  It appears you don't have to have 2 images (one small one big) like you have to with a disjointed rollover, so how does it enlarge the image without losing a lot of resolution? Hope it's OK to ask a lightbox question here.

    Hi Kate,
    the question is whether you want to use a readily utilizable finished product, using ohterones page, or if you want/can to build a gallery on your own homepage.
    To 1. My friends and I, we are registered for example at Google's Picasa.
    English support: http://picasa.google.com/support/bin/topic.py?hl=en&topic=8989
    English help: Http://picasa.google.com/support/bin/answer.py?hl=en&answer=53209
    German link for the first steps: http://picasa.google.com/support/bin/static.py?hl=de&page=guide.cs&guide=16027
    To 2. Just look around in these pages, where your visitor is able to click from one image to another:
    http://www.lokeshdhakar.com/projects/lightbox2/  (I use it)
    http://www.shadowbox-js.com/ (I use it too)
    http://www.1stwebdesigner.com/resources/57-free-image-gallery-slideshow-and-ligh
    Hans-G.

  • Enlarge the image size pre CS

    Hello all,
    I would like to enlarge the image size in pre CS, Photoshop 7 to be exact with out streactching the image.
    Is this possible?
    I know I can create another document with the image size that I want, drag my folders over, and this would be one solution, yet I have a lot of layers.
    Curious if there was an easier way of doing this??
    Thanks!!

    DRivera wrote:
    Joslin thanks for the response.
    I think I left some information out though.
    I would like to enlarge the actual image size of the document, yet keep everything within the document as the same size..
    Is there an easy way to do this with out cutting and pasting images within the document??
    I am not following you.
    Do you mean enlarge the Canvas size, thus leaving a border round the original?
    When I said "specifics", I meant you to give the actual dimensions and resolution* of the original image and dimensions of the desired result.
    * See Image > Image Size.

  • Help! Need to enlarge an image within document

    Hi
    Can anyone help? I need to enlarge an image within document.
    Not zoom, but physically enlarge the dimensions of an image to fit
    the page. Right now, it is a 3 x 5 image but I need to get it
    closer to 11 x 17
    thanks in advance

    {color:red}CROSS POSTED{color}
    {color:0000ff}http://forum.java.sun.com/thread.jspa?threadID=5260569
    {color}
    Cross posting is rude.
    db

  • How to enlarge the image when the mouse is clicked

    I want to enlarge the image when the user click the image. How to do it by muse? Thank You!!!

    Hi,
    When you create a page in Muse called "Home" or "Gallery" or other else, when you export your site as HTML you must have a file called "home.html", "gallery.html" or "other else.html". Remember in what page you putted the Gallery in Muse and edit it with notepad, wordpad or similar and find the code where the gallery is linked (search the name of one of your images, is the best way to find it) and replace the code with something similar like that:
    <code>
    <a href="images/medidas06.jpg" rel="lightbox[gallery]"><img class="block ImageInclude" id="u3527_img" data-src="images/medidas06.jpg" src="images/blank.gif" alt="" data-width="248" data-height="360"/> </a>
    </code>
    The path to the JPG files must be ok with your website.
    The other steps are well explained by the readme of the lightbox library
    Regards

  • Guys, any idea what is the exact thing to put  to resize or enlarge the image size  to make the phot

    Guys, any idea what is the exact thing to put  to resize or enlarge the image size  to make the photo larger or bigger when uploading in Facebook?? thanks

    You could check "Resize to Fit" and specify the exact dimensions you want in the Lightroom Export dialog box.
    But a word to the wise ... don't bother ... there is a maximum size that Facebook allows for photos, and you'd be wasting your time specifying anything reasonably large in Lightroom's Export dialog box.

  • When I click to enlarge an image in eBay, Firefox does not respond.

    I open up Firefox and go to the eBay website. I click on an item to view the listing. I then click on the image, or the 'Enlarge' icon to view a larger version of the image. The problem is that Firefox does not respond. It comes up with "javascript;" in the little dialogue box that pops up in the bottom left corner.
    When I use Internet Explorer, I don't have the problem. Could anyone suggest what is wrong?

    Make sure that you do not block JavaScript
    * https://support.mozilla.com/kb/JavaScript
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • Enlarge an image when clicked in a report

    Hi i am using Apex 4.2.2
    I have a requirement where I can display images in a report. Images are stored as blob in the database.
    I created an interactive report and I can display the image in the report. But when I need to know when I clicked on the image it should enlarge.
    Can someone help me out with this.
    Thanks,
    Rik

    hello
    not trying to hijack the thread but needed some clarification
    your very short tutorial
    http://alt-web.blogspot.com/2012/11/primer-for-using-jquery-plug-ins.h tml
    was really informative. Just have a couple quick questions:
    you state:
    "the core code library which you ref in your <head> tags,"
    the below code just has to be declared ONCE at the beging in your head section, correct?
    <!-- jQuery latest core library from CDN-->
    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js">
    </script>
    then any number of jquery plugin scripts can be placed in ANY order in your head section following the above code, correct?
    "the function code inside <script> tags to invoke the plug-in."
    so then in the body, does the functions code have to come RIGHT AFTER the place it is being used?
    example
    <body>
    <div class="slideshow1"
    </div>
    <!--Plug-In Function Code1-->   
    <script type="text/javascript">
    </script>
    <div class="slideshow2"
    </div>
    <!--Plug-In Function Code2-->   
    <script type="text/javascript">
    </script>
    </body>
    or can you take all the function codes and paste them in the end outside of the respective divs that are using the code?
    ie does the position of the code matter?\
    thanks guys
    Nancy O. wrote:
    Try jQuery Fancybox
    http://fancybox.net/
    If you're new to using jQuery plugins, see this primer:
    http://alt-web.blogspot.com/2012/11/primer-for-using-jquery-plug-ins.h tml
    Nancy O.

  • Advice for HTML and CSS code to enlarge an image when clicked ?

    Hi,
    When clicking on a thumb image I would like users to able to view an enlarged version in the same webpage and then click on close to go back to the thumb image.
    This is not in a gallery it is a for sale page which contains 3 images.
    I am new to this - learning all the time any help greatly appreciated !!
    Kind regards, Matt,
    ps code used so far;
    <img src="images/gallery_images/thumbs/120px-Glass_1.jpg" alt="Glass image 1" width="150"/>

    hello
    not trying to hijack the thread but needed some clarification
    your very short tutorial
    http://alt-web.blogspot.com/2012/11/primer-for-using-jquery-plug-ins.h tml
    was really informative. Just have a couple quick questions:
    you state:
    "the core code library which you ref in your <head> tags,"
    the below code just has to be declared ONCE at the beging in your head section, correct?
    <!-- jQuery latest core library from CDN-->
    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js">
    </script>
    then any number of jquery plugin scripts can be placed in ANY order in your head section following the above code, correct?
    "the function code inside <script> tags to invoke the plug-in."
    so then in the body, does the functions code have to come RIGHT AFTER the place it is being used?
    example
    <body>
    <div class="slideshow1"
    </div>
    <!--Plug-In Function Code1-->   
    <script type="text/javascript">
    </script>
    <div class="slideshow2"
    </div>
    <!--Plug-In Function Code2-->   
    <script type="text/javascript">
    </script>
    </body>
    or can you take all the function codes and paste them in the end outside of the respective divs that are using the code?
    ie does the position of the code matter?\
    thanks guys
    Nancy O. wrote:
    Try jQuery Fancybox
    http://fancybox.net/
    If you're new to using jQuery plugins, see this primer:
    http://alt-web.blogspot.com/2012/11/primer-for-using-jquery-plug-ins.h tml
    Nancy O.

Maybe you are looking for

  • External Hard Disk not showing up on Finder

    Hi My HP Pocket Media Drive (USB), when plugged into my MacBook, does not show up on the Finder, even though it shows up on System Profiler. It only shows up on Disk Utility in certain occasions (such as after shutting down and starting up again). I

  • How do you completely cutoff your iPhone so the thief can't use it anymore?

    I know there is a way to turn it off completely so it is basically a dead phone.

  • ITEM in TRANSFER PROCESS_Alert monitoring

    Dear Gurus, I am facing next issue:      SC got stacked in the status: ITEM IN TRANSFER PROCESS.      We have find out root cause: IPC server was down when last approver was approving.      Error message is displayed in the alert monitor under loc

  • Resolving constant-pool of clazz Luicc/access/fileadministration/AdminFileV

    Hi, can anyone help? I have this problem whenever I import the uicc.access.fileadministration into the Eclispe 3.1 (with JCOP plugin) and building my project. The full error string is "resolving constant-pool of clazz Luicc/access/fileadministration/

  • I lost my home network!

    Hi, I recently installed a new router - WRTP54G . I used to have our 2 machines on a home network. However, that is all gone now. When I open My Network Places on my pc, nothing at all appears. On the other pc only the shared folders on that pc appea