Bringing in External images

Hi all,
I'm using the following code to bring in external images, however, I would like the images to come in and be behind everything else instead of placing themselves on top of everything.
var l:Loader;
roll_btn.addEventListener(MouseEvent.ROLL_OVER, roll_btnClicked);
function roll_btnClicked(evt:MouseEvent):void {
     l = new Loader();
     l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
     l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
     l.load(new URLRequest("jackdaw.jpg"));
     l.x = 0;
     l.y = 270.25;
function loop(e:ProgressEvent):void
     var perc:Number = e.bytesLoaded / e.bytesTotal;
     percent.text = Math.ceil(perc*100).toString() +"%";
function done(e:Event):void
     percent = null;
     addChild(l);
Anyone know how to do this? I'm assuming you need to tell it to sit on another layer. Not quite sure how to do this though.
Thanks for any help.
Cheers
T

Use addChildAt() instead of addChild(), and specify 0 for the index to place it at...
addChildAt(l,0);

Similar Messages

  • Using External Images

    HELP! I have a large presentation the used a lot of images
    and need to externalize them using load image in the time line,
    however, i dont want to use buttons to do so. How can use this
    feature so that the images come in seamlessly without using buttons
    to retrieve the external files?
    In addition, how can I do this with external movies as well?
    With out using buttons to bring in external movies in the
    timeline?

    Just by using the loadMovie() method in your ActionScipt, it
    will be executed when that frame is reached in the timeline during
    playback without the need of the user clicking a button. Here's the
    LiveDocs link for working with loadMovie():
    http://livedocs.macromedia.com/flash/8/main/00001562.html
    Hope that helps!

  • Problems with animated masks and external images

    I have an instance of a movieClip on the stage and I load an external JPG into the movieClip.  The movieClip is masked by a layer that begins animating on a certain frame.  As soon as I reach that frame my externally loaded JPG disappears.  The movieClip doesn't mind being masked, but as soon as the mask animates the external image goes away.  The mask animation is shapes drawn frame by frame.
    It is interesting to note that if I create a Class and load the JPG into the movieClip (or do this in a constructor) I do not experience this problem - it is when the JPGs are loaded into an instance of the movieClip that lives on the stage that I encounter this. Unfortunately that is not an option in my project (since I have to get the path for the JPG from an xml file I am loading).
    Could someone please help me with this?

    that's a flash bug.

  • All links are bringing up same image. PLEASE help

    I have had minimal problems working on GL CS2 version 8.0.1 on my Macbook Pro, and I really like the program. Now I have added a photo and it has an open new window action attached to it. (just like all my photos do). I uploaded the page and the new files with it to the FTP server. (same way I always have). Problem is, when I go online or check it with any browser on GL and I click any link or photo on that page, it brings up that photo I downloaded. It seems to have nothing different about it than the other photos and links, but it does this on all browsers and I can't figure out why. I looked through this and other forums with no help. If anyone can help I would greatly appreciate it.

    aquavisionproductions.com---photography page--clouds4---3rd row down all the way right... any pic you click will bring up this image, and the one you clicked second. My home page was doing this too with an intro video.. but I thankfully haven't dowloaded that page yet. I'm afraid to update any pages now, in fear that this will keep happening.

  • Created a book and now want to bring in other images to the strip below.

    I have created my draft book but I found 25 images were missing from the file I created the book from so I now want to bring in those images which are on a memory stick.  I tried importing and they are in a separate file in the catalog.  I can't seem to get those over into the file related to the book.  How should I proceed? move the images from that file to the books file or reimport them into the books file and MOST importantly how do I do it since I have obviously been unable (my failings) to make it happen
    Thanks
    Jim

    Thanks for looking at this.  I realize my novice nature and lack of the wrong vocabulary so lets ask it this way and I know this is a real basic question.  I have a collection that is embodied in the saved book.  and I can see it in collections with the book icon.  I have a memory stick to import from.  What is the process, because when I went to import these I did not see that collection in the list of target  locations for the import.  Best procedure to import more into the existing collection?
    Thanks for putting up with my uneducated attempts, I will be working on betting better
    Jim

  • AS3 Load external image and add multiple instances to mcs

    Hi,
    Is there any way to load an external image and add it to more than one movie clip?
    Thanks,
    Chris McLaughlin

    Hi kglad,
    I was loading a larger jpeg to which I was applying 20 different masks so using the bitmapdata class to create duplicates was the best solution.
    It took me some time to wrap my head around it, but all is well.
    Thanks for pointing me in the right direction.
    Best regards,
    Chris

  • Loading external Images in MovieClips

    Dear All,
    I am trying to load the external images in Dynamically
    created Movie Clips.
    Can you please help me out from this.
    I am trying something like this:
    Container_mc.image_mc ( I want to load the Images inside the
    imag_mc clip)
    Regards,
    Sridhar B
    Container_mc.image_mc
    imag_mc

    Hi,
    Following is my problem:
    I am trying to trace the "idValue" property on runtime but it
    is showing error. Can you please tellme how add Images and
    properties runtime.
    var loader:Loader = new Loader()
    addChild(loader)
    loader.load(new URLRequest("images/01.png"))
    // Assigning a value to idValue property
    mc_mainSWF.idValue = 40
    mc_mainSWF.addChild(loader)
    mc_mainSWF.addEventListener(MouseEvent.CLICK, checkID)
    function checkID(event:MouseEvent)
    // And i am geeting error here
    trace(event.target.idValue)
    Regards,
    Sridhar B

  • Including External Image in JSP

    Hi all,
    I need to be able to load a external image (image in a specific loaction on the server but not in the webapp location). Unfortunealty I cannot use servlets and have to code it in the JSP directly.
    So far I have this code :
    <%@ page import="java.io.*"%>
    <%@ page import="javax.imageio.stream.*"%>
    <%@ page import="br.gov.sc.tce.sco.view.framework.Constants"%>
    <%
         response.setContentType("image/gif");
         String  fileName = Constants.UPLOAD_FOTO_HOME + ( request.getParameter("fileName") == null ? "" : request.getParameter("fileName") );
         FileInputStream fis = null;
         OutputStream os = null;
         try {
              fis = new FileInputStream(fileName);
              os = response.getOutputStream();
              while ( fis.available() > 0  ) {
                   os.write(fis.read());
         } catch (Exception e) {
              e.printStackTrace();
         } finally {
              if (fis != null) {
                   try {fis.close();} catch (IOException e1) {} finally {fis = null;}
              if (os != null) {
                   try {os.flush();os.close();} catch (IOException e1) {} finally {os = null;}
    %>and in the pages that need to include pages I do something like the following :
    <img src="<%=appName%>/include/jsp/showImage.jsp?fileName=<%=((Foto)fotoCad).getNomeArquivo()%>" width="60" height="60">This all seems to work ok , the images display , except that I get a stacktrace error afterwards of java.lang.IllegalStateException: getOutputStream() has already been called for this response
    Any help would be appreciated
    Regards
    Robin

    If you want to get rid of the exception, you have to remove all carriage returns between your JSP tags
    Explanation:
    If you put a carriage return in your code, the generated servlet generates: out.println("\r\n") (depending on your os)
    In other words it has already got the output stream/writer in order to print out some characters to the stream. Hence the generated error message.
    The following should generate without any exception raised.
    See how carriage returns are eliminated?
    Note this also includes no carriage return at the END of the file after the closing %>
    <%@ page import="java.io.*"
    %><%@ page import="javax.imageio.stream.*"
    %><%@ page import="br.gov.sc.tce.sco.view.framework.Constants"
    %><%@ page contentType="image/gif" %><%
         String  fileName = Constants.UPLOAD_FOTO_HOME + ( request.getParameter("fileName") == null ? "" : request.getParameter("fileName") );
         FileInputStream fis = null;
         OutputStream os = null;
         try {
              fis = new FileInputStream(fileName);
              os = response.getOutputStream();
              while ( fis.available() > 0  ) {
                   os.write(fis.read());
         } catch (Exception e) {
              e.printStackTrace(System.out);
         } finally {
              if (fis != null) {
                   try {fis.close();} catch (IOException e1) {} finally {fis = null;}
              if (os != null) {
                   try {os.flush();os.close();} catch (IOException e1) {} finally {os = null;}
    %>

  • No external images in Outlook 2013 & no internet access in Internet Explorer 11

    I use a an automatic configuration script http://XXXXukproxy.internal.XXXXXXXX.com/proxy.pac
    I also use a combination of 2 VPNs through Avaya VPN Client or Cisco AnyConnect Secure Mobility Client.
    When I'm connected to the VPN with the Avaya VPN Client I can't get ANY internet pages to load in Internet Explorer and I can't get ANY external images to load in Outlook 2013
    I can use the exact same proxy settings in Chrome and Firefox with no problems what so ever.
    If I remove the automatic configuration script I still get no internet access in Internet Explorer.
    When I'm connected to the VPN with the Cisco AnyConnect Secure Mobility Client it's fine. It's also fie when I'm not using any of the VPN's
    Anyone got any ideas? Can't be the proxy or the VPN as it's perfectly ok in Chrome and Firefox.
    Thanks in advance.

    Hi,
    First please run Outlook in Safe Mode:
    Press Win + R and type “outlook.exe /safe” in the blank box, then press Enter.
    If there’s no problem in Safe Mode, disable the suspicious add-ins to verify which add-ins caused this issue.
    We may also try to change the Location of Temporary InternetExplorer Files in Internet Explorer to test the result (the steps below are for IE 10):
    Internet Explorer -> Internet options -> General
    tab -> Under Browsing history, click on Settings
    button -> Temporary Internet Files tab -> Under Current location, click on
    Move folder button -> Choose the new location, click
    OK.
    Regards.
    Melon Chen
    TechNet Community Support

  • Loading External Images Causes Memory Leak

    I have been working on an Actionscript 2.0 project that basically loads external images.
    Everytime i load and unload a new image, memory increases to 1 or 2 MBs
    If all the images are in cache, then it increased to 4 or 8 KBs
    In the unloading of images, I have removed loader and the container of the image.
    Any thoughts why it is behaving like that?
    Please find the sample code snippet below.
    btn_load.onRelease = function()
    loadImage();
    btn_unLoad.onRelease = function()
    unLoadImage();
    var mcListener:Object = new Object();
    var container1:MovieClip;
    var mcLoader:MovieClipLoader;
    var loader_reference = this;
    var n=0;
    function loadImage(){
    var image_arr = ["http://xyz.com/image1.png","http://xyz.com/image2.png","http://xyz.com/image3.png","http:/ /xyz.com/image4.png","http://xyz.com/image5.png"];
    var image_url = image_arr[n];
    if(n==image_arr.length-1) {
      n=0;
    }else{ 
      n++;
    container1 = loader_reference.createEmptyMovieClip("container1", loader_reference.getNextHighestDepth());
    mcLoader = new MovieClipLoader();
    mcLoader.removeListener(mcListener);
    mcLoader.addListener(mcListener);
    mcListener.onLoadComplete = function(target_mc:MovieClip, httpStatus:Number):Void {
    mcListener.onLoadInit = function(target_mc:MovieClip):Void {
      target_mc._x = 300;
      target_mc._y = 200;
      target_mc._width = 300;
      target_mc._height = 250;
    mcLoader.loadClip(image_url, container1);
    function unLoadImage(){
      mcLoader.unloadClip(container1);
      mcLoader = null;
      container1 = null;
      removeMovieClip(loader_reference.container1);
    Thanks in advance.

    that code should only execute once.  fix that.

  • Loading External Images

    Hey, I've been having a niggly problem for a while now. I'm
    using MovieClipLoader and a Listener to load in external images.
    All the images load in fine, but often (not always) the onLoadInit
    and onLoadComplete events don't seem to work on the last image I
    load, so if I've got a dynamic text box that I want to disappear
    when loading is complete, it doesn't, only on the last image of a
    group, even tho the image itself loads correctly.
    Anyone come across this before? You can see an example on the
    index page of
    this site.

    nice site, good job :) I would guess that if you are using
    both events on the same call, one is getting triggered before the
    other, since they both operate at a similar time. similar but not
    the same, onLoadComplete happens when the load is complete,
    onLoadInit happens when the first frame of the loaded timeline
    plays. Therefore if your listening for both on the same load call,
    one may happen before the other, and may override or change the
    event sequence, occationally.
    Just a guess though, I think you should consider using one or
    the other, and firing all other functions from there.

  • How to receive the original _width and _height of an external image

    Hello,
    When i load an external image (.jpg) how can i trace the
    original height and width of
    this image?
    I already made a MoveiClip loader, so i can fire a function
    when the image is loaded completely.
    But i don't know how to get this value of the original image
    size, because i placed this
    image in a container_mc.
    Does someone know how ?
    Regards,
    Micheal

    your 'container_mc' recieves the exteral image's original
    size, thus you can
    easily find out your image's size
    (unless the container's x & y scale aren't 100% - in that
    case u need to
    first set it back to 100% and then u can enquire the size).
    eRez
    "Michealnl" <[email protected]> wrote in
    message
    news:ev32nf$h0t$[email protected]..
    > Hello,
    > When i load an external image (.jpg) how can i trace the
    original height
    > and
    > width of
    > this image?
    >
    > I already made a MoveiClip loader, so i can fire a
    function when the image
    > is
    > loaded completely.
    > But i don't know how to get this value of the original
    image size, because
    > i
    > placed this
    > image in a container_mc.
    >
    > Does someone know how ?
    >
    > Regards,
    > Micheal
    >

  • Use Web API url for loading an external image in a report

    Hi there,
    I am trying to host an image in a report, which is coming out of a Web API. I am able access the image through a URL in a browser:
    https://companytest.com/api/TestFormImage?id=10358&EntityId=6719&imgMetadataName=TestDiagram
    Can anyone please help me how to include this in a report ? I have tried to include this as an external image with the URL embedded as a string like: 
    =string.Format("https://companytest.com/api/TestFormImage?id=10358&EntityId=6719&imgMetadataName=TestDiagram")
    NOTE: the output of the Web API is an image of MIME type PNG.
    Thanks in advance!
    Regards, Laks

    To add an external image
    In report design view, on the Insert tab, click Image.
    On the design surface, click and then drag a box to the desired size of the image.
    On the General tab of the Image Properties dialog box, type a name in the
    Name text box or accept the default.
    (Optional) In the Tooltip text box, type text to display when the user hovers over the image in a report rendered for HTML.
    In Select the image source, select External.
    For an image on a report server in native mode, type a relative path to the image in the
    Use this image box—for example, ../images/image1.jpg.
    For an image on a report server in SharePoint integrated mode, or any other Web site, type a full URL to the image in the
    Use this image box—for example, http://<SharePointservername>/<site>/Documents/images/image1.jpg.
    For more information, see Specifying Paths to External Items (Report Builder and SSRS).
    (Optional) Click Size, Visibility, Action, or
    Border to set additional properties for the image report item.
        Click OK.
    Andy Tauber
    Data Architect
    The Vancouver Clinic
    Website | LinkedIn
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
    "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • External images are not displaying in RDLC report

    I need to add an external image in my RDLC report. My issue is the image has to come from an external site URL. I passed the URL using report parameter, but doesn't show any output. However, if I pass the URL directly in the RDLC report in the image control
    it displays the image. Since this doesn't make the report dynamic, I need to know how to make Image display in RDLC report using report parameter.

    Try below:
    http://www.codeproject.com/Questions/440205/Display-image-on-rdlc-report-viewer
    Dim paramList1 AsNew Generic.List(Of ReportParameter)
    paramList1.Add(New ReportParameter("Path", "+ /images/CPC.jpg")) Me.ReportViewer1.LocalReport.SetParameters(paramList1)
    http://www.c-sharpcorner.com/uploadfile/abylex/show-images-in-reports-at-run-time-using-reportviewer/
    If you do not have images in your Application. That is, you want to use an external image.
    a. Use an Image control on your RDLC file.
    b. Set the Image's Property-Source = External.
    c. Reserve a Report's DataSource Member for the image Path. For example-
    DataSource.ImgPath.
    d. Set the value for image path from the code in DataSource.ImgPath.
        For example:
    DataSource.ImgPath = "http://www.google.com/intl/en_ALL/images/logo.gif";
    e. The following self explanatory code also needs to be written:
        reportViewer1.LocalReport.EnableExternalImages = true; 
    (reportViewer1
    is the Name for the   ReportViewer Control)
    f. Do the normal stuff to bind DataSource etc.
    g. Done. Enjoy your image in the Report.
    If this helped you resolve your issue, please mark it Answered

  • (HELP) - Loading multiple external images error #1010

    I'm a newbie at Flash and spent the whole day trying to fix this one problem and can't seem to fix it no matter what I do.
    I'm using Action Script 3.0, CS5 on Windows 7.
    I'm trying to load two external images (thumbnail images) in the loader "see image below for reference", where the full image size will be. However, I am getting this error when testing my movie. What am I doing wrong?
    Test Movie error message:
    "port1_btn
    TypeError: Error #1010: A term is undefined and has no properties.
        at index_fla::MainTimeline/fl_MouseClickHandler_6()"
    "port2_btn
    TypeError: Error #1010: A term is undefined and has no properties.
        at index_fla::MainTimeline/fl_MouseClickHandler_7()"
    FYI:
    Loader instance name: mainLoader
    Thumbnail #1 instance name: port1_btn
    Thumbnail #2 instance name: port2_btn
    This is my code

    Go into your Flash Publish Settings and select the option to Permit Debugging.  Then the error messages could include an indication of which lines are causing the problem.
    And just for the sake of asking since the code is somewhat minimal... is the mainLoader inside a container named portfolioBkgd?

Maybe you are looking for

  • Creative Labs: A Boy's St

    Hi everyone, I came to these forums after I heard of the recent developments from Creative Labs. After reading what many people wrote, I?thought I would share?the story of how Creative became a part of my life. I was twelve years old when I first lea

  • Connection time out error in HTTP

    Hey guys i m getting connection time out error in a HTTP scenario,when i go in SXMB_ADM i dont find any entry with the name HTTP_TIMEOUT. even in RZ10 i cant find the correct profile parameter. i m taking help from michaels blog /people/michal.krawcz

  • Smart Converter Pro 2

    I'm running Mavericks on a mid 2007 iMac with 6 gb Ram, iTunes 11.1.5 and Smart Converter Pro (SCP) 2 V2.0.2.  I am trying to conver .mkv files to m4v files.  SCP gives me many conversion options but they are all labled as the intended device with no

  • Library not opening in iPhoto '11

    I recently "upgraded" to iPhoto '11, but when I tried to open my library, it gave me an error message.  Sorry I don't have the quote of the exact message, but it was something to the effect of "I can't read this old library, but I can upgrade it for

  • Saving  custom white  balance presets

    It would be so helpful to be able to store custome white balance settings as presets, just like for most other areas of the program) Can this be incorprated into the program please?!