Image acting as Loader on events

I created a base class loader image which I use to load images and in turn, the photos of my document. The class extends Sprite, and then via a loader object loads an image (passed to the class when the instance is created). I am trying to attach a URL unique (as a string) to each loaded image so it can be clicked and navigate to a URL or a specific image. Although I declare a property in the class and assigning the value, by clicking on the image and try to recover the value of the URL produces the following error:

ReferenceError: Error #1069: property not found on flash.display.Loader u and there is no default value.
at 02_loadimage_fla::MainTimeline/getInfo()


This puzzled me for some time... Notice to lovers?


Here is the code in my document (the u is the property that is supposed to exist within each instance, which is preparing for a correction of the URL right now):

function getInfo(e:Event):void {}
trace (e.Target.u);
}

The code in my class is as follows:

Thanks Craig - current target did the trick. I noticed that access has been set to private after I posted and set it properly to the public. I was able to access 'u' directly (ie. myLoadImage.u) but not through the event itself. In any case, currentTarget toured, return the object of class loadImage instead of the nested Loader object. Thank you very much!

Tags: Adobe Animate

Similar Questions

  • Images won't load is not in order (slideshow)

    I noticed something after my slide show. The images are not displayed in the order that they are in the XML file (and which MUST be in order).

    CODE ----------------------------------------------------------------------------

    function load_xml(): void / / first function to call in the script (unique feature)
    {
    myImages_array = [];
    Rnd var = Math.floor (Math.random () * 100000000);
    var url: String = root.loaderInfo.parameters.site_root + "services/slideshow.ashx? id = ' + root.loaderInfo.parameters.sujet_no + '& rn =' + rnd;
    var loadit:URLLoader = new URLLoader();
    loadit.addEventListener (Event.COMPLETE, completeHandler);
    loadit. Load (new URLRequest (url));

    function completeHandler(e:Event):void {}
    var myXML:XML = new XML (e.target.data);
    var myOptions:XMLList = myXML.options.elements ();
    var myImages:XMLList = myXML.images.elements ();

    transition = myOptions. (@id is 'transition');
    music = myOptions. (@id is 'music');
    Duration = myOptions. (@id is "duration");

    for each (var image: XML into myImages)
    {
    var loader: Loader = new Loader();
    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, imageLoaded); Load and add each image in the table
    loader.load (new URLRequest (root.loaderInfo.parameters.site_root + image.@["path"])); Call the function with the path of the image
    }
    }

    init = setInterval (init_slideshow, 2000); Creates a single time limit to ensure that the images are all loaded and added to the table
    }

    function imageLoaded(e: Event): void
    {
    Bitmap of the image: var = e.target.loader.content;

    If (image.width > 1920)
    {
    image.scaleY = 1920 / image.width;
    image. Width = 1920;
    }
    If (> 1080 image.height)
    {
    image.scaleX = 1080 / image.height;
    image. Height = 1080;
    }

    var imageData:BitmapData = image.bitmapData;

    var sprite: Sprite = new Sprite();

    sprite.graphics.beginFill (0xFFFFFF);
    sprite.graphics.drawRect (0, 0, 1920, 1080);
    sprite.graphics.endFill ();

    var spriteBitmap:Bitmap = new Bitmap (imageData);

    spriteBitmap.x = (1920 / 2)-(spriteBitmap.width / 2);
    spriteBitmap.y = (1080 / 2)-(spriteBitmap.height / 2);

    sprite.addChild (spriteBitmap);

    I havemage_total = myImages_array.push (sprite); / / they do not add in the order that they are in the XML file (I guess it depends on the size and such)
    }

    function init_slideshow(): void
    {
    clearInterval (init); Clear the interval
    load_image(myLoader,img); Start the slide show
    load_image(myLoader2,img+1); Prepares the next image
    IMG = img + 1;
    animate_slideshow(); Starts the Tween
    }

    --------------------------------------------------------------------------------------

    The problem lies in the fact Event.COMPLETE when loading images add probably images in the order that they are LOADED and not to LOAD do not. Is there a method that will make them add in the order that they are called?

    Thanks for any help!

    It is not a method in actonscript but there is a method in the loading process to keep things in sequence.  Rather than using a loop for trigger Chargers, create a functional loop where the realization of a loading image triggers the following to start loading.

    The General/generic outline of the process would be (non-literal encoding)...

    var fileArray = your xml files list

    indexCount var = 0

    function loadAFile() {}

    Loader.Load (fileArray [indexCount])

    loader.addListener (COMPLETE, incorporateFile)

    }

    function incorporateFile() {}

    treat the file loaded in place and then to see if someone else must be responsible

    indexCount += 1;

    If (indexCount<>

    loadAFile();

    }

    }

    loadAFile();  Kick things off

  • Yahoo images won't load is not properly in FireFox

    I can get the images/links to load correctly in other browsers, but if I do an image search on yahoo with Firefox, I click a thumbnail and page in the picture changes. But, if I try to click on the link to go to the actual page of the image is on, the link does not work. I can click and click, but a page does not open. If I right click and choose the link open in a new tab... It opens just the same thing I was looking at.

    http://www.aroundthering.com/pics/593.PNG

    If you look at the image above, you will see a "Preview". But if I click on the link at the bottom "www.sports-logos-screensave...". ", it will bring up all exactly the same page as above. What can I do to solve this problem, because it works fine in IE and Chrome...

    Thank you!! It worked!

  • Images not be loading not or that they load with errors.

    I bought a new pc a few weeks there, since then images do not load correctly or not loading not. Most of the time, it happens with images hosted on imgur.com but happened a few times with other hosts too.

    It seems to be a Firefox problem, because the images appear fine on Chrome & IE. Also, it's weird because sometimes I can't see a picture, but if I try a few hours later I can see perfectly.

    A few examples, the original and how I see them:

    http://i.imgur.com/fgxY56P.jpg
    http://i.imgur.com/5r5ELRN.png
    
    http://i.imgur.com/JWsLLTu.jpg
    http://i.imgur.com/b8FNb1N.png
    
    http://i.imgur.com/SIIfgVc.jpg
    http://i.imgur.com/wo2FbUT.png
    
    http://imgur.com/gallery/3ULJn
    http://i.imgur.com/e3pta66.gif

    I tried to disable all the addons, but I always get errors. I use Firefox on Win7 Ultimate SP1 x 64 28.0.
    Excuse my bad English and thanks in advance.

    Hello
    Please read this article to help resolve the problems that cause to not show images

  • image does not load

    I'm doing a site for intranet to my work. It contains an image (.jpg). Suddenly won't load any more, although I'm already working on this site a few days and never had any problems.
    It is displayed in IE. I tried all the steps in the image won't load no longer part of the location of the help. But now I know more.
    The error console says: security error: "content to my < site > can not load or link to < my image file >.

    What is the URL of this image?

    See also http://kb.mozillazine.org/Links_to_local_pages_do_not_work

  • Slide template image disappears when loading

    I have a responsive project designed in 9 Captivate that works fine in the preview, but encounter problems when publishing.

    The background image (a .png 500Ko) for the breakpoint Office positioned on the master slide on top of two smartshapes does not appear when loading (do smartshapes). I tested with the SCORM cloud and our LMS with the same results, I also tried several browsers and machines with the same results. The image appears when loading on other devices, or if the resizing of the window on a desktop PC.

    The same file is used on all the breakpoints, just resized to fit (100% width, automatic height on all breakpoints). The image file is sized to the same width as the breakpoint Office (1024px), with a height of more than time to account for resizing to other breakpoints. I tried images of different sizes, adding instead as an overview of the project, adding to the first slide and display for the rest of the project... all to nothing done.

    Any help would be great because I'm at the point where I'm completely puzzled...

    OK, it would have been my approach: since they must be on all slides, merge into the background.

  • Image does not load in a new window of form

    Hello world

    In Oracle Forms, I have a form with several windows. At startup is responsible only for the main window. For certain conditions during user input are shown another window (I use the feature SHOW_WINDOW). In the new window is an Image that is defined by the following code:

    READ_IMAGE_FILE ('image.gif', 'URL', 'IMAGE_PICTURE');
    SHOW_WINDOW ('DIALOG');

    The image is stored in the JAR file and works for the other modules in form. But when I open the new window (Style = modal dialog box = Yes), the image is not loaded or display. But if I close the dialog window and re-open it directly, once again, the image is displayed.

    Does anyone knows how to fix this? I would like to have the picture displayed also the first time at the opening of the dialogue window.

    Thank you!

    Marco

    Have you tried synchronizing?

  • Images disappear after loading another view with webview

    Okay, so at the beginning I had an old bar which was signed and I put that on the playbook to see what features it had. This bar has worked exactly how it was supposed to. I got the source and I had to change something, but first I had to update the sdk because I do not have the old sdk that it was built with, built when air 2.5 was outside. Everything I've done has been 3.1 the air version and the update includes the blackberry tablet sdk. He compiled and loaded on the perfectly good playbook, but after that I click on an image which acts as a button that goes to a view with a webview inside, and return to the original view, all the images in the initial view disappeared and I can't click on any one of them.

    It's weird, I remember what happens a long time ago and it has to do with something on the change of AIR/SDK, but I just do not remember what is the cause... If anyone knows what could cause the webview make the images disappear on a reload of a DIFFERENT opinion, let me know. BTW, webview was destroyed on the previous view.

    It was a problem with webview I suppose, very unstable object implementation...

  • Error determining responsible for image size: the loading object is not sufficiently loaded to provide this information.

    Hello

    I am trying to load and image and determine its dimension immediately after loading.  I use a Loader object and check the width when the object of the loader's contentLoaderInfo Event.COMPLETE event is triggered...

    myLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, onLoadComplete);

    Then:

    public void onLoadComplete(event:Event)

    {

    trace (myLoader.Width); 0

    trace (myLoader.contentLoaderInfo.Width); Error: The loading object is not sufficiently loaded to provide this information.

    }

    I tried something similar with the event of Event.INIT but same result.  Any ideas on the best way to solve this problem?

    Thank you!

    Moshe

    I think it's the answer to your question:

    trace(event.currentTarget.width);
    
  • Images have stopped loading in Yahoo.

    Images not loading in Yahoo. I followed all the steps recommended unsuccessfully to operate. It started a few days ago and I need help.

    You use Avast? If so, this has been an impact on many Avast users...

    Avast Web Shield

    There is a recent issue with one of the features of Web Shield block some images on Yahoo. You could try turning off scanning of HTTPS connections to see if it is the cause in your case:

    1. Open the Avast dashboard on an affected system.
    2. Select settings in the left side menu.
    3. Adopt a Protection Active.
    4. Click on customize next to the Web Shield.
    5. Uncheck the option "Enable HTTPS analysis", and then click ok

    Related topics:

  • 2 of 5 of my background images won't load

    2 on 5 of my habit of background images load in firefox, but goes on other browsers.

    The photos should change every time a user selects a new page, but only 2 of them seem to

    the link is

    soupd-up.co.UK/private2

    Thanks in advance

    Three of the five images have path separators "Windows-style". Example:

    data-custom-background-img="\img\shutterstock_193037642.jpg"
    

    To make Firefox happy change, slashes return (\) bar forward slashes (/) and that should fix it.

  • Can't click on a Web site and images don't load, need help!

    I need to fill out a survey online, but I can't check the small boxes next to the images or the options. First of all, I noticed that on this site;
    http://www.Buzzfeed.com/Peggy/Bohemian-homes-Youd-love-to-chill-out-in#.liMj9b8pqw
    Images has not been loaded, but I thought it was due to the slow internet connection. When I clicked on the links that were given as the source of all the images loaded. Then on the test I noticed that I can not click on options. To make sure that I had a problem, I tried some lame games such as:
    http://www.Buzzfeed.com/tomphillips/true-or-false-or-what#.eaOjqW6kJ2
    I tried some of the options on the support page as disabling add ons, restart firefox on SafeMode etc. I even updated my shockwave, java, etc. Later, because of the risks, I uninstalled java. Still nothing and need help!

    Thank you.

    Thank you guys for your interest. I solved the problem by removing mozilla file from my computer and reinstall. Now, everything is perfect. For the survey I have to fill out, well it turns which includes soundcloud.com which cannot be opened with mozilla and chrome files. I could open it with my phone and noticed that the questions were all files to soundcloud.

    Thanks again.

  • Images will not load in thunderbird, Windows Mail or OE classic.

    I tried all the information online, but I can still see picture at 3 different e-mail programs, I malwarebites but I can't find any conflict.

    You have three e-mail programs, none of them load the images in the mail. There is very little question of the problem is external to e-mail programs, most likely a security or speed to improve the tool.

    Malwarebytes is not a product anti anti-virus. So, what antivirus do you use?

  • How to debug the image won't load does not intermittently exclusively on Firefox?

    The image (GIF67) is to be generated and sent through binary stream from the server (using the secure connection), Explorer and Chrome still display the image, Firefox intermittently fails to load without separate ground of success-failure.

    I checked that it is a matter of Firefox, by analyzing the tcp packets and confirmed that the response from the server still the same bytes either on the success that the scenario of the failure of level.

    How could configure Firefox to log the process of rendering the requested image?

    Action taken:

    -Tested with versions of Firefox from 10 to 28, fails
    -Tested with Chrome and IE, image still renders correctly
    -Follow-up:
    https://support.Mozilla.org/en-us/KB/Firefox-cant-load-websites-other-browsers-can?ESAB=a & As = AAQ
    https://support.Mozilla.org/en-us/KB/fix-problems-images-not-show?ESAB=a & As = AAQ
    -Updated the Chrome and IE require headers to imitate demand of Firefox, image renders correctly
    -Updated the headers to mimic Firefox asks chrome, fails
    -Packet tcp analyzed, answer is the same for failure and success restore
    -Reconstruct the image correctly retrieving the tcp packets of the application for a successful rendering, as well as for a bad record.

    Sometimes, it is possible to make 50 applications and see the image correctly, some other times you could do 50 applications and not see the image displayed, but above all it is possible to load the image 20 times and have 1 fail.

    Thanks in advance!

    The mime type was wrong: "Image/png".

    I currently have shame because it was the second thing to check on my list and in some way I missed it.

    I faked a stressed server by creating a Web Service to send the image via streaming and the thread to sleep after the rinse a small amount of data, I was able to reproduce the problem (Chrome and explore renders fine image and fails in Firefox) and I could also see fixed it by setting the right mimetype (don't you?).

    This surely isn't a bug, but I find it interesting that Chrome and Explorer are both able to accept that the data and show the Gif so that Firefox gives up on the stream if it takes a few milliseconds after receiving a package and mimic the gif type is not correctly set.

    I thank very you much for the people who have helped me through.

    PD: Anyone knows the real reason for Firefox to get this behavior differently than Chrome/Explorer at the level of the stream/encoder?

  • Contact information for return pixel Imaq image with the mouse click event

    Hello

    I'm trying to get the coordinates in pixels of an image Imaq based on a mouse click event, similar to this post and this post. The problem is that with the first post, I get the coordinates in the image control and hesitate to trust them, they seem to have the Center origin, may return negative coordinates and do not represent the actual size of the detector that I use (512 x 512). It also returns the coordinates outside the actual data when it is clicked on the image control framework. The second method returns simply null coordinates. What I want are the coordinates of the pixel displayed when hovering the mouse imaq image control framework.

    What baffles me, is that I tried the second method with a png stock file and it works fine, it is only when I create an image from the data of my camera than the coordinates are returned null. Note data views of camera under control of image very well.

    Any ideas would be useful. Enclosed is a picture of the offending code and the Panel before displaying the camera data is coming (I know it needs some cleaning).

    Thank you

    Tyler

    for help, please send your vi

    but I think that this example vi is your solution

    check this vi

Maybe you are looking for