URLRequest does not contain anything...

Hi, I have an xml file that contains several products each with their corresponding background image, image in the foreground, text, and Web site. The LoadXML class load this xml file and creates an array of each image, text, and Web site. The main class loads then each image comes from the array of background images in the onBackgrLoad() method. This is done using a loop that traverses the array of circles (called background []) and charge each in turn. I have sucessfully on tracing background [] receive a string of all different background image paths. However when I look at the backgrRequest and the backgrLoader they both contain the null value. Images don't appear on scene, but either an error message appears! The same for onImageLoad (this should load the image in the foreground) and onTextLoad.

Ive been stuck on this for SO LOOONG, its makes me crazy lol!

public class Main extends Sprite 
    { 
        //____________________________________________________________________________Vars : Newly created 
 
        public var images : Vector.<DisplayObject>; 
        private var loaders : Vector.<Loader> = new Vector.<Loader>(); 
        private var loader : URLLoader = new URLLoader(); 
        private var backgr : Bitmap;  
        private var img : Bitmap; 
        private var titel : String; 
        private var cover : Sprite; 
//        private var textContainer : Container_Text = new Container_Text(); 
 
        //____________________________________________________________________________Vars : From other classes 
        public var coverflow : CoverFlow;     
        private var bg : BG; 
        private var sb : ScrollPaneExample; 
        private var sl : ScrollLabels; 
        private var productSummaryLabel : ProductSummaryLabel; 
         public var loadXML:LoadXML; 
//        private var reflection : Reflection;         
 
        private var xmlData : XML; 
        private var hintergrund : Array; 
        private var pfad : Array; 
        private var maxProducts : int;         
        private var numOfProducts : int;         
        private var numOfCategories : int; 
 
    //____________________________________________________________________________Constructor 
 
    public function Main() 
    { 
        initBG(); 
        trace("Step 0: New LoadXML being loaded in Main class"); 
        loadXML = new LoadXML(); 
        loadXML.addEventListener( Event.COMPLETE, onBackgrLoad); 
        trace("Test: XML Load Number of Products (Main class): " + numOfProducts); 
    } 
 
    //____________________________________________________________________________Methods 
 
    // Loads the backgr for each image. 
    private function onBackgrLoad(e : Event) : void // will this be a prob seein as class is sprite?? 
    { 
            var backgrLoader : Loader = new Loader(); 
            var xmlData : XML = loadXML.getXMLData();  
            var hintergrund : Array = loadXML.getBackgr();     
            var numOfProducts : int = loadXML.getNumOfProducts();         
            trace("Number of Products (Main class): " + numOfProducts); 
            trace("Hintergrund paths (Main class): " + hintergrund); 
 
            // On completetion of this method or in case of an error do the following: 
            backgrLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoad); 
            backgrLoader.addEventListener(IOErrorEvent.IO_ERROR, handleXMLError); // try takin this out: contentLoaderInfo. 
 
            trace("Step 5: Backgr images now being loaded."); 
 
            /* Create a template bitmap to hold the image info */     
            var templateBitmap : Bitmap; 
            var templateBitmapData : BitmapData;     
 
            // Loop through the background urls 
            // A summary should appear for each object once it is in the center 
            for (var i : int = 0; i < numOfProducts; i++) 
             { 
                var backgrRequest : URLRequest = new URLRequest(hintergrund[i]); 
                trace("Hintergrund[i]: " + hintergrund[i]); 
                trace("Trace backgrRequest: " + backgrRequest); 
                cover = new Sprite();   
// Method 1 
                // titel = String(e.target.data); 
 
                // Method 2 
//                var titelString : String = titel[i]; // has to be a dynamic string so change this and put in container 
//                trace(titelString); 
 
                // Method 3 
//                var titel : TextField = event.target.String as TextField; // this is text so import as textfield? can i do this like this? 
        //titel shud be rotated. this can be done using bevel filter bt atm not supporting this (look at reflection probs) 
                    try  
                { 
                    backgrLoader.load(backgrRequest); 
                    trace("Trace backgrLoader: " + backgrLoader.content); 
                } catch (error: ArgumentError) { 
                    trace("An Argument Error has occurred."); 
                } catch (error: SecurityError) { 
                    trace("A Security Error has occurred."); 
                } catch (error: Error) {  
                    trace("An Error has occurred."); 
                } 
                trace("onBackgrLoad Loop: " + i); 
 
                templateBitmap = Bitmap(backgrLoader.content); 
                //templateBitmap = e.target.content; 
                //templateBitmapData = templateBitmap.bitmapData; 
 
                /* Attach the template BitmapData to each backgr image */                 
                var backgrBitmap : Bitmap = new Bitmap(templateBitmapData);                 
                cover.addChildAt(backgrBitmap, 0);                            
//                coverHolder.addChild(cover);    
 
                // Method 1: target data into bitmap 
//                var backgrBitmap : Bitmap = e.target.data as Bitmap; 
                // Adds the backgr to the already exisiting backgrs inside the Bitmap "backgr" 
//                backgr += e.target.content as Bitmap; 
                //var myNewBackgr = e.target.loader; // Necessary? 
 
 
                // Method 2: create object 
                //BAD IDEA to create a bitmap obj since this cant be rotated or tweened 
//                var backgrObj : Object = backgrLoader.data as Object; or //e.target.data 
 
                // Method : Imagemultiloader 
//                var backgrBitmap : Object = (e.target as ImageMultiLoader).data 
//                // determine imagemultiloader!! 
 
 
                // Method 3: create template bitmap     
                ///* Create a template bitmap to hold the image info */     
//                var templateBitmap:Bitmap = e.target.content;     
//                var templateBitmapData:BitmapData = templateBitmap.bitmapData;     
//                /* Loop through your tiles */     
//                for (var a:uint = 0; a < tilesWide; a++)     
//                {        
//                    for (var b:uint = 0; b < tilesHigh; b++)        
//                    {                
//                        var tile:Sprite = new Sprite();            
//                        /* Attach the template BitmapData to each tile */                 
//                        var tileBitmap:Bitmap = new Bitmap(templateBitmapData);                 
//                        tile.addChild(tileBitmap);                 
//                        tile.x = a * tile.width;                 
//                        tile.y = b * tile.height;                 
//                        tileHolder.addChild(tile);         
//                    }     
//                } 
 
                // Method 4: Load straight into BitmapData 
                //var img1:BitmapData = BitmapData.loadBitmap("img2")  
                //var img2:BitmapData = new BitmapData(img1.width, img1.height, false)  
 
                // Method 5: Try with image holder 
                                // Try with an image holder.   
//                backgrMc = imgHolder; 
 
//                var backgr : Bitmap = Bitmap(e.target.content); 
//                 
//                try { 
//                cover.removeChildAt(0); // should i take this out to ensure not just last image loads? 
//                } catch (error: Error) { 
//                    trace("Catch error here."); 
//                   } 
//                cover.addChildAt(backgr, 0);  
            } 
        } 
 
            public function onImageLoad(e : Event) : void 
        {             
            (...)        } 
 
    public function onImageLoaded(event : Event) : void 
    { 
//        var xmlProductList : XML = xmlData.produkte.produkt;  
//        var xml : XML = new XML(event.target.data); // will this work now tht there r 3 things loaded? 
 
                // To create a shadow only UNDER the backgr image 
        backgr.filters = [new DropShadowFilter()];  //can this var backgr be used from above? i put them on public 
 
 
 
 
        // Turn xml data into three seperate Bitmap images and put this in a cover 
        // Insert all the images on top of each other in a single cover 
//        cover.addChildAt(backgr, 0); // At the back 
//        cover.addChildAt(img, 1); // On top 
//        cover.addChildAt(titel, 2); // On top // IS THIS POSSIBLE 
 
 
 
 
        //To create a shadow around the side of the whole image and the bottom 
//        cover.filters = [new DropShadowFilter()]; 
 
        // Ensure cover is 20px smaller height + width 
 
//        coverDisplayX = -backgr.width / 2; // backgr is equal to whole image size so not necessary to speicify whole img 
//        coverDisplayY = -backgr.height / 2; 
//        coverDistanceX = -50; 
//        coverDistanceY = -50; 
 
        backgr.x = -backgr.width / 2; 
        backgr.y = -backgr.height / 2; // Height is too long but I managed to decrease pix to 75% 
//        cover.graphics.lineStyle(0, 0xFFFFFF); // Border around image 
        cover.graphics.drawRect(backgr.x, backgr.y, backgr.width, backgr.height); 
        images.push(cover); //  images.push(imageLoader.content); 
 
 
        // Initiate the rest of the methods 
 
            // The nr of images on coverflow should not be more than number allowed on stage.  
            if(images.length <= maxProducts) // Used to be == 
            { 
                initCoverflow(); 
            } 
            else 
            { 
                trace("More images than the maxProducts stated by user. Please increase the maxProduct nr or delete some images."); 
            } 
    }  
 
 
    //____________________________________________________________________________Initiations 
 
    private function initCoverflow() : void 
    { 
        if(coverflow)  
        { 
            removeChild(coverflow); 
            coverflow = null; 
        } 
        coverflow = new CoverFlow(images); 
        coverflow.x = stage.stageWidth / 2; 
        coverflow.y = stage.stageHeight / 2; 
        addChildAt(coverflow, 1); 
    } 
 
(...)  
        //____________________________________________________________________________Error catching 
 
 
        private function handleXMLError( event:IOErrorEvent ):void  
          { 
             trace("Fehler beim Aufrufen von XML."); 
          } 
    } 
}  

Why do you need to pass the event to the drawCover at all? You can just do:

public function onBackgrLoaded(event : Event) : void {
     cover = new Sprite();
     backgrBitmap = event.target.content as Bitmap;
     cover.addChildAt(backgrBitmap, 0);
     // How do I call the method drawCover to load once this method is finished????
     drawCover();
 }

But if you insist, you drawCover function should look like this:

private void drawCover(e:Event):void

or:

private void drawCover(e:Event_=_null):void

Tags: Adobe Animate

Similar Questions

  • The food does not contain an image valid podcast.

    Hello

    I asked this question before and the control point was that the image is in https. We addressed it now and the image is http, but I always get the error the food does not contain an image valid podcast. Podcast images must be at least 1400 x 1400 pixels.

    Flow validates correctly as well, although when tested in iTunes, the episode does not show.

    Here is my feed - http://feeds.feedburner.com/accenture/stagemanual

    Thanks in advance.

    I checked in the Podcasts connect and the error is not with the image, but it complains that it cannot download episodes of your EDI. This is because the URL of your media file is

    http://link.videoplatform.limelight.com/Media/?Mediaid=01bc098836b64009915f2aa89 00aa4ab & amp; width = 480 & amp; height = 321 & amp; playerForm = player

    It is a Flash drive. You can't use a player incorporated - you must provide a direct link to the media file. and it's not Flash. For video, it must be .m4v, .mov or .mp4. The file should play in a browser when you enter the URL, not force a download or appear in a player.

  • Problems connecting to a projector. Laptop recognizes the new monitor but projector does not display anything.

    I have a Macbook Pro (non-retina display) mid-2012. I have a mini VGA screen that worked throughout the year and all of a sudden, it doesn't seem to work. My computer recognizes the new monitor (screen flickers and flies all content secondary screen) but the projector does not display anything. I tried to reconnect the cable, the cable VGA switch to turn on the projector and turn off, restart my computer and clouds of dust on the connections. Sometimes if I move the connection just that will work, but if I so much as breathe on it or watch funny it stops and I can't get it back.

    Jiggle the cable or adapter is something different, you have a physical adapter or cable problem. Any bit-reversal can help that.

  • Tecra 750DVD: HARD drive does not contain valid FAT or FAT32

    Hi people, been problems since a week now.
    Old hard drive died so installed a new.
    Set startup disk in and it all starts to load and then I get the message "Windows 98 has detected that C does not contain a valid FAT partition FAT32 ot. There are several possible causes.
    Then at the bottom of the three options
    Device not found driver: "MSCDOO1."
    Invalid device CDROM drivers selected
    then
    To get help, type HELP and press ENTER
    A:\ >

    When I type FDISK all I get a message that says
    No fixed disk present.
    So I'm stuck.

    Any ideas suggestions? Can't see a way past it.
    Everyone?

    Thank you

    I assume that you have placed this HARD drive in the laptop, but you have not formatted it.
    If you want to install a Win98 HARD drive must contain a FAT or FAT32 file system.
    I recommend booting from the Windows XP CD and format.

  • Qosmio G50 - 115 - DVD drive does not burn anything

    Recently tried to do a recovery plus two discs but the player refused to burn but come with 0E01B5-26-2AO444D9 error Code.
    In fact, it does not burn anything but will play.

    Hello

    Have you tried different CDs and DVDs from different manufacturers?
    You must proceed as different disks from different manufacturers are not 100% compatible.

    I had similar problems, burning data to CDs or the different DVD
    Then I tested the drives from different manufacturers, and that was the key!
    Everything worked properly!

    I made good experiences with disc Verbatim and TDK R (CD and DVD)

    I think you should also test some discs

  • The browser again download the latest applications at the top but it does not download anything.

    Firefox rpet "download the latest applications" just above the faucets, but it does not download anything.

    This has happened

    Each time Firefox opened

    == I removed some aps of firefox

    Tools > Addons > > Extensions

    You have a MSN or Bing extension installed?
    If so, disable it.

  • Satellte C870 (PSC8EE) - display driver for Win8 does not install anything

    Hello

    I have a Satellite C870 bought in October last year.
    I have level of Windows 7 to Windows 8 a first time just before Christmas and has worked well.
    (A few small issues suchas as necessary before installing the display driver, but all Bios Update worked fine)

    A few days ago I had a system crash and the HARD drive died.
    Send the Sateite to replace HARD drive and came with Windows 7

    Has started the last installation of evening back to 8 64 window.
    But the display of the Toshiba site driver does not install anything? Catalyst still not...
    Just get the request to confirm if I want to install the product and then nothing...

    Tried the two drivers offered from the 19/02 and 26/02, but with the same result...
    Tried to install the driver directly from AMD announcement was a message my card was not supported
    I tried Windows 7 driver from Toshiba site for my machine and got the same message...

    Graphics card is an AMD 75610 M

    And of course I have admin access and also tried to run the installation in administrator mode files.
    And other drivers install normally (Lan Drivers, drivers Wifi, Tempro, mode eco etc.)

    Thanks for your help

    Hello

    The driver that you downloaded is a zip package.
    Unzip everything first.
    Then you will see a single .exe file in the unzipped folder.
    This exe file is also a package.
    Therefore, unzip the .exe file too.
    Right click on the exe file and select unpack here
    Now, you will have access to the files together. Now choose Setup.exe or Install.exe

  • Satellite C660 - click Touchpad HR does not contain to save option

    Satellite C660 running Windows 7 64-bit OS.
    When you click on a photo / image, the HR click context does NOT contain "Save as background" option on the same desktop if Windows 7 training on your desktop change claim that it is how it's done.

    I ran XP previously and this option was always there,
    Any ideas how this can be remedied?

    And when you open some picture using Windows photo viewer is this option available with the right mouse click on?

    By the way: I use the same operating system on my laptop Satellite and this option is available.

  • OfficeJet Pro X451dw (CN463A): updated the Firmware says X451dw "EC Firmware Updater does not contain updates for your device."

    I'm trying to update the firmware on my HP Officejet Pro X451dw (CN463A), but the firmware update fails with the error "This Firmware Updater does not contain updates for your device." More precisely:

    1. With the help of EWS, I confirmed that my current firmware is very old (it lists the firmware version of BWP1CN1315FR, which means 1315FR, right?, dating almost the time I bought the printer about 3 years ago).
    2. I downloaded the firmware ("OJP_X451dw_R1640A_updated.dmg") was last updated, copied 'HP Firmware Updater' in /Applications and then he ran.
    3. It shows my printer in the Device Discovery list. I selected and clicked on continue.
    4. He thinks for a while, displaying "recovery information...". »
    5. After a wait of 30 seconds (approx.), it displays "EC Firmware Updater does not contain updates for your device."

    Any suggestions?

    You're welcome @justkwin.

    Here is the utility of a Mac computer:

    FTP://g4u0180.Houston.HP.com/FTP4/pub/softlib/software13/printers/pentane/OJP_X451dw_R1548A.dmg

    Kind regards

    Shlomi

  • Satellite M30X-111 screen does not display anything but the external monitor works

    My laptop just screen does not display anything (like when the computer is turned off), but when I connect the external monitor, then the desktop is displayed on this screen. I tried to recover the laptop using the recovery disk and it worked again, but today, it stopped working again.

    Again, I must plug the external monitor, and after I tried to restart, I continue to pressing F8 but the startup mode is not come, the noise of when you press a button for too long beeps, however, the monitor of the laptop working again.

    How can I solve this problem?

    What do you do? You want to recover the laptop?
    If Yes, you n press any F8 but you will need to boot from the recovery CD by pressing the C key immediately after starting the laptop.

    But this question seems that you have accidentally switched to external display.
    I recommend checking the Fn + F5 option. This combination allow you to switch between the display and the external monitor.

  • Estation c510a: replaced C510 printhead to no black printing, now it does not print anything!

    A few weeks ago, my printer started printing black as a very light gray. I replaced all cartridges, removed the print head and tried to clean the contacts on the back. From advice on the HP website here, I bought a new print head. Just installed and reinstalled the fundamentally new cartridges. He gave me that a message about old print cartridges may not have enough to complete the new initialization of the print head. I just rejected because the cartridges are fundamentally new (XL version, no less).

    Now, the printer does not print anything. He's not even trying. Zineb screen shows he gets something to print, but it is just there to always say "now printing...". "without actually doing anything. There is an occasional (perhaps every 10 seconds) inside the printer, the noise that resembles something moves back, but it never attracts any document.

    As far as I know, HP has decided that without cartridges NEW NEVER OPEN, my printer is now a brick with a shiny new print head $85.

    Yes, I tried to copy with the same results.

    Help, please. I really want to spend a different $70 on new cartridges and lose the new game that is already there!

    Hi @skills4lou,

    The printhead you bought must carry a parts warranty. I'll send you a PM with some information to help. If you are unsure how to check your PMs, here is a post that can help - How to check your messages.

    If it helps you to find a solution, please click on the 'accept as Solution' and the 'thumbs up' buttons down below in this message.

  • Z400 Lenovo Ideapad Card Reader does not detect anything

    I have installed the lenovo z400 appropriate card reader driver, restarted my laptop...

    inserted my sd card, then the laptop does not detect anything, pls help!

    PROBLEM SOLVED!

    I just kept my laptop mode "sleep" for 20 minutes, when I opened it back, something has been installed, then I saw that it was the driver of the card reader.

    Card reader works now!

  • Error 1074395241: The model descriptor does not contain the data required for the corresponding rotation invariant.

    Hi all

    I use the model Match 4 IMAQ to detect the angle of rotation of an image of model. However, it displays the error: "error 1074395241: the model descriptor does not contain the data required for the corresponding rotation invariant." What exactly is the problem? How to solve this problem? The details are explained below.

    My project is a bit complicated. Part of the block diagram containing the IMAQ Match model 4 is illustrated below:

    The source image is a series of images of images read from an AVI video (I used a loop for to process the images frame by frame). The image of the model is an area of the first selected image. So, this means, the user selected the ineterst object in the first frame of the video, and each of the following images to find the object corresponding interest & determine its rotation angle. When I run the above diagram, there no error. However, it shows the angle of rotation zero no matter what it is 'really '. Therefore, I changed the schema by adding parameters, listed below:

    But in this case, when I run it, it shows the error I mentioned in the subject line.

    If you need more information about my project to identify the problem, please let me know.

    Thanks in advance.

    S ' Please example from model that comes with labview First
    Go to labview Help > find examples and you can search for example.
    -You create model with angle range and what kind of special criteria you want to use.
    -To do this you must use IMAQ learn pattern before using IMAQ model Match 4
    Reference:http://zone.ni.com/reference/en-XX/help/370281U-01/imaqvision/imaq_match_pattern_4/

  • 'System.DateTime' does not contain a definition for 'HasValue '.

    I develop a lightswitch application. But me make mistakes trying to build the application:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Microsoft.LightSwitch;
    namespace application
    {

    partial public class Section
    {
           
    SectionDisplay_Compute partial Sub (Ref DateTime result)
    {

    If ((this. Course! (= null) & (StartDate! = null) & (teacher! = null))
    {

    Assign the result to the value of the desired field

    result = String.Format ("{0} ({1}) [{2} - {3}]", Course.CourseName, Teacher.UserName, StartDate.ToShortDateString (), ((StopDate.HasValue)? ") StopDate.Value.ToShortDateString (): "'));

    }

    }
    }
    }
    This is the code. Get the following errors

    Error 1 'System.DateTime' does not contain a definition for 'HasValue' and no extension method 'HasValue' accepting a first argument of type 'System.DateTime' could be found (missing are you a using directive or an assembly reference?)
    Error 2 'System.DateTime' does not contain a definition of 'Value' and no extension method 'Value' accepting a first argument of type 'System.DateTime' could be found (missing are you a using directive or an assembly reference?)
    anyone help me please in this ASAP?

    Hello

    What operating system is installed on the computer?

    The question you posted would be better suited in the MSDN Forums. I would recommend posting your query in the MSDN Forums. You can follow the link to your question:

    http://social.msdn.Microsoft.com/forums/en-us/categories/

    Hope this information helps.

  • can not be run Zoo Tycoon, when the running game does not appear anything, help me! my computer is Win7

    original title: subject zootycoon
    my computer can not be run Zoo Tycoon, when the running game does not appear anything, help me! my computer is Win7

    Hello

    1. what version of Zoo tycoon you play?

    2. is it works much earlier?

    I suggest to run the game as administrator and check.

    I suggest you to follow the steps from the links and check out.

    Improve the performance of your computer game

    http://support.Microsoft.com/kb/815069

    The problems of the game performance

    http://Windows.Microsoft.com/en-us/Windows7/fixing-game-performance-problems

Maybe you are looking for

  • iPad 1

    I had an older version of the iPad and I can't just restore to the factory settings any help here?

  • Why the bar address bing search, when I googled chosen for the search bar in windows 7?

    My home computer has windows 7 x 64 bit and when I type something in the address bar it uses bing to search by keyword, and yet I google for the search bar. At work, I have xp and when I type in the address bar, it uses google to search by keyword an

  • Amber light flashing on time capsule

    I just installed and activated a new Xfinity gateway modem.  It is hooked to my Time Capsule airport.  Time successfully Capsule gives me Internet connection, with the cord, Ethernet and Wireless.  It also allows Time Machine on my MBP running toward

  • Need technical manual for Satellite P200-18Z

    I need a manual with detailed information material in this book.I compile a special kernel of material for FreeBSD. I will be very grateful for this information and I will post my configuration on the BSD-specific forums as well as other people can u

  • Atomaders keeps closing

    Several months Atomaders stopped at the time wherever the first video advertising should play, usually at the end of level 3.  Instead of the video play, then the game continues, I the end of the game screen where it shows my score, as if I had timed