Problem using images in a button skin

So, I have a weird problem. I need to be able to see a button in design mode. My button is a custom component (a ButtonBase) with a skin. So, I left is a tiny bit of the default skin so that you can see what it looked like in design mode. Now, the paths to the images that will be used for the various states of the button are binded to strings passed from another subcomponent. There was no other way to get what we needed done, so it stays messy. Anyway, I don't get things to display correctly. Here's the code, and after an image for what I'm getting:
[CODE]
<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
                         xmlns:s="library://ns.adobe.com/flex/spark"
                         xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
                         xmlns:mx="library://ns.adobe.com/flex/mx"
                         minWidth="21" minHeight="21" alpha.disabled="0.5"
                         preinitialize="initImageVars()" creationComplete="init()">
    <!-- host component -->
    <fx:Metadata>
        <![CDATA[
        [HostComponent("customComponents.ToggleButtonCustom")]
        ]]>
    </fx:Metadata>
    <!-- states -->
    <s:states>
        <s:State name="up" />
        <s:State name="down" />
        <s:State name="selected" />
        <s:State name="disabled" />
        <s:State name="over" />
    </s:states>
    <fx:Script>
        <![CDATA[        
            import mx.controls.Alert;
            /* First thing's first: we need to initialize our global and accessable components. */
            [Bindable]
            public var upButtonPath:String = "";
            [Bindable]
            public var downButtonPath:String = "";
            [Bindable]
            public var activeButtonPath:String = "";
            [Bindable]
            public var disabledButtonPath:String = "";
            [Bindable]
            protected var label:String = "";
            private function initImageVars():void
                upButtonPath = "assets/" + this.hostComponent.upButtonPath;
                downButtonPath = "assets/" + this.hostComponent.downButtonPath;
                activeButtonPath = "assets/" + this.hostComponent.activeButtonPath;
                disabledButtonPath = "assets/" + this.hostComponent.disabledButtonPath;
            private function init():void
                /* Give values to public variables */
                //upButtonPath = "Up.png";
                //downButtonPath = "Down.png";
                //activeButtonPath = "Active.png";
                label = this.hostComponent.label;
            /* Define the skin elements that should not be colorized. For button, the graphics are colorized but the label is not. */
            static private const exclusions:Array = ["labelDisplay"];
            override public function get colorizeExclusions():Array {return exclusions;}
            override protected function initializationComplete():void
                useChromeColor = true;
                super.initializationComplete();
            private var cornerRadius:Number = 2;
        ]]>       
    </fx:Script>
    <!-- layer 1: fill -->
    <s:Rect id="fill" left="1" right="1" top="1" bottom="1" radiusX="2">
        <s:fill>
            <s:LinearGradient rotation="90">
                <s:GradientEntry color="0xFFFFFF"
                                                 color.down="0xAAAAAA"
                                                 color.selected="0xBBBDBD"
                                                 alpha="0.85" />
                <s:GradientEntry color="0xD8D8D8"
                                                 color.down="0x929496"
                                                 color.selected="0x9FA0A1"
                                                 alpha="0.85" />
            </s:LinearGradient>
        </s:fill>
    </s:Rect>
    <mx:ViewStack id="buttonImage" x="0" y="0"
                                selectedIndex="0" selectedIndex.down="1" selectedIndex.selected="2"    selectedIndex.disabled="3">
        <s:NavigatorContent id="upState">
            <mx:Image source="{upButtonPath}" width="500" height="500" />
        </s:NavigatorContent>
        <s:NavigatorContent id="downState">
            <mx:Image source="{downButtonPath}" />
        </s:NavigatorContent>
        <s:NavigatorContent id="activeSate">
            <mx:Image source="{activeButtonPath}" />
        </s:NavigatorContent>
        <s:NavigatorContent id="disabledState">
            <mx:Image source="{disabledButtonPath}" />
        </s:NavigatorContent>
    </mx:ViewStack>
    <s:Label id="labelDisplay" text="{label}"
                     textAlign="center"
                     verticalAlign="middle"
                     maxDisplayedLines="3"
                     horizontalCenter="0" verticalCenter="1"
                     left="10" right="10" top="2" bottom="2">
    </s:Label>
</s:SparkSkin>
[/CODE]
That gives me this image:
And if I use the following code to resize it, I get this:
[CODE]
/* From the component, called from init(), which is called on creationComplete */
private function resizeEverything():void
  var dummyImage:Image = new Image();
  var pathToDummy:String = "assets" + upButtonPath;
  dummyImage.source = pathToDummy;
  thisBtn.height = dummyImage.height;
  thisBtn.width = dummyImage.width;
  dummyImage = null;
[/CODE]
If you have any idea what to do with this, let me know. I set the buttons to the exact height and width of the images I'm using when I first call them. I don't know how else to manage this. I want the faded white to be an exact mirror of the image, so that designers (not me) can move them around on design mode. Thank you!

Figured it out. The images I was given had large amounts of padding, and when I tried to auto-resize the buttons, Flash could never grab the image and therefore couldn't size off it, so the size of the component was forced to 0,0. It's all good now.

Similar Messages

  • Flex 4.5 problem using image in Mobile Application (Android)

    I have a problem using flex and mobile application...
    I have an image with path = "/mnt/sdcard/images/20120202172020990.jpg"
    Simply using
         <s:Image id="image" source="/mnt/sdcard/images/20120202172020990.jpg" />
    Get me an empty image on device, still using it on computer (desktop build / debug) it works fine...
    I have enabled every kind of permission in the app.xml
    Why I got this error?

    I actually solved the problem using:
    image.source = File.desktopDirectory.resolvePath(file_name).url;
    using instead this one it will work only under windows...
    image.source = File.desktopDirectory.resolvePath(file_name).nativePath;
    I don't know if it's a bug or whatelse, but I think that the source property of Image passing a filename that start with / (/ is root for unix based OS, android, linux, ios, etc), will take is as a relative path instead of complete path...

  • Problems putting Images inside large buttons

    The problem below is using the Fireworks program to create a
    Button with an Image inside.
    Ok I have created a generic button , This button is not a
    fireworks button it was made from scratch, the size is roughly
    90x90 , what I want to do is place and Image inside this button and
    then to be able to move the image into the correct place, If I
    paste the image into the button it simply places the image where it
    wants I cannot move the image , I tried creating a Layer and Frame
    and using the marque tool but it pastes the image top left hand
    corner and the image cannot be moved.
    Where am I going wrong.?.
    SPECCY.

    do this in an image editor. It would be much simpler/easier
    and more
    reliable that using html.
    If you still want to do it in html, put the button image as a
    background.
    > Where am I going wrong.?.

  • Problem using Image Processor from Bridge

    I have been using the Image Processor to process photos from Bridge for quite some time. However, I recently received an error message when I try to initiate Image Processor from Bridge and I have not been able to find any help topics that address my problem: I select images in Bridge to process, then click "Tools>Photoshop>Image Processor". Photoshop opens and the familiar Image Processor dialog box opens. Item 1 in the dialog box says "Process files from Bridge only" and has the number of files I have selected in parenteses. I select the file type and other settings in #3, and preferences in #4. When I click "Run", I get an error message window that says: "Script Alert. There were no source files that could be opened by Photoshop". The Image Processor works if I open the files in Photoshop first, then run it by selecting "File>Scripts>Image Processor" and tell it to process all open files.
    Would someone be able to help me with this problem?
    Thanks, Larry

    Usually when it worked before and not now, and you have added no new software or hardware I recommend resetting the preferences.  Hold down the Ctrl key and click on the Bridge icon to start.  You should get a reset window with 3 options.

  • Problem using the e-mail button in Acrobat Pro 7.1.0 with Outlook 2013

    I just switched my e-mail application from Mozilla Thunderbird to Outlook 2013.
    I have always been able to click the e-mail button in Acrobat 7.1.0 to open a blank e-mail message with the PDF file attached.
    I keep getting an error now that I have Outlook 2013.
    It says "You need to create a Microsoft Outlook profile.  In Microsoft Windows, go to the Control Panel and open Mail.  Click Show Profiles, and then click Add"
    Then, when I click on the OK button it says "Acrobat is unable to log in to your email application.  Please check your account settings and try again."
    I have checked and I have one profile in Control Panel called Outlook.  Outlook is set as my default e-mail program. 
    I tried using a 3rd party PDF reader (Foxit Reader) and the e-mail button works as expected (opens a new message with the PDF attached).
    I am running Windows 7 Professional, 64-bit with Outlook 2013 32-bit (this was what was recommended by Microsoft on the Office download site).
    I would appreciate help anyone can provide to fix this problem.
    Thank you.

    It may be a similar issue, but not the same issue. This is not the Reader forum, but if you are worried about the compatibility it is a simple matter to upgrade your Reader to AR XI. The original post had to do with a cost product, not the free Reader.
    For AA7, the PDF Maker of AA7 is not compatible with Outlook 2013 as suggested. You should still be able to open most PDFs, but to create a PDF from Outlook you will have to print to the Adobe PDF printer or upgrade to AA XI.

  • Problem using image via URL

    Hi everybody
    I have a problem with loading images via URL into my PDFs.
    I am using LCD ES2 Version 9.0.1....
    I want to create a PDF which loads images from the internet but it does not work.
    So far I have tried to add an image or image field to my PDF in the LCD and populate that image using the Object-->Field-->URL: palett. I put the URL in there like this http://www.adobe.com/imageshome/pdfgift_home.gif , tick the "embed image Data" checkbox (also tried with without that just to be sure) and save as Dynamic PDF (I also tried static) but when I open the PDF in adobe reader 9 or 10 or acrobat  9 there is no image showing. I also put the image in a subform and made that subform flowed, as well as the page itself and made the binding global.
    I have the form properties - default set to "Acrobat and Adobe Reader version 9.0 or higher", Default Language to JavaScript, PDF Render format to Dynamic PDF.
    I also tried using JavaScript events like "form:ready ImageField2.value.#image.href = "http://www.adobe.com/imageshome/pdfgift_home.gif" as discribed here http://partners.adobe.com/public/developer/en/tips/lc_dynamic_images.pdf but that also does not work.
    What am I missing?
    Any help would be great and greatly appreciated!!!
    Thanks and best regards
    Norbert

    As far as I can tell, this use case is not allowed because of cross site references related security concerns. The form can refer to the images stored on the same server from where the PDF is served, but the images cannot come from external servers.

  • Please Help!-Problem using Image[ ] array

    Hi everyone,
    I have this real confusing bug in my code which i am not able to fix.
    Image[] tmpImg = new Image[Img.size()];   /initializing an image array tmpImg
                for(int i=0; i<Img.size(); i++) {          //i require this display the image a number of times
                try{
                       icon = Image.createImage("/Icon.png");
                       im = new ImageItem("Image", icon,ImageItem.LAYOUT_CENTER,"image"); //using a imageItem to display the image in a form
                       form.append(im);
                       icon2 = Image.createImage("/Icon2.png");
                           im2 = new ImageItem("Image2",icon2,ImageItem.LAYOUT_CENTER,"image"); //using another imageItem to display the second image
                      form.append(im2);
                       if (imageValue.elementAt(i) == "availableImage") {
                           tmpImg[i] = icon;  //assigning the value to the image array based on a condition from a String Vector
                      if (imageValue.elementAt(i) == "offlineImage") {
         tmpImg[i] = icon2;   //assigning the value to the image array based on a condition from a String Vector
                      } catch(IOException err) {}
           System.out.println(tmpImg[0]);
           System.out.println(tmpImg[1]);
           System.out.println(tmpImg[2]);
           System.out.println(tmpImg[3]);
           return tmpImg;
       }My problem is that when i try to print tmpImg[0], tmpImg[1] etc all the values are printed null. But the Image is created and being displayed on a ImageItem. but i am not able to assign the image to the image array 'tmpImg' which is within an if condition.
    Can anyone tell me why is this so. I would be grateful
    Thank You

    Thank u deepspace
    I got a lil' frustrated, so completely did not think that way. The code is working now
    Thanx again

  • Mapviewer performance problem using image format FORMAT_RAW_COMPRESSED

    I am using the MapViewer.FORMAT_RAW_COMPRESSED map image in my (java) map application because some features must be clickable and as far as I can work out, this is the only way to achieve this in a Java client. On my local system, running the map server in an oc4j container, this works about as fast as using FORMAT_GIF_URL and loading the image from this url. There also doesn't seem to be much difference in memory and cpu usage.
    When I direct the request to a map server running on a remote Application Server the rendering time grows exponentially. The same maprequest using FORMAT_GIF_URL runs as fast as it does in my local OC4J container. The problem seems to be in "packing time" in RealWorker:
    Remote AS:
    Thu Jun 30 13:59:34 CEST 2005 DEBUG [oracle.lbs.mapserver.core.MapperPool] freeMapper() begins...
    Thu Jun 30 13:59:34 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] preparation time: 99ms
    Thu Jun 30 13:59:34 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] querying/rendering time: 5560ms
    Thu Jun 30 13:59:34 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] packing time: 142605ms
    Thu Jun 30 13:59:34 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] --------------- total time: 148264ms
    Local OC4J:
    Thu Jun 30 15:34:42 CEST 2005 DEBUG [oracle.lbs.mapserver.core.MapperPool] freeMapper() begins...
    Thu Jun 30 15:34:42 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] preparation time: 540ms
    Thu Jun 30 15:34:42 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] querying/rendering time: 2490ms
    Thu Jun 30 15:34:42 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] packing time: 120ms
    Thu Jun 30 15:34:42 CEST 2005 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] --------------- total time: 3150
    The test server is smaller than my local system and more applications are running on the AS, generating the map takes all the available memory and cpu, but the difference between the time it takes generating a GIF image and generating a Java image of almost a factor 50 is puzzling.
    What could cause this enormous difference? Any idea's about how we can analyze or solve this? What could RealWorker be doing in this packing time? Any hints would be greatly appreciated.
    Many thanks,
    Ida

    Thanks for the replies!
    1. Which AS version are you using? -> 10.1.2
    2. Just as a test, if you restart AS (if possible) do you still get the same values? -> yes, we restarted the AS and the results are the same.
    The server is indeed running low in memory. It is a 512MB machine, just big enough to run the AS. The production server will have some more, but not very much. Could I estimate how much extra memory it will need to keep a good performance when generating maps with live features? And maybe I'm wrong, but shouldn't the extra load for the java image only be on the client, since that's where the image is made? On the server it's just the image data, isn't it?
    I tried removing the basemap, but that reduces the loading time just with a few seconds. The live themes are jdbc themes and result in only some 20 to 30 geofeatures. Removing them from the request so only an empty image with a title is retrieved still takes about 117 seconds. Reducing the device size does reduce the loading time, so it does seem to have something to do with the amount of pixels in the image space, not with the data. Could it be that in the "packing" of the image something happens that takes a lot of memory, related to the amount of pixels?
    In my situation it would be handy if the live features were also returned when the image format is not set to FORMAT_RAW_COMPRESSED, it is also possible to draw shapes onto an existing image and this would bypass the memory problems.
    Thanks for any further help.
    Ida

  • Problem using images of CMYK colorspace in PDF file

    I am reading a PDF file that contains an image with CMYK colorspace, I am reading the image data correctly but couldn't convert it to RGB color space, as I need to display this image in my own application so please tell me how can I convert it to RGB color space or how can I display it by remaining in the CMYK colors pace. Any help will be highly appreciated.
    Regards,
    Ali

    Adobe Reader will convert for display, there should be no problem if you use Adobe Reader. Adobe Reader will use the CMYK profile from the PDF, or your default profile, and will convert to your default RGB profile for display.

  • Using Images for each button

    I am trying to create a spry menu that has 5 buttons and each button will have 3 different images for each state (something like this http://jjcstudios.com/woof_wallet/ ) I was going to use the insert > navigation bar but I read that this method creates a lot of extra javascript and they recommended using Spry instead. Can anyone point me in a direction to create a clean method of doing java rollovers or modifying the spry menu so it will work as a rollover. thanks john

    John,
    To place the javascript in an external file, grab the code that is producedon the page
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_nbGroup(event, grpName) { //v6.0
      var i,img,nbArr,args=MM_nbGroup.arguments;
      if (event == "init" && args.length > 2) {
        if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
          img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
          if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
          nbArr[nbArr.length] = img;
          for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
            if (!img.MM_up) img.MM_up = img.src;
            img.src = img.MM_dn = args[i+1];
            nbArr[nbArr.length] = img;
      } else if (event == "over") {
        document.MM_nbOver = nbArr = new Array();
        for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
          if (!img.MM_up) img.MM_up = img.src;
          img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
          nbArr[nbArr.length] = img;
      } else if (event == "out" ) {
        for (i=0; i < document.MM_nbOver.length; i++) {
          img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
      } else if (event == "down") {
        nbArr = document[grpName];
        if (nbArr)
          for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
        document[grpName] = nbArr = new Array();
        for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
          if (!img.MM_up) img.MM_up = img.src;
          img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
          nbArr[nbArr.length] = img;
    and place it in a file called menu.js or similar.
    In your page place the following in between the <head></head> tags
    <script src="menu.js" type="text/javascript"></script>
    to link the Javascript.
    If you want to put menu.js in a different folder, make sure you adjust the link accordingly, like "js/menu.js"
    Ben

  • Problem using image grabbing in loop

    Hi,
    We're currently building a machine vision application using 4 cameras at the same time and tried to implement some sort of passthru of all 4 by using a while loop with inside it a sequence to switch channels and grab the images. Somehow this only gives us completely weird images with several black lines through them. It looks like something to do with other system activity because when you move windows or use other programs it gets worse. However, that must be something I'm doing wrong, working on a P4 1.5GHz...
    If someone could give me a hint or has any ideas, they would be very welcome.
    Thanks

    Are you reading the images from a buffer or directly from the device? It's possible you're doing software timed acquisition which is not reliable -- you are at the mercy of Windows and the software speed to properly acquire your images.
    Without a small example it's difficult to determine the cause of the problem....
    Chris_Mitchell
    Product Development Engineer
    Certified LabVIEW Architect

  • Problems Using Image Processor to Resize Images

              Hello,
    I'm perplexed on this one.
    In the past, I've used scripts in Photoshop to downsize my large Camera RAW images to an appropriate 1920 x 1080 size for subsequent export to Premiere Pro.
    Worked like a charm numerous times.
    Now, when I try to do the exact same thing and check the destination folder AFTER running the Image Processor routine but BEFORE bringing them into Premiere Pro, they are all 1620 x 1080 instead of 1920 x 1080.
    This doesn't work.
    I keep checking around for a little typo in the various stages but cannot find one.  Any thoughts?
    I recently had to reinstall Photoshop and changed one of the settings in Preferences to 32 bit instead of 16 bit.  I don't think that has anything to do with this, but I wanted to mention it just in case.
    Here is a screen shot:
    Thanks!
    Matt Dubuque
    (PS: I know that's a screen shot from a Mac, but I believe this issue is platform independent)

    Thanks so much for your help gentlemen!
    Sorry for the delay in responding.  The deadline for submitting my film is fast approaching and I've had so many different things to do, all of them important.
    Surely these are useful pointers you are giving me.  Cropping has been unsuccessful, as has been using the Image Processor.  Russell Brown was scratching his head about the failure of the Image Processor to work on this and has told me he will work on it after Photoshop World finishes.
    Incidentally, thanks for the video of his on Content Aware Scaling! 
    I was unaware of the Alpha Channel aspect which REALLY makes it an amazing feature.  Alpha Channels are slightly beyond my skill level, but not terrifying.  For some reason paths and alpha channels have been a little harder for me to learn in Photoshop; I've picked up many other things rather quickly.
    JM, I've tried floating a layer by duplicating it.  I called that layer "THIS IS BETTER" (below).  Then I tried to adjust the image canvas size as shown by the screen shot below.  Is this what you were describing?  I tried to change that canvas size to 1020 x 1080.
    I then got a warning message about my image being clipped:
    And that apparently resulted in this "clipped" image below:
    Any thoughts on that particular avenue of inquiry?
    Thanks for your help.
    Matt

  • Problem using image-map in JSP

    hello experts,
    i have a stupid issue which i am not able to sort out. i have a JSP page with a function which returns a bufferedImage. i am using
    <img src="<%=ImageIO.write(displayChart(),"png",response.getOutputStream())%>" usemap="#barmap">to display the image and is working fine and image is getting displayed. but the map is not getting activated .
    please help me out

    Double posted.

  • Problem using image.setSource ?

    Hi,
    Can anyone see what I'm doing wrong here ?
    I'm sure it's something obvious but I can't see it.
    1) I have made a directory /images/ with full rw access
    ================================
    ls -la /images/total 52
    drwxrwxrwx 2 root root 1024 Jun 19 14:58 .
    drwxr-xr-x 24 root root 1024 Jun 19 16:37 ..
    -rwxrwxrwx 1 ora816 dba 50000 Jun 19 14:58 test.gif
    2) Create a directory from sql as system
    ===============================
    SQL> create directory IMGDIR as '/images';
    Directory created.
    3) Try to load the "test.gif" file but get a non-existent file or directory failure
    ==================================
    DECLARE
    -- applicaition variables
    Image ORDSYS.ORDImage;
    ctx RAW(4000) :=NULL;
    BEGIN
    DELETE FROM emp WHERE ename = 'John Doe';
    INSERT INTO emp VALUES
    ('John Doe'
    , 24000
    , 'Technical Writer'
    , 123
    , ORDSYS.ORDImage(ORDSYS.ORDSource(empty_blob(), NULL,NULL,NULL,SYSDATE,1),
    NULL,NULL,NULL,NULL,NULL,NULL,NULL)
    , ORDSYS.ORDImage(ORDSYS.ORDSource(empty_blob(), NULL,NULL,NULL,SYSDATE,1),
    NULL,NULL,NULL,NULL,NULL,NULL,NULL));
    -- select the newly inserted row for update
    SELECT photo INTO Image FROM emp
    WHERE ename = 'John Doe' for UPDATE;
    -- This example imports the image file test.gif from the IMGDIR
    -- directory on a local file system.
    Image.setSource('FILE','IMGDIR','test.gif');
    Image.import(ctx);
    --END;
    -- set property attributes for the image data
    Image.setProperties;
    UPDATE emp SET photo = Image WHERE ename = 'John Doe';
    COMMIT;
    -- continue processing
    END;
    SQL> /
    DECLARE
    ERROR at line 1:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "ORDSYS.ORDSOURCE", line 183
    ORA-22285: non-existent directory or file for FILEOPEN operation
    ORA-06512: at "ORDSYS.ORDIMG_PKG", line 484
    ORA-06512: at "ORDSYS.ORDIMAGE", line 175
    ORA-06512: at line 26
    null

    This error occured because the user who ran the PL/SQL script did not have the privilege to read the IMGDIR directory.
    You can give the privilege to the user as SYSTEM:
    SQL> grant read on directory IMGDIR to user;
    Then the user should be able to find the IMGDIR directory and run the PL/SQL script without the error.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by niallmcp ():
    Can anyone see what I'm doing wrong here ?
    I'm sure it's something obvious but I can't see it.
    2) Create a directory from sql as system
    ===============================
    SQL> create directory IMGDIR as '/images';
    Directory created.
    SQL> /
    DECLARE
    ERROR at line 1:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "ORDSYS.ORDSOURCE", line 183
    ORA-22285: non-existent directory or file for FILEOPEN operation
    ORA-06512: at "ORDSYS.ORDIMG_PKG", line 484
    ORA-06512: at "ORDSYS.ORDIMAGE", line 175
    ORA-06512: at line 26
    <HR></BLOCKQUOTE>
    null

  • Custom button skin with scaleGrid 9 slice image does not appear in Design Mode

    So in a custom button skin I have a nine sliced image, and then throw that onto an MXML page. In design view, I cannot get the component to show the image that I've thrown on it. Unless I do a hack on the MXML page by adding the image in it's scaleGrid form to the page somewhere. Then it seems to act as like a preloader for the image so it actually displays. But I don't want to do this hack on every page that uses this component. Is there a work around?
    Here's the button skin:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
                        xmlns:s="library://ns.adobe.com/flex/spark"
                        width.disabled="296" height.disabled="73">
    <!-- host component -->
    <fx:Metadata>
                        [HostComponent("spark.components.Button")]
                        [Embed('assets/art/shared/[email protected]', scaleGridTop=20, scaleGridBottom=85, scaleGridLeft=40, scaleGridRight=60)]
    </fx:Metadata>
    <!-- states -->
    <s:states>
                        <s:State name="disabled" />
                        <s:State name="down" />
                        <s:State name="over" />
                        <s:State name="up" />
    </s:states>
              <s:Group width="100%" height="100%" >
      <s:Image width="100%" height="100%" smooth="true" source="@Embed('assets/art/shared/[email protected]', scaleGridTop=20, scaleGridBottom=85, scaleGridLeft=40, scaleGridRight=60)"/>
    </s:Group>
    <!-- text -->
              <s:Label id="labelDisplay" left="10" right="10" top="2" bottom="2" horizontalCenter="0"
                                   maxDisplayedLines="1" textAlign="center" verticalAlign="middle" verticalCenter="1"
                                   color="#FFFFFF" >
      <s:filters>
                                  <s:DropShadowFilter distance="0" angle="90" color="0x000000" alpha="1" blurX="2" blurY="2" strength="16" quality="3" />
      </s:filters>
    </s:Label>
    </s:Skin>
    And then I throw that button into an MXML page. The image doesn't show up in design view.
    <s:Button x="330" y="94" width="134" height="57" label="Button" skinClass="features.shared.NineSliceButtonSkin" />
    This hack, fixes the button! And all other buttons that use that skin.
    <s:Image width="100%" height="100%" smooth="true" source="@Embed('assets/art/shared/[email protected]', scaleGridTop=20, scaleGridBottom=85, scaleGridLeft=40, scaleGridRight=60)"/>
    <s:Button x="330" y="94" width="134" height="57" label="Button" skinClass="features.shared.NineSliceButtonSkin" />

    Looking for an answer too!

Maybe you are looking for