Help with SWFObject2, problem with display of alternate image

I'm trying to use SWFObject2 dynamic publishing version to test the visitors browser for flash pluggin and the version.
I want to only show my flash image if the browser finds the flash plug in and it supports the correct version of flash for my banner, otherwise I want to display a jpeg image in its place.
When flash support is available in my browser the flash image is displayed, no problems. But when Javascript or flash plugin support is not available and my alternate image jpeg is displayed something wierd happens and i would appreciate any help on this:
The image is displayed but is pushed to the right of the screen and it seems to have a box behind the image, the edge of the box is only visable and changes colour on rollove like it wants to be clicked, obviously i cannot see what the box is because the image covers it. There is nothing wrong with my image, i put that in place first and tested it loaded ok before i added the SWFObject code and file.
My code is below:
<script type="text/javascript" src="Scripts/swfobject.js"></script>
<script type="text/javascript">
swfobject.embedSWF("advertise_banner.swf", "altContent", "468", "60", "6.0.0", "expressinstall.swf");
</script>
</head>
<body>
<div id="wrapAltContent">
<div id="altContent">
<a href="advertise_banner.php?ad=y">
<img src="Images/advertise_banner.jpg" alt="Image linking to information on  advertising a banner ad on Choose Almeria" />
</a>
</div>
</div>
Looking forward to replies.

Hi,
Is this your question still relevant? If yes, did you study already this for example?
http://code.google.com/p/swfobject/wiki/documentation
Hans-G.

Similar Messages

  • Help with display settings needed urgently

    Graphics and icons that are supposed to be round appear oval. For instance the Safari and App icons on the dock appear very oval. Logos on websites I've visited before and I know are round appear oval.
    I've tried all display settings and nothing helps. I'm a designer and this is causing a major hinderance. Everything appears condenced / squashed sideways. I'd be very grateful if someone could help with this.
    I've just purchased the laptop. I have been using Mac for a few years and I've always selected the "stretched" option from the Display settings which sorted out the problem completely. A circle looked a proper circle. But in this version the option is not available.
    Badly hoping someone can help with this.
    Thanks.
    Version Details - OS X Lion 10.7.4

    It sounds like you have selected an incorrect resolution.  For starters, are you talking about your Air's display or an external display?  You haven't said which Air you have.  If you have an 11" model, make sure your display resolution is set to 1366x768.  If you have a 13" model, it should be set to 1440x900.  These are the proper resolutions for the built in displays.  Chosing anything other than the referenced "native" display resolutions will result in distortions or clarity problems. 

  • Help with displaying image received from socket on Canvas

    Dear programmers
    I know that I'm pestering you lot for a lot of help but I just got one tiny problem which I just can't get over.
    I'm developing a remote desktop application which uses an applet as it's client and I need help in displaying the image.
    When a connection is made to the server, it continuously takes screenshots, converts them to jpg and then send them to the client applet via socket communication. I've got the the server doing this in a for(;;) loop and I've tested the communication and all seems to be working fine. However the applet is causing some issues such as displaying "loading applet" until I stop the server and then the 1st screenshot is displayed. Is there a way to modify the following code so that it displays the current image onto a canvas while the next image is being downloaded and then replace the original image with the one which has just been downloaded. All this needs to be done with as little flicker as possible.
    for(;;)
        filename = dis.readUTF();
        fileSize = dis.readInt();
        fileInBuffer = new byte[fileSize];
        dis.readFully(fileInBuffer, 0, fileSize-1);
        //Create an image from the byte array
        img = Toolkit.getDefaultToolkit().createImage(fileInBuffer);
        //Create a MyCanvas object and add the canvas to the applet
        canvas = new IRDPCanvas(img, this);
        canvas.addMouseListener(this);
        canvas.addKeyListener(this);
        add(canvas);
    }

    Anyone?

  • AT300 - need help with display brightness

    Hello! Help solve the problem with the AT300 tablet.
    Balanced consumption charge off, automatic brightness control is also disabled. But when watching videos, surfing and gaming brightness still varies depending on the color of the image. If the image is dark, the brightness decreases, if the picture is brighter - the screen gets brighter. How do to fix the brightness?
    Thanks!

    Hello,
    I have the same problem like flash85.
    When I scroll down on bright websites and a darker picture is shown on the screen,
    the whole display becomes much darker and even the colors on the screen change.
    Yesterday I've tried the same website on an IPad and the background and colors perfectly
    stays the same.
    Also the display permanently dimms down or up if the automatic brightness control is
    enabled. This is also very disturbing.
    I can't imagine that this behaviour is normal. I read many tests before and none of it mentioned this.

  • Help with display glith using JList

    Hi, first post so bit of background - I'm teaching Java at the moment, am fine with command line but am dabbling more with Swing, despite certain glitches I always get ( e.g. the 7-segment display last year) but anyway....
    I've been trying to develop a little app that picks random boxers for a computer game. My current problem is that i am trying to add custom boxers and then update the JList and repaint the frame. When I add a boxer i can see it adding to the list, however it is unreadable and displayed too small.
    Forgive any bad coding etiquettes - its very much a work in progress from a relatively poor programmer ;)
    theBoxers is a JPanel containing the JLists, aWindow is the JFrame, customButton is a button to add a custom fighter - this gets a name from a field, and a weight from a combo box, adds it to an array and then attempts to add it to an array, then re-generate the lists
    customButton.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent e)
                        addCustom(customCombo.getSelectedIndex(),addCustomName.getText());
                             System.out.println(customCombo.getSelectedIndex() + addCustomName.getText());
                             theBoxers.repaint();
                             aWindow.repaint();
    public void addCustom(int theWeight, String theName)
              switch(theWeight)
                   case 0:          featherCustoms[featherCustomsSize]=theName;
                                  featherFighters = new JList(featherCustoms);
                                  featherCustomsSize++;
                                  break;
                   case 1:          lightCustoms[lightCustomsSize]=theName;
                                  lightFighters = new JList(lightCustoms);
                                  lightCustomsSize++;
                                  break;
                   case 2:          welterCustoms[welterCustomsSize]=theName;
                                  welterFighters = new JList(welterCustoms);
                                  welterCustomsSize++;
                                  break;
                   case 3:          middleCustoms[middleCustomsSize]=theName;
                                  middleFighters = new JList(middleCustoms);
                                  middleCustomsSize++;
                                  break;
                   case 4:          lightHeavyCustoms[lightHeavyCustomsSize]=theName;
                                  lightHeavyFighters = new JList(lightHeavyCustoms);
                                  lightHeavyCustomsSize++;
                                  break;
                   case 5:          heavyCustoms[featherCustomsSize]=theName;
                                  heavyFighters = new JList(heavyCustoms);
                                  heavyCustomsSize++;
                                  break;
                   default:     System.out.println("Not Added");
                                  break;
         }

    Awww, its nice that DB has someone to comeback and carry on a discussion.....long after its over.
    The problem here seems to be your lack of understanding between what a teacher or what an 'instructor' is.
    From the way you speak, an instructor appears to be someone who is technically skilled in both coding and teaching Java as a programming language, designed for people who wish to code in Java.
    A Teacher is someone who must deliver a wide range of subject knowledge to a wide range of abilities, including those who were unable to pass High-School exams. They are responsible for pitching the subject at the correct level for the student, whilst also teaching towards passing the exam, and ultimately gaining a qualification.
    The computing course i am currently teaching does not require OOP, but as Java is the language i was taught at University, and is still often used in our University's, I chose it. I don't pretend to be the best programmer in the world. But I do know that I am teaching the pupils the correct basics, at a higher level than is probably required, to give them the right approach at university. also, this is whilst teaching a large amount of theory.
    Whether you agree, or disagree, matters not to me as I think you would be unfamilier with the specification I am currently teaching to, or what area's of study need to be taught. The exam board appears happy, as do past students who are now well into their university course, as did my marker when i achieved my degree.
    The code posted in the OP (as stated earlier) had nothing to do with displaying my coding abilities, nor did it display the technique's I use when teaching students. It was a small sample of a program which included a JList which was not displaying properly. I tried to include the whole code but it was too big, therefore it was cut down.
    It was a work in progress which i now have working. So now i can look at it again in terms of programming structure. It appears I have made a mistake asking for assistance on here, as instead I got a lecture, with very little insight on your part as to my situation or the nature of the problem/solution.
    At the end of the day, each to his/her own opinion. What I will say is that when someone requests help, positive feedback/criticism is well recieved along with instructions/guidance on how the problem can be solved. I feel that I received none of this on here, but this is what I will always provide to the students I teach.
    Not everyone is a full-time Java programmer or has the time to hit the highest expectations.

  • Help with display quality (LCD TV)

    I've hooked up my Mac mini to my Samsung 32" LCD TV via HDMI cable.
    The overall quality is just far from desireable and is taking away all of the fun from using this new mac.
    I set the resolution output to 720p, which is what the TV supports. So that's good.
    I played slightly with the Contrast and Brightness on the TV settings.
    But I must be missing something. Although the image is sharp, it's very difficult to read from 6ft away, pictures look terrible (seeing the same picture on a different computer and monitor is so much more revealing), and the display is bad for everything basically.
    Please help with any settings suggestions or perhaps a detailed guideline for my setup.
    I started to configure a color profile on the display settings but the results weren't that great and I reverted to default. Too many subtle changes. My colorblindness probably doesn't help.
    Thanks.

    Thanks for the response.
    It's the latest Mac Mini with 2.5ghz i5, AMD Radeon HD 6630M, and 8GB RAM.
    I am familiar with the "Just Scan" setting under picture size on the Samsung TV.
    I'll look for the digital noise reduction.
    Are there complete guides with recommended settings for different setups? Or maybe even general, that would help me here?
    Thanks.

  • Help with display of numbers

    First of all I have to say the tutorials on this site are extremely helpful. My instructor wants all our java code written as Object Oriented and when I did a search on here for Object Oriented it totally helped out. Now I just need help with the display of numbers, my code works perfectly fine except that the number has wayyyyyyyyyyy to many decimal points after it. I only wanted two.
    public class Mortgage
         double mtgAmount;
         double mtgTerm;
         double mtgRate;
         double monthPymt;
              public void Amount(double newValue)
                     mtgAmount = newValue;
              public double Amount()
                   return mtgAmount;
              public void Term(double newValue)
                     mtgTerm = newValue;
              public double Term()
                   return mtgTerm;
              public void Rate(double newValue)
                     mtgRate = newValue;
              public double Rate()
                   return mtgRate;
              public void calcmonthPymt(double newValue)                            //(LoanAmt * Rate) / (1- Math.pow(1+Rate,-Term));
                     monthPymt = (newValue);
              public void display()
              System.out.println ("The Mortgage Amount is:" +(Amount( ) * Rate( )) / (1- Math.pow(1+Rate( ),-Term( ))));
         public static void main (String[] args)
                     Mortgage Mortgage1=new Mortgage();
                     Mortgage1.Amount(200000);
                     Mortgage1.Term(360);
                     Mortgage1.Rate(.0575);
                     Mortgage1.display();
    }

    I figured it out, the math is wrong I think but I got everything to display correctly
    import java.io.*;
    import java.text.*;
    import java.text.DecimalFormat;
    public class Mortgage
         double mtgAmount;
         double mtgTerm;
         double mtgRate;
         double monthPymt;
         DecimalFormat money = new DecimalFormat("$0.00");
              public void Amount(double newValue)
                     mtgAmount = newValue;
              public double Amount()
                   return mtgAmount;
              public void Term(double newValue)
                     mtgTerm = newValue;
              public double Term()
                   return mtgTerm;
              public void Rate(double newValue)
                     mtgRate = newValue;
              public double Rate()
                   return mtgRate;
              public void calcmonthPymt(double newValue)                            //(LoanAmt * Rate) / (1- Math.pow(1+Rate,-Term));
                     monthPymt = (newValue);
              public void display()
              monthPymt = (Amount( ) * Rate( )) / (1- Math.pow(1+Rate( ),-Term( )));
              System.out.printf("The payment amount is:$%.2f", monthPymt);
              System.out.println();
         public static void main (String[] args)
                     Mortgage Mortgage1=new Mortgage();
                     Mortgage1.Amount(200000);
                     Mortgage1.Term(360);
                     Mortgage1.Rate(.0575);
                     Mortgage1.display();
    }

  • Help with displaying images (gif, jpeg...) within a JFrame (or similar)

    Hi all,
    i'm new to the forum and i'll be granted if you kind gentlemen/women could use some advices for my gui home application.
    My purpose is to display a static image in a container (i'd prefer to use javax.swing objects, but if you think that java.awt is more suitable for my app, please feel free to tell me about...). I used a modified code from one of the Java Tutorial's examples, tht actually is an applet and displays images as it is using the paint() method. I just can't realize how to set the GraphicContext in a JFrame or a JPanel to contain the image to display, without using applets. Following part of the code I use (a JButton will fire JApplet start, JApplet is another class file called Apple.java):
    class DMToolz extends JFrame {
         private static final long serialVersionUID = 1L;
         private JPanel jContentPane = null;
         private JButton jButton = null;
         private JComboBox jComboBox = null;
         private JMenuItem jMenuItem = null;
         private JMenuBar jJMenuBar = null;
         private JMenu jMenu = null;
         private JMenu jMenu1 = null;
         public int w=10, h=10;
         public String filename;
          * @throws HeadlessException
         public DMToolz() throws HeadlessException {
              // TODO Auto-generated constructor stub
              super();
              initialize();
         public DMToolz(String arg0) throws HeadlessException {
              super(arg0);
              // TODO Auto-generated constructor stub
              initialize();
          * This method initializes jButton
          * @return javax.swing.JButton
         private JButton getJButton() {
              if (jButton == null) {
                   jButton = new JButton();
                   jButton.setBounds(new Rectangle(723, 505, 103, 38));
                   jButton.setText("UrcaMado'");
                   jButton.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent e) {
    /**************SCRIVERE QUI IL NOME DEL FILE CON L'IMMAGINE DA CARICARE*******************/
                             filename = "reference table player2.gif";
                           java.net.URL imgURL = DMToolz.class.getResource("images/"+filename);
                           BufferedImage img = null;
                           try {
                                img =  ImageIO.read(imgURL);
                               w = img.getWidth();
                               h = img.getHeight();
                               System.out.println("*DM* Immagine letta - W:"+w+" H:"+h);
                            } catch (Exception ex) {System.out.println("*DM* Immagine non letta");}
                           JApplet a = new Apple();
                           a.setName(filename);
                           JFrame f = new JFrame ("UrcaBBestia!");
                           f.addWindowListener(new WindowAdapter() {
                               public void windowClosing(WindowEvent e) {System.exit(0);}
                           f.getContentPane().add(a);
                           f.setPreferredSize( new Dimension(w,h+30) );//30 � (circa) l'altezza della barra del titolo del frame
                               f.pack();
                             f.setVisible(true);                      
              return jButton;
    public class Apple extends JApplet {
         private static final long serialVersionUID = 1L;
        final static Color bg = Color.white;
        final static Color fg = Color.black;
        final static Color red = Color.red;
        final static Color white = Color.white;
        public void init() {
            //Initialize drawing colors
            setBackground(bg);
            setForeground(fg);
        public void paint(Graphics g) {
            Graphics2D g2 = (Graphics2D) g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
            try {
                 String filename = this.getName(); //uso il nome dell'applet come riferimento al nome del file da caricare
                 java.net.URL imgURL = DMToolz.class.getResource("images/"+filename);
                 BufferedImage img =  ImageIO.read(imgURL);
                 if (img.equals(null)) {System.out.println("IMG null!");System.exit(0);}
                System.out.println("IMG letta");
                int w = img.getWidth();
                int h = img.getHeight();
                resize(w,h);
                g2.drawImage(img,
                            0,0,Color.LIGHT_GRAY,
                            null);// no ImageObserver
             } catch (Exception ex) {ex.printStackTrace();
                                          System.out.println("Immagine non letta.");System.exit(0);}
    }//end classPlease never mind about some italian text, used as reminder....
    Thanks in advance.

    Read the Swing tutorial on "How to Use Labels" or "How to Use Icons" for working examples:
    http://java.sun.com/docs/books/tutorial/uiswing/TOC.html
    By the way you should never override the paint() method. Custom painting (not required in this case) is done by overriding the paintComponent(...) method in Swing. Overriding paint() is an old AWT trick.

  • I need help with searching for an image inside another image

    I need to write a program that checks for a specific image (a jpg) inside another, larger, image (a jpg). If so, it returns a value of true. Can anyone help me?
    Winner takes all. First person to solve this gets 10 dukes.
    Please help.

    Hi,
    I would use a full screen image Sequence made with png for transparency and put your article behind. no auto play, stop at first and last image. and information for swipe to display article.

  • Help with Inventory Program Buttons & images

    I'm supposed to have buttons that move between the items in my program individually showing them one by one and also going to the first item when the last one is reached and vice versa, but I cannot get the buttons to to show even show up. I'm also having problems getting any type of image to show up. Any help on this would be appreciated.
    My code is below
    import java.awt.GridLayout;
    import java.text.NumberFormat;
    import java.util.Arrays;
    import javax.swing.*;
    //Begin Main
    public class InventoryProject {
              @SuppressWarnings("unchecked")
              public static Product[] sortArray(Product myProducts[])
                   //Comparator comparator = null;
                   ProductComparator comparator = new ProductComparator();
                   Arrays.sort(myProducts, comparator);
                   return myProducts;
              public static double CalculateInventory(Product myProducts[])
                    double total = 0;
                 for (int i = 0; i < myProducts.length; i++)
                    total += myProducts.calculateInventory();
         return total;
         public static void main (String[] args) {
                   Product products[] = new Product.Supplier[5];
                   //Create 5 Product Objects
                   Product.Supplier invItem0 = new Product.Supplier("The Matrix (DVD)", 100001, 12, 15.99, "Warner Brothers");
                   Product.Supplier invItem1 = new Product.Supplier("The Matrix Reloaded (DVD)", 100002, 9, 17.99, "Warner Brothers");
                   Product.Supplier invItem2 = new Product.Supplier("The Matrix Revolutions (DVD)", 100003, 27, 18.99, "Warner Brothers");
                   Product.Supplier invItem3 = new Product.Supplier("300 (DVD)", 100004, 5, 18.99, "Warner Brothers");
                   Product.Supplier invItem4 = new Product.Supplier("Harry Potter and the Sorcerers Stone (DVD)", 100005, 10, 15.99, "Warner Brothers");
                   //products array
                   products[0] = invItem0;
                   products[1] = invItem1;
                   products[2] = invItem2;
                   products[3] = invItem3;
                   products[4] = invItem4;
                   products = sortArray(products);
                   // Output Product Object
    JTextArea textArea = new JTextArea();
    for (int a = 0; a < products.length; a++)
    textArea.append(products[a]+"\n");
    textArea.append("\nTotal value of the inventory is "+new java.text.DecimalFormat("$0.00").format(CalculateInventory(products))+"\n\n");
    JButton prevBtn = new JButton("Previous");
    prevBtn.setEnabled(false);
    JButton nextBtn = new JButton("Next");
    JPanel p = new JPanel(new GridLayout(1,2));
    p.add(prevBtn); p.add(nextBtn);
    JFrame frame = new JFrame();
    frame.getContentPane().add(new JScrollPane(textArea));
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setTitle("DVD Inventory");
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
    /*          for (int a = 0; a < products.length; a++)
                        System.out.println(products[a]); //use the toString method that you have defined in your Product class to print out the product information.
                   System.out.println("Total Value of The Inventory: " + nf.format (CalculateInventory(products)));
         private String name;
         private int number;
         private int unitCount;
         private double unitPrice;
    //     public String SupplierName;
    //     public static double calculateInventory;
         //Constructor
         public Product (String name, int number, int unitCount, double unitPrice)
              setName(name);
              setNumber(number);
              setUnitCount(unitCount);
              setUnitPrice(unitPrice);
    //     get and set methods for Number attribute
         public void setNumber(int itemnumber){
              number = itemnumber;
         public int getNumber(){
              return number;
    //     get and set methods for Name attribute
         public void setName(String names){
              name = names;
         public String getName(){
              return name;
    //     get and set methods for UnitCount attribute
         public void setUnitCount(int count){
              unitCount = count;
         public int getUnitCount(){
              return unitCount;
    //     get and set methods for UnitPrice attribute
         public void setUnitPrice(double price){
              unitPrice = price;
         public double getUnitPrice(){
              return unitPrice;
    //     get and set Total Inventory method
         public double calculateInventory()
              return getUnitPrice() * getUnitCount();
         public String toString () {
              return "Item Name: " + name + "\n" + "Item Inventory Number: " + number + "\n" + "Item Unit Count: " + unitCount + "\n" + "Item Unit Price: " + unitPrice + "\n" ;
         public void Supplier() {
              // TODO Auto-generated method stub
              return;
    //     public Supplier getSupplierName() {
    //     // TODO Auto-generated method stub
    //     return null;
         static class Supplier extends Product
              //private double restockFee;
              private String supplierName;
              NumberFormat nf = NumberFormat.getCurrencyInstance();
              public Supplier(String Name, int Number, int UnitCount, double UnitPrice, String SupplierName)
                   super(Name, Number, UnitCount, UnitPrice);
                   setSupplierName(SupplierName);
                   //setRestockFee(restockFee);
                   this.supplierName = SupplierName;
              //get and set methods for Supplier attribute
              public String setSupplierName(String supplier)
                   supplierName = supplier;
                   return supplierName;
              public String getSupplierName()
                   return supplierName;
              public double calculateRestockFee()
                   return (((getUnitPrice()) * (getUnitCount())) * 0.05);
              public double calculateInventory()
                   return ((getUnitPrice() * getUnitCount()));
              public String toString ()
                   return "Item Name: " + getName() + "\n" + "Item Inventory Number: " + getNumber() + "\n" + "Item Unit Count: " + getUnitCount()
                        + "\n" + "Item Unit Price: " + nf.format(getUnitPrice()) + "\n" + "Inventory Value: " + nf.format(calculateInventory()) + "\n"
                        + "Supplier Name: " + getSupplierName() + "\n" + "Restock Fee: " + nf.format(calculateRestockFee()) + "\n";
         public int compareTo(Product arg0)
              // TODO Auto-generated method stub
              return (this.name.compareTo(arg0.getName()));
    }public class ProductComparator implements java.util.Comparator
         public int compare(Object o1, Object o2)
                   if(o1 == null) return -1;
                   if(o2 == null) return 1;
                   Product p1 = (Product) o1;
                   Product p2 = (Product) o2;
                   String s1 = p1.getName();
                   String s2 = p2.getName();
                   int compVal = s1.compareTo(s2);
                   return compVal;

    The program does work because I can get the content of my array to show in a GUI the only problem is the buttons aren't showing up in the GUI which is what I'm having a problem with. I also tried adding the panel to the frame but it didn't do any good either so maybe I'm not doing it right although when I compile I get 0 errors. What's the link to the swing tutorial?
            JTextArea textArea = new JTextArea();
            for (int a = 0; a < products.length; a++)
                textArea.append(products[a]+"\n");
            textArea.append("\nTotal value of the inventory is "+new java.text.DecimalFormat("$0.00").format(CalculateInventory(products))+"\n\n");
            JButton prevBtn = new JButton("Previous");
            prevBtn.setEnabled(false);
            JButton nextBtn = new JButton("Next");
            JPanel panel1 = new JPanel(new GridLayout(1,2));
            panel1.add(prevBtn); panel1.add(nextBtn);
            JFrame frame = new JFrame();
            frame.getContentPane().add(new JScrollPane(textArea));
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setTitle("DVD Inventory");
            frame.pack();
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
            frame.add(panel1);Edited by: Morepheus on May 20, 2009 12:55 AM
    Edited by: Morepheus on May 20, 2009 12:58 AM
    Edited by: Morepheus on May 20, 2009 1:00 AM

  • Can someone help with how to get image

    from a database into a display page using Dreamweaver?
    I have a page with a recordset and a database with text and images. The image field only has a link to the folder and image as in images/image1.jpg including size.
    The thumbnail I want to display on a master display page is in the database using varchar and with a link as images/image1.jpg
    When someone wants to view the master page they click on a link and everything that has been input shows from the database. At least everything but the image.  Right now it just shows images/image1.jpg
    I don't know how to call the images from the database.
    Thanks for the help and any information.

    Although it's not 'illegal' to put images or image thumbs in a database, it is strongly recommended NOT to store images/thumbs in a DB because it can seriously drag down the performance of the DB.
    If you know how to call an image with information from your DB, you can do it with the thumbnaail image as well. The process is identical.
    If you don't already have it, buy David Powers' book, 'PHP Solutions' as soon as you can. David's book walks you through basics of php and MySQL, the end result being a dynamic photo gallery. He cautions against storing anything in a DB that is not text or numbers, and it makes sense. VARCHAR isn't the correct column type, you would actually want one of the BLOB types. However, as David says in his book:
    "Storing binary data, such as images, isn't a good idea. It bloats your database, and you can't display images directly from a database. However, the following column types are designed for binary data:
    TINYBLOB:up to 255 bytes
    BLOB: up to 64KB
    MEDIUMBLOB: Up to 16MB
    LONGBLOB: Up to 4GB"
    I know what you are wantimg to do, because I am also developing an online gallery, so I feel your pain with a hitch such as this. The difference is, although I use Dreamweaver, I hand code everything. I use DW for more basic functions such as previewing and whatnot. With a little more info from you, I might be able to help, specifically some code, or a link to the gallery if it is on a remote server.
    Be happy to help you any way I can.
    Sincerely,
    wordman

  • Help with Crop of Imported Images - Please!

    If I crop a jpeg that I have imported from my camera, then apply a crop, the cropped image will fill the screen. However, if I import a jpeg from iPhoto or any other source (desktop, folder, etc.) and apply a crop, the cropped image will be small and does not fill the screen.
    There must be some setting that will make the resultant view of a crop from an imported jpeg fill the screen similar to the behavior of a typical camera imported image. This is driving me nuts and I've spent hours trying to figure it out.
    I realize the actual crop in either case is smaller, but I just want to view it as large as possible. There must be some hidden zoom control for imported images?
    Please help!

    Unless something is broken - doubtful - your images from "other sources" are too small to fill the screen from a dimension standpoint when they are cropped. What you are seeing is the cropped image at 100% view - meaning that's it that's all the pixels you've got.
    RB

  • Help with displaying BLOBs in OBIEE 11g

    I am trying to get OBIEE 11g to display photographs in an Analysis report. I know BLOB fields are not supported, and I have been reading posts on this board and following examples on internet sites that try to get round this problem. But, try as I might, I cannot get those pesky photos to display.
    Below are all the steps I have followed. Sorry that there is a lot to read, but I was hoping that somebody has been successful in doing this, and may spot something in one of my steps that I am doing wrong.
    ORACLE TRANSACTIONAL SOURCE_
    Table : EMPL_PHOTO
    Fields:
    USN VARCHAR2(11) ( Unique Key )
    EMPLOYEE_PHOTO BLOB ( I think the photos are stored as 'png' )
    ORACLE WAREHOUSE SOURCE_
    Table : D_PERSON_PHOTO_LKUP
    Fields :
    PERSON_KEY     NUMBER(38,0) ( Primary Key - Surrogate )
    USN     VARCHAR2(11)
    PHOTO     CLOB
    BLOB to CLOB conversion.
    I used this function :
         create or replace function blob_to_clob_base64(p_data in blob)
         return clob
         is
         l_bufsize integer := 16386;
         l_buffer raw(16386);
         l_offset integer default 1;
         l_result clob;
         begin
         dbms_lob.createtemporary(l_result, false, dbms_lob.call);
         loop
         begin
         dbms_lob.read(p_data, l_bufsize, l_offset, l_buffer);
         exception
         when no_data_found then
         exit;
         end;
         l_offset := l_offset + l_bufsize;
         dbms_lob.append(l_result, to_clob(utl_raw.cast_to_varchar2(utl_encode.base64_encode(l_buffer))));
         end loop;
         return l_result;
         end;
         select usn, employee_photo ,
         BLOB_TO_CLOB_BASE64(employee_photo)
         from empl_photo
    IN OBIEE ADMINISTRATION TOOL_
    *1) Physical Layer*
    Added D_PERSON_PHOTO_LKUP from Connection Pool
    Left it as 'Cachable'
    Didn't join it to any tables
    Changed field PHOTO to a 'LONGVARCHAR' length 100000
    Set USN as the Key ( not the surrogate key )
    *2) BMM Layer*
    Dragged D_PERSON_PHOTO_LKUP across.
    Renamed it to 'LkUp - Photo'
    Ticked the 'lookup table' box
    Removed the surrogate key
    Kept USN as the Primary key
    The icon shows it similar to a Fact table, with a yellow key and green arrow.
    On Dimension table D_PERSON_DETAILS (Dim - P01 - Person Details) added a new logical column
    Called it 'Photo'
    Changed the column source to be derived from an expression.
    Set the expression to be :
    Lookup(DENSE
    "People"."LkUp - Photo"."PHOTO",
    "People"."Dim - P01 - Person Details"."USN" )
    Icon now shows an 'fx' against it.
    Note: This table also had it Surrogate key removed, and USN setting as primary key.
    *3) Presentation Layer*
    Dragged the new Photo field across.
    Saved Repository file, uploaded, and restarted server.
    ONLINE OBIEE_
    Created a new Analysis.
    Selected USN from 'Person Details'
    Selected Photo from 'Person Details'
    Selected a measure from the Fact table
    Under column properties of Photo ( data format ) :
    - Ticked 'Override Default Data Format' box
    - Set to Image URL
    - Custom text format changed to : @[html]"<img alt="" src=""@H"">"
    Under column properties of Photo ( edit formula ) :
    - Changed to : 'data:image/png;base64,'||"Person Details"."Photo"
    The Advanced tab shows the sql as :
         SELECT
         0 s_0,
         "People"."Person Details"."USN" s_1,
         'data:image/png;base64,'||"People"."Person Details"."Photo" s_2,
         "People"."MEASURE"."Count" s_3
         FROM "People"
         ORDER BY 1, 2 ASC NULLS LAST, 3 ASC NULLS LAST
         FETCH FIRST 65001 ROWS ONLY
    Going into the 'results' tab, get error message:
    +State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 17001] Oracle Error code: 932, message: ORA-00932: inconsistent datatypes: expected - got CLOB at OCI call OCIStmtExecute. [nQSError: 17010] SQL statement preparation failed. (HY000)+
    It doesn't seem to be using the Lookup table, but can't work out at which step I have gone wrong.
    Any help would be appreciated.
    Thanks

    Thanks, yes I followed http://docs.oracle.com/cd/E28280_01/bi.1111/e10540/busmodlayer.htm#BGBDBDHI, but when I get to the part of setting the LOOKUP function on th Physical source, only ONE physical source is displayed. I need TWO sources ( The Employee Table, and the Photo LookUp.
    I have raised this as an error with Oracle. We are now on OBIEE 11.1.1.7, but Oracle say BLOBS are still not supported in that release. It will be fixed in 11.1.1.8 and it will be backported into 11.1.1.6.11
    In the meantime we have abandoned showing Photo's in any of our reports.

  • Help with displaying a JTree

    Hi,
    I have developed a webspider that cycles through a website detecting all urls and checking for borken links. I currently have build a JTree that takes the current url that is being processed and creates a string and adds it to a JTree. The problem I have is that the urls are printed in the JTree as one long list, e.g.
    |Test
    |____url 1
    |____url 1a
    |____url 2
    |____url 2a
    I would like it to disply like this:
    |Test
    |____url 1
    |-------|____url 1a
    |____url 2
    |-------|____url 2a
    (I have had to place the dashes in so it displays properly)
    So that the strucutre of the website can be seen. I have read the JTree tutroial and my code looks like this, sorry its large i'm not too sure which bits to cut out:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.event.*;
    import java.net.*;
    import java.io.*;
    import java.util.*;
    public class gui extends JFrame implements Runnable
          *declare variable, boolean
          *thread, a object and a center
          *pane
         protected URL urlInput;
         protected Thread bgThread;
         protected boolean run = false;
         protected WebSpider webSpider;
         public String brokenUrl;
         public String goodUrl;
         public String deadUrl;
         protected DefaultMutableTreeNode rootNode;
        protected DefaultTreeModel treeModel;
         public gui()
                *create the gui here
               setTitle("Testing Tool");
             setSize(600,600);
             //add Buttons to the tool bar
             start.setText("Start");
             start.setActionCommand("Start");
             toolBar.add(start);
             ButtonListener startListener = new ButtonListener();
                 start.addActionListener(startListener);
              cancel.setText("Cancel");
             cancel.setActionCommand("Cancel");
             toolBar.add(cancel);
             ButtonListener cancelListener = new ButtonListener();
                 cancel.addActionListener(cancelListener);
                 clear.setText("Clear");
             clear.setActionCommand("Clear");
             toolBar.add(clear);
             ButtonListener clearListener = new ButtonListener();
                 clear.addActionListener(clearListener);
                 close.setText("Close");
             close.setActionCommand("Close");
             toolBar.add(close);
             ButtonListener closeListener = new ButtonListener();
                 close.addActionListener(closeListener);
                 //creat a simple form
                 urlLabel.setText("Enter URL:");
                 urlLabel.setBounds(100,36,288,24);
                 formTab.add(urlLabel);
                 url.setBounds(170,36,288,24);
                 formTab.add(url);
                 current.setText("Currently Processing: ");
                 current.setBounds(100,80,288,24);
                 formTab.add(current);
             //add the scrol pane and text area to the error tab
             errorTab.add(errorPane);
             errorPane.setBounds(0,0,580,490);
             errorPane.getViewport().add(errorText);
             //add the scroll pane to the tree tab
             treeTab.add(treePane);
             treePane.setBounds(0,0,580,490);
             //create the JTree
             rootNode = new DefaultMutableTreeNode("Test");
             treeModel = new DefaultTreeModel(rootNode);
             treeModel.addTreeModelListener(new MyTreeModelListener());
             tree = new JTree(treeModel);
             tree.setEditable(true);
             tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
            tree.setShowsRootHandles(true);
             treePane.getViewport().add(tree);
             //create the tabbed window             
            centerPane.setBorder(new javax.swing.border.EtchedBorder());
            formTab.setLayout(null);
            errorTab.setLayout(null);
            treeTab.setLayout(null);
            centerPane.addTab("Search Parameters", formTab);
            centerPane.addTab("Error Messages", errorTab);
            centerPane.addTab("Website Structure", treeTab);
              //add the tool bar and tabbed pane
              getContentPane().add(toolBar, java.awt.BorderLayout.NORTH);
            getContentPane().add(centerPane, java.awt.BorderLayout.CENTER);             
                 *create the tool bar pane, a center pane, add the buttons,
                 *labels, tabs, a text field for user input here
                javax.swing.JPanel toolBar = new javax.swing.JPanel();
                javax.swing.JButton start = new javax.swing.JButton();
              javax.swing.JButton cancel = new javax.swing.JButton();
              javax.swing.JButton clear = new javax.swing.JButton();
              javax.swing.JButton close = new javax.swing.JButton();      
                javax.swing.JTabbedPane centerPane = new javax.swing.JTabbedPane();
                javax.swing.JPanel formTab = new javax.swing.JPanel();
                javax.swing.JLabel urlLabel = new javax.swing.JLabel();
                javax.swing.JLabel current = new javax.swing.JLabel();
                javax.swing.JTextField url = new javax.swing.JTextField();
                javax.swing.JPanel errorTab = new javax.swing.JPanel();
                javax.swing.JTextArea errorText = new javax.swing.JTextArea();
                javax.swing.JScrollPane errorPane = new javax.swing.JScrollPane();
                javax.swing.JPanel treeTab = new javax.swing.JPanel();
                javax.swing.JScrollPane treePane = new javax.swing.JScrollPane();
                javax.swing.JTree tree = new javax.swing.JTree();
               *show the gui
              public static void main(String args[])
                  (new gui()).setVisible(true);
              *listen for the button presses and set the
              *boolean flag depending on which button is pressed
             class ButtonListener implements ActionListener
                  public void actionPerformed(ActionEvent event)
                       Object object = event.getSource();
                       if (object == start)
                            run = true;
                            startActionPerformed(event);
                       if (object == cancel)
                            run = false;
                            startActionPerformed(event);
                       if (object == clear)
                            errorText.setText("");
                            rootNode.removeAllChildren();
                           treeModel.reload();
                       if (object == close)
                            System.exit(0);
              *this method is called when the start or
              *cancel button is pressed.
             void startActionPerformed (ActionEvent event)
                  if (run == true && bgThread == null)
                       bgThread = new Thread(this);
                       bgThread.start();
                  if (run == false && bgThread != null)
                       webSpider.cancel();
              *this mehtod will start the background thred.
              *the background thread is required so that the
              *GUI is still displayed
             public void run()
                  try
                           webSpider = new WebSpider(this);
                         webSpider.clear();
                         urlInput = new URL(url.getText());
                       webSpider.addURL(urlInput);
                       webSpider.run();
                       bgThread = null;
                      catch (MalformedURLException e)
                           addressError addErr = new addressError();
                         addErr.addMsg = "URL ERROR - PLEASE CHECK";
                         SwingUtilities.invokeLater(addErr);
                 *this method is called by the web spider
                 *once a url is found. Validation of navigation
                 *happens here.
                public boolean urlFound(URL urlInput,URL url)
                      CurrentlyProcessing pro = new CurrentlyProcessing();
                  pro.msg = url.toString();
                  SwingUtilities.invokeLater(pro);
                  if (!testLink(url))
                        navigationError navErr = new navigationError();
                        navErr.navMsg = "Broken Link "+url+" caused on "+urlInput+"\n";
                        brokenUrl = url.toString();
                        return false;
                  if (!url.getHost().equalsIgnoreCase(urlInput.getHost()))
                        return false;
                  else
                         return true;
                //this method is returned if there is no link on a web page
                public void urlNotFound(URL urlInput)
                          deadEnd dEnd = new deadEnd();
                           dEnd.dEMsg = "No links on "+urlInput+"\n";
                           deadUrl = urlInput.toString();                
                //this method is called internally to check that a link works              
                protected boolean testLink(URL url)
                   try
                         URLConnection connection = url.openConnection();
                         connection.connect();
                         goodUrl = url.toString();
                         return true;
                  catch (IOException e)
                         return false;
                //this method is called when an error is found            
                public void urlError(URL url)
              //this method is called when an email address is found             
                public void emailFound(String email)
              //this method will update any navigation errors found
              class addressError implements Runnable
                   public String addMsg;
                   public void run()
                        current.setText("Currently Processing: "+ addMsg);
                        errorText.append(addMsg);
              class navigationError implements Runnable
                   public String navMsg;
                   public void run()
                        errorText.append(navMsg);
              class deadEnd implements Runnable
                   public String dEMsg;
                   public void run()
                        errorText.append(dEMsg);
              //this method will update the currently processing field on the GUI
              public class CurrentlyProcessing implements Runnable
                   public String msg;
                  //public String msgInfo = msg;
                     public void run()
                         current.setText("Currently Processing: " + msg );
                         addObject(msg);
             //add a node to the tree
                public DefaultMutableTreeNode addObject (Object child)
                 DefaultMutableTreeNode parentNode = null;
                 return addObject(parentNode, child, true);
             public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent,Object child,boolean shouldBeVisible)
                 DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(child);
                 if (parent == null)
                     parent = rootNode;
                 treeModel.insertNodeInto(childNode, parent, parent.getChildCount());
                 if (shouldBeVisible)
                     tree.scrollPathToVisible(new TreePath(childNode.getPath()));
                      return childNode;
             //listener for the tree model     
             public class MyTreeModelListener implements TreeModelListener
                  public void treeNodesChanged (TreeModelEvent e)
                       DefaultMutableTreeNode node;
                       node = (DefaultMutableTreeNode)
                       (e.getTreePath().getLastPathComponent());
                       try
                            int index = e.getChildIndices()[0];
                            node = (DefaultMutableTreeNode)
                            (node.getChildAt(index));
                       catch (NullPointerException exc)
                  public void treeNodesInserted(TreeModelEvent e)
                  public void treeStructureChanged(TreeModelEvent e)
                  public void treeNodesRemoved(TreeModelEvent e)
    }It uses a class called webspider which i have not attached, if required please let me know. I beleive that in addObject I am adding all nodes to the root as children.
    Any help would be much appreciated.
    Many Thanks
    MRv

    I would recomend you create your own JTree class for this.
    Here are a few things I set in my constructor within the JTree:
    // turn on tooltips
    ToolTipManager.sharedInstance().registerComponent(this);
    // used by two setters so create reference
    RollupTreeCellRenderer renderer = new RollupTreeCellRenderer();
    // customizing the icons for the tree
    // setting the folder icons
    renderer.setOpenIcon(IconLoader.getIcon("Open.gif"));
    renderer.setClosedIcon(IconLoader.getIcon("Folder.gif"));
    // inventory icon
    renderer.setLeafIcon(IconLoader.getIcon("Document.gif"));
    // add renderer to highlight Inventory nodes with Red or Blue text
    setCellRenderer(renderer);
    Here is the renderer class example:
    class RollupTreeCellRenderer
    extends DefaultTreeCellRenderer
    * Configures the renderer based on the passed in components.
    * The value is set from messaging the tree with
    * <code>convertValueToText</code>, which ultimately invokes
    * <code>toString</code> on <code>value</code>.
    * The foreground color is set based on the selection and the icon
    * is set based on on leaf and expanded.
    * @param tree JTree
    * @param value Object
    * @param sel boolean
    * @param expanded boolean
    * @param leaf boolean
    * @param row int
    * @param hasFocus boolean
    * @return Component
    public Component getTreeCellRendererComponent(JTree tree, Object value,
    boolean sel,
    boolean expanded,
    boolean leaf, int row,
    boolean hasFocus)
    // call super for default behavior
    super.getTreeCellRendererComponent(tree,
    value,
    sel,
    expanded,
    leaf,
    row,
    hasFocus);
    // if the current node is selected do NOT over-ride
    // the default colors
    if (sel)
    return this;
    // cast to our wrapper Node class
    RollupNode node = (RollupNode) value;
    if (node.isInventory())
    if (RollupMediator.getInstance().nodeInList(node))
    setForeground(RollupTree.FOUND);
    setToolTipText("Click to find positions count");
    else
    setForeground(RollupTree.NOT_FOUND);
    setToolTipText("Inventory not in current business date");
    else
    setToolTipText("Double click to edit name");
    return this;
    } // Renderer
    Let me know if you need more examples.
    BTW
    I the TreeCellRenderer example is not public so I can add it to the bottom of the file that contains my custom JTree.

  • Help with displaying errors in jsp using html:errors/

    Here is my problem.
    In my overridden ActionForm.validate() method, i am returning ActionErrors (as required). When there are input errors in my form submission, the control goes back to the JSP page i used to read user input (so far so good). The JSP page is rendered fine for taking input for the second time but no errors are displayed although i am using the tag <html:errors/>
    I tried to find the org.apache.struts.action.ERROR in my request attributes and it is there with the size of 1 (because i am reporting one error, in my sample run). Any idea why <html:errors/> won't display the errors even though they are there??? Here is what i am doing in my ActionForm class:
    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
    ActionErrors errors = new ActionErrors();
    if (this.email == null || this.email.length() < 1) {
    errors.add("username", new ActionError
    ("error.username.required"));
    return errors;
    Any help is appreciated.

    First of all, thanks for taking time to look at my message. Here is how my message-resources tag look like in struts-config.xml file:
    <message-resources parameter="ApplicationResources"/>
    The "ApplicationResources.properties" file exist in the WEB-INF folder of my application and following are the entries in that file that i think are relevant:
    errors.header=<h3><font color="red">Validation Error</font></h3>You must correct the following error(s) before proceeding:<ul>
    errors.footer=</ul><hr>
    error.username.required=<li>Username is required</li>
    Is there anything else needed to go into resource file? Or should i put my resource file somewhere else?

Maybe you are looking for

  • The computer my iTunes account was locked to no longer works

    As the title says my computer that has all my tv shows and that on no longer works. I was reading when I bought the tv series and that, that its locked to one computer only. So what happens now that its broken? Do I have to rebuy everything when I ge

  • Report Template -  NULL in Row Template Condition

    I just found a workaround, but, in a report template, in a Row Template # Condition, based on a PL/SQL expression, the condition always fails if/when #COLUMN_VALUE# was NULL. I worked around this with a NVL in the query - but, is there a better way?

  • Password protecting scanned documents

    I can password protect pdf files, but when I scan a document, it won't allow me to password protect it. When I do "Save as" it doesn't give me security options. When I "print as pdf" it will give me security options but once I put in the password and

  • HT5557 I'm trying to buy a book from iBooks but says can not connect to I Store

    I'm trying to buy a book but it comes up "can't connect I tunes Store

  • Photoshop Elements 10 sur Mac Book air ?

    Bonjour Ayant un MAC BOOK AIR comment puis je faire pour télécharger le logiciel que l'on m'a offert (et que j'ai enregistrer sur mon compte Adobe) sur mon MAC ? Car je n'ai pas de lecteur DVD pour le faire ... Merci d'avance pour votre aide