Problem with image url

Hello,
today I have a problem with image url. I wanted Image to change when mouse dragged over it. But nothing happened. Any ideas?
def maxIco: ImageView = ImageView{
image: Image{
url: "{__DIR__}ikony/max.png"
onMouseDragged: function(event: MouseEvent){
maxIco.image = Image{
url: "{__DIR__}ikony/max2.png"
}

This is working for me:
src/main/Main.fx
src/main/icon/image1.bmp
src/main/icon/image2.bmp
//Main.fx
package main;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
var changed = false;
def imgView: ImageView = ImageView {
    image: Image {
        url: "{__DIR__}icon/image1.bmp"
    onMouseDragged: function (e: MouseEvent): Void {
        if (not changed) {
            imgView.image = Image {
                url: "{__DIR__}icon/image2.bmp"
            changed = true;
            println(imgView.image.url);
    onMouseReleased: function (e: MouseEvent): Void {
        imgView.image = Image {
            url: "{__DIR__}icon/image1.bmp"
        changed = false;
        println(imgView.image.url);
Stage {
    title: "ImageTest"
    scene: Scene {
        width: 700
        height: 600
        content: [
            imgView
}I've changed few things to switch image only one time on mouseDragged event.
It print the image URL.

Similar Messages

  • Problem with Image file

    Hi,
    Iam facing with one problem.I have one swing interface through which I can upload files(back end servlet programme).Now I can upload all types of file but problem with image file it uploading perfectly that means size of the uploaded file is ok but its format damaged.It can not be open.My backend servlet programme is ok coz i tested it with html form it is working perfectly.Problem with swing interface.Plz guide me where I done a mistake.Below r my codes:-
    ImageIcon Upload=new ImageIcon("images/Upload.gif");
         Button=new JButton(Upload);
         Button.setToolTipText("Upload");
    Button.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
              int returnVal = fc.showOpenDialog(ActionDemo4.this);
              if (returnVal == JFileChooser.APPROVE_OPTION) {
              File file = fc.getSelectedFile();
    String aa=file.getAbsolutePath();
              textArea3.append(aa);
                   textArea2.append("Local URL:");
    long l=file.length();
              try
              byte buff[]=new byte[(int)file.length()];
              InputStream fileIn=new FileInputStream(aa);
              int i=fileIn.read(buff);
              String conffile=new String(buff);
              String str1=textArea10.getText();
    url = new URL ("http://127.0.0.1:7001/servletUpload?x="+str1);
         urlConn = url.openConnection();
         urlConn.setDoInput (true);
         urlConn.setDoOutput (true);
         urlConn.setUseCaches (false);
         urlConn.setRequestProperty("Content-Type","multipart/form-data;boundry=-----------------------------7d11e410e500f2");
         printout = new DataOutputStream (urlConn.getOutputStream ());
    String content ="-----------------------------7d11e410e500f2\r\n"+"Content-Disposition: form-data;"+"name=\"upload\"; filename=\""+aa+"\"\r\n"+"Content-Type: application/octet-strem\r\n\r\n\r\n"+conffile+"-----------------------------7d11e410e500f2--\r\n";
    printout.writeBytes(content);
    printout.flush ();
    printout.close ();
    Best Regards
    Bikash

    The errors are here:
              byte buff[]=new byte[(int)file.length()];
              InputStream fileIn=new FileInputStream(aa);
              int i=fileIn.read(buff);
              String conffile=new String(buff); (conffile is a String object containing the image)
    and here:
    String content ="-----------------------------7d11e410e500f2\r\n"+"Con
    ent-Disposition: form-data;"+"name=\"upload\";
    filename=\""+aa+"\"\r\n"+"Content-Type:
    application/octet-strem\r\n\r\n\r\n"+conffile+"--------
    --------------------7d11e410e500f2--\r\n";
    printout.writeBytes(content);conffie is sent to the server but
    it's non possible to treat binary data as String!
    Image files must be sent as byte[] NOT as String ......

  • Problem with an Url

    Hello, I have a problem with the Url in the HTTP Service
    <mx:HTTPService id="userRequest" url="http://ispedd.redios.it/iSchoolPDFManagerPortlet/imagepdf.do?idPdf=1&i dPage=0" useProxy="false" method="GET"/>
    The service should open a PNG image and the error bring back is:  The reference to entity "idPage" must end with the ';' delimiter. 
    Can you help me? Thank you.

    Hi,
    The url is OK, the problem is that properties for MXML cannot have included some characters. So you need to escape entities in your url and it will be ok, for example:
    url="http://ispedd.redios.it/iSchoolPDFManagerPortlet/imagepdf.do?idPdf=1&idPage=0"
    But it would be better if you do not hardcode params in URL. If you need you could hardcode them in Mxml itself like below:
    <mx:HTTPService
         url="http://ispedd.redios.it/iSchoolPDFManagerPortlet/imagepdf.do"
         method="GET"
         id="userRequest">
         <mx:request>
              <idPdf>1</idPdf>
              <idPage>0</idPage>
         </mx:request>
    </mx:HTTPService>
    or (which is more flexible) use parameters as argument when invoking service:
    userRequest.send({idPdf:1, idPage:0});
    You could read more on that in section about data integration in Flex in online or offline documentation:
    http://livedocs.adobe.com/flex/3/html/help.html?content=Part4_data_access_1.html
    hth,
    regards,
    Peter

  • Problem with images opened in Photoshop CS 5

    Hi, I have a problem with images that I open in Photoshop CS 5. F. ex. I opened
    the following image:
    The image appears with a purple color in Photoshop. If I hover over the image
    with a tool like lasso, it temporarily regains it´s original color. The image mode is RGB Color, 8 Bits/Channel.
    I resetted the start settings of Photoshop with the CTRL-Shift-Alt-combination, which had no effect.

    The confusion arises from the imprecise error message in the Preferences > Performance dialog box, to wit:
    OK, that seems to be open to misunderstanding indeed.
    The video card: Citrix Systems Inc. Display Driver.
    Could not find a list for CS6 specifically, but the card may fall short.
    http://helpx.adobe.com/photoshop/kb/tested-video-cards-photoshop-cs5.html
    If I invoke View > Proof Colors, the only thing that changes is that the text in the brackets
    Also if you set View > Proof Setup to something different?
    Boilerplate-text:
    Are Photoshop and OS fully updated and have you performed the usual trouble-shooting routines (trashing prefs by keeping command-alt-shift/ctrl-alt-shift pressed while starting Photoshop, 3rd party plug-ins deactivation, system maintenance, cleaning caches, font validation, etc.)?

  • Problem with Image.createImage()

    Hi all!
    I'm writing a simple midlet just to display an image on the screen and I'm having some problems with Image.createImage()
    Here is my code
    Image bg_img;
    ImageItem imageItem1;
    imageItem1 = new ImageItem("", null,ImageItem.LAYOUT_DEFAULT, "");
    try{
    bg_img = Image.createImage("/image.png");
    imageItem1.setImage(bg_img);
    catch(java.io.IOException e){
    e.printStackTrace();
    I'm getting an exception on bg_img = Image.createImage("/image.png");
    I can't understand what is it...:(
    I know for sure that the problem is not "file not found"
    Any one can help me???

    If you are catching IOException, then u may have problem with ur image path. "image not found on the specified path." if ur image is not in the current directiry then put it into current directory. otherwise, If u are using resouce folder and it is already included into the resouce path, then put ur image in that folder..try this..
    Still not get, then please give some detail about ur development toolkit. and ur apllication packaging scheem. are you using ANT?
    Pranav

  • Problem with image gallery

    Hi to all.
    With ios 5.01 I have a little problem with image gallery. As you can see I have only 1 image, but there is always this **** message "download 0 of 46) (sorry, but I'm Italian )
    I've removed my icloud account from settings, but there is nothing to do, this message don't goes away. What I can do? Thanks in advance

    Hello,
    Just adding a gallery I want to do the same slideshow WoodWing's, but in InDesign, if anyone knows of?
    Thank you
    Link video slideshow WoodWing's: http://www.youtube.com/watch?v=Xt6gNaEZ0-M&feature=relmfu
    The first slideshow shown

  • Problems with image scaling

    I'm facing a real problem with image scaling
    I've used several algorithms but it all has defects but the most common thing is the out of memory error after several enlargments...
    does any one know a solution...
    note:
    I've used several packages to do so,but I'm looking for a solution from the jdk itself
    JAlexscorpio

    Did you take into account that the getScaledInstance() -method creates a completly new Image?
    So if you use it like in
    ImageIcon icon1=new ImageIcon("Blah.gif");
    ImageIcon icon2=new ImageIcon(icon1.getImage().getScaledInstance(400,400,SCALE_FAST);
    you will end up with 2 different Images which have their own data and memory requirements.
    even if you use something like
    ImageIcon icon1=new ImageIcon("Blah.gif");
    Image i=icon1.getImage();
    icon1.setImage(i.getScaledInstance(200,200,SCALE_FAST));
    You will need enough memory to store the data for the original image, as well as the data for the scaled
    version of the image, at least for the time that it take the JRE to create the scaled version. You never know when the garbage collector kicks in to delete you old data so it could be that this takes some time and until
    that moment your memory is not available. If your now doing several of the scaling operations, and there is no chance for the garbage collector to do its work, you will run out of memory.
    I hope that might help, if not feel free to post again

  • Problems with Image Variants

    I got two problems with Image Variants:
    1. catalogCache.GetImagePath("Images", id) doesn’t work for some id. The error message is “GetImageVariant error”.
    2. catalogCache.Preload("Images", “Original”)
        catalogCache.Preload("Images", “Thumbnails”)
        catalogCache.Preload("Images", null)
       catalogCache.Preload("Images", "")
    get failed, the status code is -2147483647
    Anyone know how to setup  image variants?
    Thanks.
    Forrest

    status code: -2147483647 is RC_BADPARAM.

  • Copy and Paste Problems with Images

    I'm having the strangest problems with images. I copy an image off of the web for one of my art history classes and I go to paste into another program but, whether it's Keynote, Powerpoint, Photoshop, or Graphic Converter, something always goes wrong: the images definitely lose some of their quality, become brighter in appearance, and get jagged on the edges. This is starting to drive me nuts, especially since it never happened in 10.4 on my iBook G4. Any suggestions?

    Make it an 8-bit file (Image menu > mode).

  • Experiencing problem with image display in LR5

    I have an intermittent problem with images displaying and exporting in LR. It just began a couple of months ago and is totally random - will do it with RAW (CR2) or JPG. It displays this way in all modules - Library, Develop, Slideshow....The image displays fine in a non-Adobe image viewer (Faststone or Windows Viewer). I've reloaded LR5 and PSCC and is still persists. I know the image file is fine. It also has begun effecting older images that were showing up just fine a while ago. I just loaded about 200 images and maybe 3 or so have this viewing problem in LR & PS. Has anyone else experienced it and have a suggested fix? My graphics card has the latest drivers and shows no problems with other applications. Here is the same image - one a jpg export from Lighroom, the other a save as jpg from Faststone. HELP!

    This is almost always a hardware problem, causing corruption of the file. The difference you see between Lightroom and other software is that Lightroom is accessing the full RAW image, while the other software is trying to read the embedded JPG preview.
    To figure out exactly what hardware is the problem, you need to try different transmission paths and hardware ... different camera cards, different card readers or USB cables/USB ports, different hard disks, etc. Eventually you should be able to isolate the problem.

  • Problem with entering URL

    Ever since the last update or two I seem to have an irritating problem with entering URLs. If I'm navigating a site and modify the URL manually in the address field and hit enter, the URL reverts back automatically to the previous one instead of accepting the new modified entry.
    For example if I'm on www.site.com/path/path and go to the URL bar and remove the last '/path' and hit enter, the browser seems to 'remember' and take me to the previous URL path, i.e. www.site.com/path/path. It doesn't matter whether the deleted text forms part of the URL path or whether its parameters after the path, or even if I modify the URL to something like www.site.com/path/anotherpath.
    Once it starts 'remembering' there seems to be no way of getting around this except to close the browser down and start again. I've noticed this behavior on FF20.0.1 and also on FF21. It happens on all 3 of the PCs I use (2 at home, one at work). I'n not sure if its being caused directly by FF or the NoScript plugin (the latter seems unlikely).
    Is there a setting somewhere to modify this behavior, or is it a bug?

    i couldn't find any documentation for it either, however after testing it, it appears that when browser.urlbar.autoFill.typed is set to '''true''' it means that only addresses you've once typed into the url-bar manually get autofilled, when browser.urlbar.autoFill.typed is set to '''false''' then all addresses that are stored in your history no matter if you have typed them in once manually or visited them through a link on a website.
    browser.urlbar.autoFill will generally switch the autocomplete feature in the address bar on or off.

  • Problem with opendoc url.

    hi experts,
    i am having a problem with opendoc url in my dashboard.my url is to open a webi report depends on two prompts given by the user.
    i am using the following url and it is working fine.
    http://sysname:port/OpenDocument/opendoc/openDocument.jsp?sType=wid&sRefresh=Y&iDocID=123456&mode=full&nbPrompts=2&lsSEnter Year=Prompt1&lsSEnter Dealer=prompt2.
    when i am entering a value for prompt2 like "krishna distributors" its working fine.but the problem here is whenever i am entering a value for the second prompt with a value like (ex:) "ravi & ravi distributors" its giving an message "NO DATA TO RETRIEVE"  because it is considering the & symbol in my prompt2 as another parameter as shown below.
    http://sysname:port/OpenDocument/opendoc/openDocument.jsp?sType=wid&sRefresh=Y&iDocID=123456&mode=full&nbPrompts=2&lsSEnter Year=Prompt1&lsSEnter Dealer=ravi & ravi distributor
    can anyone help me on this.
    thanks in advance,
    ravi kishore yarramsetti.

    Hi Ravi,
    In Excel , & considers as "Concatenation. So it will not work properly. To make this work, use Dealer Number instead of Dealer name in ur example.
    Eg:
    Dealer Name                           Dealer Number
    ravi & ravi distributors            D10001
    krishna distributors                 D10002
    If you use Dealer Number "D10001" you can get "ravi & ravi distributors " Information. In ur Dashboard Design, if the user clicks "ravi & ravi distributors" then pass "D10001" to the Opendoc and generate the report.
    Try to not use which has special characters as the prompt in Xcelsius.
    Thanks,
    Muthukumar A.S.

  • My daughter's older Ipod Touch is having a problem with images becoming pixilated when taken from an e-mail and placed into her camera roll. ( She wants to put on Instagram ) Any help?

    My daughter's older Ipod Touch is having a problem with images becoming pixilated when taken from an e-mail and placed into her camera roll. ( She wants to put on Instagram ) Any help?

    I think that may be a consequence of the email provider she is using. Some services (AOL is one example) inspect and modify email attachments, particularly photos, resulting in reduced resolution compared to the email that was sent.
    The iPod does not do this. The resolution of the picture in the email she receives will be identical to what is imported.

  • Problem with images in content management portlet

    Hi all,
    I'm trying to use the content management portlet provided with Bea WLP 8.1 SP4, but I've a problem with the images (they're not displayed at all, only a lot of red "X"s). Some how it seems to be a problem with the Taglib render. It tries to get the resourceRootPath to post it in front of the src path in the image tag and it always includes the parameter that are in the URL.
    I followed the instructions in the help of workshop, so I think I've imported every needed files. Moreover, the images are in the right folder tree. The wired thing is, that the My Content Portlet works fine.
    Any help for a newbie???
    Cheers,
    Cord

    Hi Cord,
    I was having that same problem, and I couldn't find anything on this website either. I tried creating a new portal project and following the directions exactly again, but it didn't work there either. It works in the sample portal.
    So I contacted BEA Support, and they were able to provide me with a solution:
    The file url-template-config.xml (in the WEB-INF directory) has to be modified and have the {url:currentPage} parameter removed in order to get the images working for the content management portlet. For now, do this only in the section <!-- URL templates -->. Leave the other places like in WSRP etc as it is.
    I actually took it out of the WSRP places too, by accident, but I don't use WSRP anyway, and everything else seems to be working fine. And the images show up!
    Hope this works for you too,
    Beth

  • Problem With Image View After Cropping

    Hi All,
    I have a problem when I try to crop an image in CS4.  The crop tool works perfectly, however sometime the cropped image has parts of the image “out of line”  I believe the problem is just with the view, not the actual file.  I have saved the image and opened it in MS Picture Viewer and the image is perfect. 
    I was using Windows XP without a problem.  I have only experienced this since I upgraded to windows 7 64 bit.
    Below is a screen shot of the problem, not the bottom right of the image.  Any suggestions please.
    Thanks  - Vicki

    No, it was me.  Feel free to review the thread history at this URL if you'd like:  http://forums.adobe.com/message/4206899
    Your display driver IS out of date.  You really don't want the one from Microsoft's WHQL
    If you would like to be able to use the OpenGL-specific features, listed on the page below, as well as not have display corruption, I recommend you update SPECIFICALLY to Catalyst 11.7 (which carries driver version 8.872).  Anything up to 11.12 is probably okay, but 12.1 has some very specific problems with Photoshop.  Several of us on the forum here have had particularly good, solid results from 11.7.
    http://kb2.adobe.com/cps/405/kb405745.html
    -Noel

Maybe you are looking for

  • How do i get icloud on my Macbook pro?

    My macbook pro is updated and running the newest software. I just noticed that i couldnt find my icloud on my macbook. Maybe i have never had it but i thought i did. Anyways, i went to system preferences to see if it was there to turn it on and its n

  • Solved! Calendar hang on sync: T5-Vista EASY!!!

    After a whole day of searching, I discovered some wierd little code on my handheld calendar on December 31st, 1969. On the handheld, all I did was delete it, as I input all date info with the stylus, and voila! No hang up. The problem is that the pal

  • MBP Superdrive Won't Burn CD's

    I continually get the error: "Burning the disc failed because communication to the disc drive failed. (Error Code 0x80020022)" The only successful burn I got was by slowing down the burn to 8x. Any ideas what could be causing this?

  • Unknown error -54  wont connect to itunes.

    I updated to 10.5.1 the other night and since then I cant log onto itunes store or get any updates. Get a unknown error -54 .

  • Time machine question and trash

    I have time machine set up on my Mac and needed to get some extra space on my back up disk so I deleted some of the backups that were there in time machine. I can see them in my trash but cannot delete them due to the fact that it keeps saying the sy