Align external images

hi
how can i do to align a external image?
every time i load a external image inside a movieclip
(mc.loadMovie("imglocation"))...
the image always start at 0,0 of the movieclip
there are no options to "align" this image to the movieclip
center? like
ctrl+k? align x,y position?
Gustavo

yes...
here is what im doing:
''''interval''''{
total = mc_imagem2.getBytesTotal();
loaded = mc_imagem2.getBytesLoaded();
pct = (loaded/total)*100;
if(pct==100){
posLeft = _root.mcReference._x+ (_root.mcReference._width/2
_root.mc_imagem2._width/2);
posTop = _root.mcReference._y+(_root.mcReference._height/2 -
_root.mc_imagem2._width/2);
'''clearInterval''''
works fine... but. i have problems... few problems... i cant
prevent the
"100%" loaded function....
i want to this actions only if the image is already
loaded.... and.... the
swf works fine inside InternetExplorer... but inside firefox
and opera...
pfsss.... doesnt work....
in firefox or opera.... the action is being executed without
100% loaded
why?
there is another way to do that?
"SherwoodClark" <[email protected]> escreveu
na mensagem
news:eeuqf2$su$[email protected]..
> I'm not sure I understand what you're doing, but I
assume you're loading
> the
> image inside of a container (i.e. a movieclip) that then
can be positioned
> on
> the stage. Usingthe stage.width and stage.height
properties you can
> determine
> where the center of the stage is or if this mc is inside
of another mc use
> the
> _width and _height properties of the parent movie clip
to determine where
> the
> center of that mc is. Then set the _x and _y properties
of the container
> mc to
> position/align your image.
>

Similar Messages

  • 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.

  • Is there a way of aligning the images in iweb photoalbums other than have them be a square?I have them at same height and resolution but htere is a default that shrinks them and aligns them at the bottom.Thanks.

    Is there a way of aligning the images in iweb photoalbums other than have them be a square?I have them at same height and resolution but htere is a default that shrinks them and aligns them at the bottom.Thanks.

    So how did you do it?
    by understand what iweb widgets do, in this case setting gridEntry widget's scalMode preference from fill to fit.
    then reset the displayed image, so it fits in the display area even if it's portrait aspect.
    however, i found some glitches in gridEntry widget that's quite strange... but all fix-able.
    perhaps, iweb experts (whose had poked at my example) here can chime in.

  • 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

  • Aligning an image within Text

    Is there a way to wrap an image within a Text Box? For example, in standard html I would just align an image to the "right" or "left" and insert padding accordingly. The text would then just wrap around and under. Is there an equivelent action in Captivate 5.0?
    I've been just putting text boxes on the page and leaving room and saving space outside of the text box for the image, then put another text box underneath it to make it appear as if it is "wrapping"?
    If not - any idea when this functionality will be appearing? Perhaps in 6.0?
    kstagg

    If you want to see something like this in Cp6 you need to request it as an enhancement.
    This is the official Adobe request page: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform&product=5
    With this site you cannot see what others have logged.
    And this is the unofficial site that we use and Adobe watches: http://captivate6ideas.ideascale.com/
    With this site you can see all the enhancement ideas and vote for the ones you like, as well as add your own if nobody else has already done so.

  • 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?

  • Load multiple external images

    If you load say 3 external images in AS3 and want to run a function "useImages()" only once all three images have loaded what is the best way of listening for them to complete loading.
    EG;
    loader1.addEventListener(Eveent.COMPLETE, incLoader)
    loader2.addEventListener(Eveent.COMPLETE, incLoader)
    loader2.addEventListener(Eveent.COMPLETE, incLoader)
    function incLoader(event:Event)
         numLoaded ++
         if (numLoaded == 3)
                   useImages()
    There must be a better way than the above.
    Any feedback would be much appreciated
    Thanks

    Here's a set of functions I used to load pages into a flip page magazine app.  They keep track of how many pages are supposed to load and how many actually load.  I also used an XML file that the web people can update so that it loads different images.  You can add the loader objects in the loaders Array into any DisplayObjectContainer:
    var pageCount:int = 3;
    var pagesLoaded:int = 0;
    var loaders:Array = new Array;
    public function loadPage(aPage:String):void
      var pictLdr:Loader = new Loader();
      var pictURLReq:URLRequest = new URLRequest(aPage);
      pictLdr.load(pictURLReq);
      pictLdr.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoaded);
      pictLdr.addEventListener(IOErrorEvent.IO_ERROR, pictErrorHandler);
      loaders.push(pictLdr);
      updateLoadText();
    private function imgLoaded(event:Event):void
      pagesLoaded++;
      addPagesToFlipBook();
    private function pictErrorHandler(event:IOErrorEvent):void
      var ldrInfo:LoaderInfo = LoaderInfo(event.target);
      loaders.splice(loaders.indexOf(ldrInfo.loader), 1);
      pageCount--;
      addPagesToFlipBook();
    private function updateLoadText():void
      errorText.text = "Loading image " + (pagesLoaded + 1) + " of " + pageCount + "..."
    private function addPagesToFlipBook():void
      updateLoadText();
      if (pagesLoaded == pageCount)
        ... do more stuff
    *edit* How do I create a code window for code?

Maybe you are looking for