Problem with Showing Images in Canvas

I have now tried for hours and I'm a step nearer to the Solution I think but my Problem are continueing.
I try to show a picture in one MXML and send the URL from another MXML on Buttonclick . I'll post the Code for better understanding.
If I'll put all in one File it works, when splitting, the Browser says it loads the image, but nothing is happening.
Does anyone have a Solution for this Problem? Putting all together in one file is not fitting my Expectations!
[Code = Flexbildtest.mxml]
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns:cust="CustomComponents.*"
    layout="absolute">
    <cust:Clicker height="50%" width="50%"/>
    <cust:Shower height="50%" width="50%" y="234"/>
</mx:Application>
[/Code]
[Code= Clicker.mxml]
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
    <mx:Script>
        <![CDATA[
            import mx.controls.Image;
            import CustomComponents.*;
            private function buttonClick(event:Event):void{
              var shower:Shower = new Shower();
                  shower.getBild("http://www.whatever.com/please_insert_your_own.jpg");
        ]]>
    </mx:Script>
    <mx:Button x="10" y="10" label="Load" id="but" click="buttonClick(event)"/>
</mx:Canvas>
[/Code]
[Code= Shower.mxml]
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
    <mx:Script>
        <![CDATA[
            import mx.controls.Image;
            public function getBild(url:String):void {
                var img:Image = new Image();
                img.load(url);
                img.x = 50;
                img.y = 50;
                addChild(img);
        ]]>
    </mx:Script>
    <mx:Label x="10" y="10" text="Hallo"/>
</mx:Canvas>
[/Code]

I think you need to rethink your design.
Ultimately the actual problem might be that you are creating a new instance of shower in clicker but are not doing addChild(shower), but I think you should just use an MXML Image tag in shower and just change the url.
If this post answers your question or helps, please mark it as such.

Similar Messages

  • Problem with Gif image

    Having a problem with gif image not showing up. It will show up in netscape6.2, but not in IE 5.0. Both are using the java 1.4 plugin. They are basic buttons (zoom in, zoom out, etc) and they actions work, just the icons aren't showing. Any help would be great! Below is a snip of code:
    JPanel toolBarsPanel = new JPanel();
    javax.swing.JToolBar toolbar = new javax.swing.JToolBar();
    JButton zoomin = new JButton(new ImageIcon("tut/zoomin.gif"));
    JButton fullext = new JButton(new ImageIcon("tut/fullextent.gif"));
    JButton identify = new JButton(new ImageIcon("tut/identify.gif"));
    JButton btn = new JButton(new ImageIcon("tut/addtheme.gif"));
    toolbar.add(zoomin);
    toolbar.add(fullext);
    toolbar.add(identify);
    toolbar.add(btn);
    add(toolbar, BorderLayout.NORTH);
    Thanks again for any help!

    I used to do a lot of work in this sort of thing. After a while we were able to convince our bosses to use generated HTML (JSPs, etc.), so the problem moved to porting JavaScript to different platforms! (Platforms in this context means the different browser/OS combinations, etc.).
    The only two things I can recommend are:
    - complete control over you code. You will have to fix it! (Tried you apps on a Mac yet?)
    - assume a minimal install. Don't assume users are going to have any fancy tools installed on their PC, unless you are developing an Intranet app, where you know the spec of the machines that are going to be using it.
    As regarding getting IE to use a relative address, I don't think you are going to have any luck their, I'm afraid! (Although I am curious. It has been some time, but I though it did use relative addresses. Are you absolutely sure about this, did you check this out with System.outs and that?
    HTH,
    Manuel Amago.

  • I have a problem with vertical images burned on a cd

    I have a problem with vertical images burned on a cd either from a Mac or a stand alone burner. What happens is the images come from the card and are put on the cd. Also note the the camera has been set for the computer to automatically show images vertically when shot that way. The images look good on my Mac, but are horizontal on windows computers. Both XP and Vista. What can be done?
    John

    Hi, thank you for the response... not sure looks that the battery its ok, I'm not sure.
      Charge Information:
      Charge remaining (mAh):    4356
      Fully charged:    Yes
      Charging:    No
      Full charge capacity (mAh):    4356
      Health Information:
      Cycle count:    813
      Condition:    Normal
      Battery Installed:    Yes
      Amperage (mA):    0
      Voltage (mV):    12571

  • Problem with Loading Images?

    <pre><i>Locking duplicate thread.
    Please continue here: [[/questions/982030]]
    </i></pre>
    Hi,
    I'm using Firefox 26.0 and I'm kinda new user to Firefox.
    I'm having this random issue with facebook (sometimes with other websites too),
    Sometimes when I open a page, the Images doesn't show as usual.
    Sometimes it takes up to 10sec - 2 mnts to finish loading all the images.
    My internet is 8Mbps so I don't think its due to that?
    Here is a screenshot of the exact issue: http://i.imgur.com/I3eOQaI.jpg
    But it get fixed for a while (say 1-2 days) if I clear the cookies and caches. I visits a lot of webpages so clearing cookies and caches all the times is kinda not pretty possible.
    I also tried disabling all my add-ons, and ran a full scan with McAfee.
    Can anyone tells me what exactly could be the issue? It gets pretty annoying sometimes!
    Thanks in advance!
    Regards,
    Abey

    '''Hi, Thanks for Visiting this Question. But it was a duplicate of https://support.mozilla.org/en-US/questions/982030 (The Same question) Accidentally posted twice''' and I couldn't find an option to delete it, so please '''ignore''' this :-)
    Original thread: [[https://support.mozilla.org/en-US/questions/982030|"Problem with Loading Images"]]
    Warm Regards,
    Abey

  • My 3rd generation Apple TV has a problem with ghosting images.

    My 3rd generation Apple TV has a problem with ghosting images.  Whenever it switches to a black screen (between screens, during shows) images from the previous screen are still "visible" and it's driving me insane.  I know it's not the TV, no other components have the issue.  I've tried switching out HDMI cables to no avail.  Anyone else have this issue or know of a fix?

    To fix the Apple TV, you need to plug it into your Mac or PC with a USB cable, open iTunes, and restore the firmware on your Apple TV.
    Here is a link that will help: http://support.apple.com/kb/HT4367

  • Hi! I´m having problems with showing video files in Qlab on my Macbook Air. A sound/video technician told me to "blow out" my Mac. Was told to use  cmd+ r  when restarting. Is this the right way?

    Hi! I´m having problems with showing video files in Qlab on my Macbook Air. It started suddenly. Consulted a sound/video technician who told me to "blow out" my Mac. Was told to use cmd+r  when restarting. Is this the right way to clean up my Mac? And is it likely that some kind of bug is causing problems for Qlab to show video files? I´ve already tried with a bunch of different video files and sometimes Qlab plays them and sometimes not. I need the Qlab playlist for a theatre show and only have a week until showtime so starting to really worry. Is there anyone out there who can help?

    Your Mac runs maintenance in the background for you.
    Command + R gives you access to restore, repair, or reformat the drive using OS X Recovery
    No idea why that was suggested.
    You may have a third party video player installed that's causing an incompatibility issue.
    Check these folders:
    /Library/Internet Plug-Ins/
    /Library/Input Methods/
    /Library/InputManagers/
    /Library/ScriptingAdditions
    ~/Library/Internet Plug-Ins/
    ~/Library/Input Methods/
    ~/Library/InputManagers/
    ~/Library/ScriptingAdditions
    The first four locations listed are in the root-level Library on your hard disk, not the user-level Library in your Home folder.The tilde (~) represents your Home folder.
    To access the Home folder in OS X Lion or Mountain Lion, open the Finder, hold the Option key, and chooseGo > Library.

  • For the last 2 days whenever I try to upload photos from my iPhoto page to facebook I get an error message: Bad Image There was a problem with the image file.  I haven't knowingly changed any settings on iPhoto or facebook. Can anyone help, please ?

    I need help with uploading photos from iPhoto to facebook. I could do it till 2 days ago. Now any new photo I try to upload gives me an error message:
    Bad Image
    There was a problem with the image file. 
    Please help.

    Can you drag it to the Desktop?

  • I have problems with uploading images to my printing company have the images have been manipulated through CS6 i have saved images as jpeg but the printer company tell me they are not j peg, they will not upload images save from a camera are fine

    I have problems with uploading images to my internet printing company when  the images have been manipulated through CS6 and  i have saved images as jpeg  the printer company tell me they are not j peg,
    but images saved from my phone or camera images that have not been manipulated upload fine, What am i doing wrong?

    Save/Export them as JPG. Photoshop defaults to PSD, so make sure you select JPG and not just rename the file to .jpg.
    There are two ways to save them as JPG: Regular Save as option or Save for Web & Devices
    Take your pick.

  • We have problem with showing warnings "Inline with Field"s.

    We have problem with showing error messages "Inline with Field"s.
    1. We have a package ERROR, that collects all errors/warnings. It has a procedure PUT, that saves errors in the variables of the package.
    Package ERROR
    procedure put(ptable in varchar2, pcolumn in varchar2, pcode in varchar2, pmsg in varchar2);
    end;
    2. We have a database table. Its values are validated by a trigger (saving business rules).
    If an error occurs, then the trigger calls the procedure PUT ( to save an error message).
    For example ...
    CREATE TRIGGER ...
    --- Rule 21
    if substr(:new.ka_kood,1,1) != :new.s_kat then
    error.put('TABLE1','COLUMN1', -20167, ' MESSAGE 1 !');
    end if;
    END;
    3. I have a form of HTML DB that updates the table TABLE1
    I want to show this error message with the field COLUMN1 (Inline with Field) .
    I need same validations before and after updating values.
    Before update - to validate same input; after update - to show errors saved in the package ERROR.
    I also tried to use the global variables. For example ...
    WWV_FLOW.g_validation_ids_in_error(1):= 192645056564169139;
    WWV_FLOW.g_item_ids_in_error(1):= 192644674113169137 ;
    WWV_FLOW.g_validation_message(1):='MESSAGE1';
    And this did not help.
    To rise errors in programs - is there same API ?
    Or there is some other solutions ?
    How can I do this in HTML DB?

    Andres,
    I'm not sure exactly what you are trying to do. But perhaps this will help some. If your after-submit process runs DML that causes triggers to fire, which result in error messages to be accumulated in package variables, you could create a branch on the page that would be conditional on the existence of error messages in the package variables. The branch could be back to the same page or to a more customized error page. The page you branch to would use the error messages in the package variables to determine how to format the page with the error text. The key to doing this is to run it all in the same database session. The way to do that is to use a "direct" branch, i.e., one that does not do a URL redirect. You create this type of branch with the Create Branch wizard (Branch to Page) and do not check the "Branch to page using redirect" checkbox when you see it.
    Be sure to roll back any changes you do not want committed before the branch.
    Using HTML DB global package variables for anything like what you described is not supported.
    Scott

  • Problem with displaying image

    Hello!
    Sorry, I'm a beginner in APEX and have some problems with displaying images in my application. I have read the same topic but unfortunately didnt find the solution.
    So.. I have the interactive report
    table test (
    NAME NOT NULL VARCHAR2(4000)
    ID NUMBER
    BLOB_CONTENT BLOB
    MIME_TYPE VARCHAR2(4000))
    I need to display the column blob_content.
    Thnks a lot.

    1009316 wrote:
    Hello! Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and update your forum profile with a real handle instead of "1009316".
    When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
    Sorry, I'm a beginner in APEX and have some problems with displaying images in my application. I have read the same topic but unfortunately didnt find the solution.
    So.. I have the interactive report
    table test (
    NAME NOT NULL VARCHAR2(4000)
    ID NUMBER
    BLOB_CONTENT BLOB
    MIME_TYPE VARCHAR2(4000))
    I need to display the column blob_content.This is described in the documentation: About BLOB Support in Forms and Reports and Display Image. There's an OBE tutorial that followed the introduction of declarative BLOB support in 3.1 as well.

  • Problem with scramb image MULTI DISTORTION COLOR

    PROBLEM WITH IMAGE,  SOMETIMES ITS DISTORTIONATED, AND SLOW

    Are you writing of problems with the image displayed on your screen? Anyway that you can post a screenshot (to make a whole screenshot, hold down the Shift, Command and 3 keys at the same time). Upload your screenshot using the camera icon in the composition bar above.
    It would also help to know which model MacBook Pro you have - 15" late 2011, for example.
    Clinton

  • Problem with Atf, Image distortion

    I got a problem with image Distortion
    Here my atf in atf viewer: [IMG]http://i.imgur.com/d75aU.png[/IMG]
    Heres my atf in FLashPlayer using 11.4.402.287: [IMG]http://i.imgur.com/H2vEV.png[/IMG]
    notice the red pixel in the green part of the texture.
    Im using png2atf with no parameters.

    Are you writing of problems with the image displayed on your screen? Anyway that you can post a screenshot (to make a whole screenshot, hold down the Shift, Command and 3 keys at the same time). Upload your screenshot using the camera icon in the composition bar above.
    It would also help to know which model MacBook Pro you have - 15" late 2011, for example.
    Clinton

  • I am facing a Problem with reading images from database

    Hi everybody..
    any help will be most appreciated, I am facing problem with reading images from database. I am pasting my code... 
                    string connect = "datasource = localhost; port = 3306; username = root; password = ;"; 
                    MySqlConnection conn = new MySqlConnection(connect); // creating connecting string
                    MySqlCommand sda = new MySqlCommand(@"select * from management.add_products ", conn); //creating query
                    MySqlDataReader reader; 
                    try
                        conn.Open(); // Opening Connection
                        reader = sda.ExecuteReader(); // Executing my Query..
                        while (reader.Read())
                            byte[] imgg = (byte[])(reader["Picture"]);
                            if (imgg == null)
                                pc1.Image = null;
                            else
                                MemoryStream mstream = new MemoryStream(imgg);
                                pc1.Image = System.Drawing.Image.FromStream(mstream);
    It says Parameter not Valid... i am reading all the images from database

    I agree with Viorel. You are getting the error because the format of the data is incorrect probably because the data was modify. It may not be the reading of the database the is incorrect, but the application that wrote the data into the database. You need
    to compare the imgg array data with the data before it was written to the database to see if the data matches.  I usually start by comparing the number of bytes which is easier to check then compare the actual to isolate which function is changing the
    byte count.
    An image is binary data.  The standard VS methods for reading and writing data (usually stream classes) default to ASCII encoding which will corrupt binary data.  The solution usually is to use UTF8 encoding instead of the default ascii encoding. 
    Ascii encoding with stream often aligns the data and adds extra null bytes to the end of the data which can produce these type errors.
    jdweng

  • Problem with displaying images exported to PS

    This is slightly different than the post about TIFF files not displaying properly.
    In Aperture 1.2, when I exported an image to PS and did extensive work on it, and then saved back to Aperture, it would appear in Aperture just as it looked in PS when I saved it.
    However, in 1.5, that does not happen. After I save the image, and then go back to Aperture, all of the changes I made in PS don't appear! However, if I again open the image in PS a second time, it will change to the PS version even before the image gets to PS (I can see it change right when I click "open with external editor").
    Is this a difference with how 1.2 and 1.5 handle the files? I'm guessing it has something to do with image previews, because I chose not to have Aperture generate previews when I installed 1.5 due to the slow-down issues I saw reported here.
    I'm starting to wonder what the point of upgrading to 1.5 was for me... if I can't take advantage of previews (accessing my Aperture library from other apps like Keynote, etc) and if the PS files I work on don't display properly, I'd rather go back to 1.2. This is a major problem in my workflow, since I often spend a lot of time working on images in PS, and I need to be able to see them that way when I return to Aperture.
    I'm hoping there's some setting somewhere I can use to fix this. Is there?

    David,
    I really appreciate your offer to help. However, I have the problem with all images in my library in all projects, so I'm not sure how useful it would be for you to work with a single image I upload to a server.
    I'm having the same problem on my MacBook too, though for some unknown reason there are certain projects on my MacBook that the process works fine with. I cannot tell any difference between those projects (that work) and those that don't.
    What's even more strange... if I quit Aperture, and re-open it, and then go through the process (open a file in PS2, save, return to Aperture) - it works fine! But ONLY ONE TIME. If I try the same process again, on that same image, or any other image in my library, it will not work. It only works the FIRST TIME I do it after opening Aperture. I tested this several times and got the same result.
    I am completely stumped here. I've tried generating previews for a project and turning all of the preview options on, but that doesn't solve the problem either.
    Anyone out there have a clue what might be happening? This is more than a minor inconvenience... if my image management system can't display the image as it should appear, it's unusable.
    Chris

  • Problem with showing caller information on E90

    I recently purchased an E90 and it appears to have a problem with showing the information of the caller (name) for those numbers that have been synchronized with Outlook 2003 or using Bluetooth from a Sony-Ericsson. The presentation of the caller information for the numbers that I have punched in manually works just fine.
    Does anybody have the same problem and if so what is the solution if it is a configuration issue as it sure sounds like a software bug..
    Regards,
    -mats-

    unfortunately the quick office solution bundled with the E90 is very much inferior to the ones found in the older communicators. you Must PAY to upgrade to a better version w/c to my mind is still inferior to the basic version found in the 9X00/i series communicators
    9110,9210,i,9500,9300,i,E90 I still miss my 9300i , E71, E72 But......

Maybe you are looking for

  • T60p Win7 LCD sometimes off when resume from sleep

    T60p Win7 - Sometimes when returning from sleep the LCD does not come on.  When this happens sleeping and awaking again has no effect.  Only solution is to hard power down. Latest BIOS, system up to date.  Any ideas?

  • Call & SMS logging on BES

    How to prevent call logs and SMS details from the Balckberry handheld getting Synchronised on to the corporate BES server? Is there a setting on handheld that can be configured to block this?

  • Linux - Gettings Errors

    Hi , Please advise me the solution. I am Runing Red Hat 4 U 4 on 64 bit intel server. I installed the oracle 10g R2 RAC. Every thing is working fine but I am getting following errors in /var/log/messages. Using ASM over RAW devices. I am also providi

  • Is there a way to retrieve ms word docs after upgrading to lion

    Is there a way to retrieve ms words docs after upgrading to lion?

  • Captivate 5: Crashes when I open another window?

    I've been working with captivate 3 and 4 for years, and just upgraded to 5.  Usually, when I do my Close Captioning, I open my word document with the "script" and copy and paste the captioning in.  Suddenly, Captivate is crashing on me if I open anot