Importing a jpg or gif to appear in a list

I'm fairly new at ActionScript. I'm using Flash 8
Pro....Anyway, I have an XML file setup with a list of file names
for jpg and gif that I want to appear in a List along with some
text. I have the XML part working fine that imports the file names.
Here's the crucial bit of code:
var image:MovieClip =
this.createEmptyMovieClip("thumb"+cnt+"_mc", cnt+1);
loadMovie(thumb,image);
select_list.iconFunction = "pictureIcon";
select_list.addItem({label:itemdesc,
icon:"thumb"+cnt+"_mc"});
The cnt variable is 0 to the end of the array. thumb contains
the file name ("myjpg.jpg").
I'm having 2 problems: The image being loaded is actually
appearing in the upper-left corner, where it shouldn't be
appearing and the List isn't working. The List works Ok with
just text.
Any suggestions would be appreciated.

Gregory,
Have you ticked Anti-Aliasing? At least in older versions, it is hidden away in the Image Size part.

Similar Messages

  • How can I make text in images in a jpg or gif not appear blurry?

    Probably a very simple answer, but I'm a newb and could use the help.
    I'm creating an image for the web with a logo and text - the logo comes out ok, the text is all blurry. I've messed around with saving for web but no luck. It has to be a gif or a jpg.
    Thanks for the help

    Gregory,
    Have you ticked Anti-Aliasing? At least in older versions, it is hidden away in the Image Size part.

  • FCP won't import jpg or gifs

    I wrote an AppleScript to download images from a website (weather.com, accuweather.com) and I tried to import them into FCP, but I get the "File Error: Unknown File." If I download a jpg or gif manually from a website it works fine. I'm thinking maybe its a problem with the way I'm downloading the images, but I'm not sure.

    All the images specs look the same. The "Save As..." trick fixes the problem, but it takes too long and defeats part of the purpose of the AppleScript. I'm doing this for a weather report twice a week so the maps have to be downloaded and ready in 10 minutes for them to be current. And I have 18 images to do that to. The PS trick also won't work for the gif images because they're animated. Would the file creator type have anything to do with this?
    Thanks again for your help. It is greatly appreciated.

  • Can I open a PDF and save it as a JPG or GIF?

    I asked on the PageMaker forum about creating a jpg or gif of a book cover I created in PageMaker. The suggestion was to create a pdf of it (no problem), open it in PhotoShop, then save it in the format I need. I don't own PhotoShop, so downloaded the Album Starter Edition. For the book cover with photos on it, only the photos are imported; for the book cover with only text and solid-color boxes, nothing at all is imported. Does anyone know how to get the entire pdf into PhotoShop so it can be saved, intact, as a jpg or gif? Thanks!

    I think Downloader in PSE organizer has capabilty to extract images from PDF.
    Collin- Is there any other way in PSE to extract images from PDF. Pls tell us how hat can be done.

  • How can I save an object Image in a file with .jpg or .gif format?

    Greetings
    I'm programming a Ray Tracer but now I need to know like save an object Image in a file with .jpg or .gif format. Could anyone help me, please? It's very important to me do this as soon as possible. Thanks.

    In 1.4 you have ImageIO available ... javax.imageio.ImageIO.write is the method to call.
    - David

  • Saving file, but jpg and gif comes out garbled

    Would someone please help me? I'm at my wit's end here. I'm writing a program that reads a file and saves it, but it needs to read a maximum of 512 bytes before it starts to write. It needs to work with both text files and images.
    - It works fine with text files.
    - It works fine with bmp images.
    - It works fine with jpg and gif images under 512 bytes.
    - With a jpg or gif over 512 bytes, it comes out all garbled, but the same file size as the original.
    One thing is really confoozling me. When the image comes out garbled, I tried changing the files for both the original and the copy into text files by changing the file extension to .txt. Both the text files were identical! So if the data is identical, why is the copy not showing the same image as the original?
    import java.io.*;
         public class SaveFile{
              public static final int BUFSIZE = 512;
              public static final String LIBRARY = "C:\\";
              static int totalRead = 0;  //Total number of bytes in buffer (Max BUFSIZE).
              static int fileSize = 0;  //Size of whole file.
                  static String fileName = "";  //Name of file.
                 static char[] data = new char[BUFSIZE];  //The data in the file.
              public static void main(String[] args){
                            //Bytes already read by the buffer.
                      int charsRead = BUFSIZE; 
                          //Takes name of file from main argument.
                         for(int i=0; i < args.length; i++)
                             fileName = fileName + args;
    //Name of file including directory.
              String fetchFile = LIBRARY + fileName;
              File file1 = new File(fetchFile);
              * Reads a string from the file to data (char array).
                   BufferedReader reader =
    new BufferedReader(new FileReader(file1), BUFSIZE);
                   BufferedWriter writer =
    new BufferedWriter(new FileWriter(fileName));
                   //Will continue as long as buffer is full.
                   while (charsRead == BUFSIZE){ 
                        charsRead = reader.read(data, 0, BUFSIZE);
                        if (charsRead != -1) {
                             totalRead = charsRead;
                             write(writer);
                             fileSize = fileSize + totalRead;
                   reader.close();
                   writer.close();
              System.out.println((fileSize) + " bytes read and saved as " + fileName);
         * Writes data to a new file.
         public static void write(BufferedWriter writer) {
                   for (int j = 0; j < totalRead; j++) {
                        writer.write(data[j]);
    I stripped away the directory selection and error handling to make it simpler.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Cadvan1123 wrote:
    I think the best choice is to use a ByteArrayOutputStreamWrong. You do not need a ByteArrayOutputStream
    and I think that it uses ASCII encodingPossible, but you can't just make that assumption. On windows for instance, there's a good likelihood it could use ANSI. And BTW, ASCII is for the most part dead, as it has been superseded by UTF-8.
    Check out t [jacobs.io.DataFetcher in TUS|http://tus.svn.sourceforge.net/viewvc/tus/tjacobs/] for a threadable and optimal/close-to-optimal solution for reading in binary files.
    Edited by: tjacobs01 on Mar 20, 2010 2:56 PM

  • COPY JPG AND GIF BY PROGRAM

    I need to create a simple java program to copy a JPG or GIF image and I don't know to do it.
    Could someone help me ?
    Below you can see my test program.
    Thanks.
    Fernando Xavier
    p.s Before I find the solution, I will include it in a Server socket program .
    import java.io.*;
    public class copiaByte {
    public static void main(String args[])
    try {
    FileReader fin = new FileReader(args[0]);
    BufferedReader bin = new BufferedReader(fin);
    FileWriter fou = new FileWriter(args[1]);
    BufferedWriter bou = new BufferedWriter(fou);
    int a = 0;
    a = bin.read();
    while (a > -1)
    // char b = (char) a;
    bou.write(a);
    a = bin.read();
    System.out.println("end");
    bin.close();
    fin.close();
    bou.close();
    fou.close();
    catch (IOException io1)
    System.out.println("File Error");
    }

    The reader/writer API is meant for pure text. You should use streams to transfer binary data like images.

  • Imported documents (jpg and pdf) showing up negative photos

    I am putting together a newsletter in Pages '09 (v 4.3). From time-to-time, when I import a JPG or PDF that has a photo in the document, the photo reverses itself and becomes a negative image. Any ideas on how to fix this?
    Running OSX 10.8.4
    Thanks!

    I think I may have solved this.... I am not sure which of these steps did it or if it really requires all of them, but this worked for me (well pretty much...)
    My theory based on observations above was maybe the system photo library was still somehow set to the old iPhoto one and I needed to force it to update. So, I created a new photo library by starting up photos with 'option' held down. I added a couple of photos to it, and in photos preferences on my mac set it to be the system library. I then started iTunes and synced it to my iPhone - the photos in the new library appeared on the phone. I then quit photos and iTunes, restarted photos with 'option' held down and this time selected the 'proper' photos library. I set it to the system lib in photos preferences. For good measure I also cleared the iPod photo cache in this library (detailed instructions for all of these steps were just taken from online help).
    Now when I restart iTunes and resynced, all worked!!
    The only outstanding issue is for some reason a seemingly random collection of old photos from years ago are being synced too, despite the fact I told it to just do the last 12 months in iTunes. Still much better than before!

  • Mac OSX, 10.7.5, LR 5.6  After creating a new folder in the Destination section and importing images, the new folder name appears as 2010, no matter what name I give it.  Why is it doing this?

    Mac OSX, 10.7.5, LR 5.6  After creating a new folder in the Destination section and importing images, the new folder name appears as 2010, no matter what name I give it.  Why is it doing this?

    I am experiencing Mavericks failing to copy subdirectories from usb sticks, I am backing up game saves from a console. Both sticks I use are fine, same permissions of course since the console wrote the files. Sometimes it copies, sometimes it doesn't. It seems to be related to the mounting process.
    Thank God Apple hasn't (yet) broken bash.

  • How to deal with addition of .jpg or .gif file

    how do i add a LARGE .jpg or .gif image to a JPanel? and is it possible to add JTextField or other features onto the .jpg or .gif file after the addition of the image?
    Thanks for the time and consideration.

    If you want the image to just be the background for a panel then you will need to subclass JPanel and override the paintComponent(Graphics) method. In the paintComponent(Graphics) method you will need to draw the image yourself using the Graphics.drawImage() method. For loading the image I would suggest using one of the ImageIO.read() methods.

  • How do I change "save image" to save as jpg or gif rather than an html pointer to the image?

    When I try to download images it is saving them as an HTML file instead of the actual image. I want to save images in their native jpg or gif formats as they are on the web. Downloading wallpapers for example is not possible. Without this I'm not going to stick with Firefox which is unfortunate because so far I love everything else about it, especially sync. I tried to download a Buffalo Bills helmet to use as an icon for a Bills fan forum which I wanted a Firefox shortcut for on my homescreen. I had to use the Android browser to do that because of this problem. Ridiculous!

    Unfortunately, Firefox for Android works quite differently than desktop Firefox in this regard. On the desktop, if you open about:config and set browser.download.useDownloadDir to false, then you prompted for the save location and file name. On Android, this simply stops Save Image from working.
    I was able to access the file by renaming Images.htm to a real file name using the ES File Explorer app. But... if you save images often, that would get old fast.
    Note: I think the name Images.htm came from the Google images results page that I was saving from, and the file name will depend on the site. When I saved from a site where the images had their own names, .jpeg was appended instead of .htm.

  • Problem printing PDF picture files imported from JPG using HP Colour InkJet cp1700 printer

    When I print PDF picture files imported from JPG using an HP Colour InkJet cp1700 printer, the picture spills over.  A wide range of other PDF files print OK.  Have tried things such as configuring the printer to scale to letter size, etc,, but without success.  Have a Windows 7 64 bit computer and Adobe Acrobat Pro Extended 9.5.5.  Any ideas?

    Hello there! Welcome to the forums @rt70 
    I understand you're having some issues with printing PDF files from a website on Windows 7.
    I would personally suggest trying to print from that website using a different web browser. If you're using Internet Explorer, try FireFox or Chrome, for example.
    You can also try running the Print and Scan Doctor tool, that will search and try and fix printing issues.
    If you have any issues that continue, please let me know what they are and which programs, websites, and web browsers you have tried, along with the results from running the diagnostic tool above.
    Good luck and have a great day
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

  • IPhoto will not import certain JPG files

    I have just migrated to a 2012 Retina 15" MacBook Pro from a 13" MBP. I am using Mavericks 10.9.1 and iPhoto 9.5.1. The MBP is a 2.7gHz quad core with 16GB of memory and a 768GB SSD. I was trying to tidy up my hard disc and import some .jpg files from the output folder on my Capture One Session. iPhoto will not import certain jpg files but will import others. The message I get is as follows  The following file could not be imported.  The file is an unrecognised format. Then shows below for example /Users/xxxx/Pictures/Capture One Session/Output/L1000212.jpg.
    I first tried creating a new library and importing to that with no success. I then rebuilt the database. I repaired permissions. I deleted the iPhoto.plist and its caches and restarted - no success. I then deleted iPhoto and reinstalled from App Store after deleting the plist and caches again. Still no luck. The .jpg files in question open perfectly in Photoshop CC and Preview. I tried altering them slightly and resaving but still they would not import. I reinstalled Mavericks - no improvement. If I reconvert the files from the original DNG's into TIFF files, then they will import to iPhoto
    Any ideas anyone?
    Wilson

    I just recorded an action in Photoshop CC to assign ProPhoto colourspace save and close. Then copied all the problem jpegs into a temp file and ran the action. With this super fast machine, It only took a few minutes to convert 500+ files and they have now all imported perfectly. I have changed my JPEG recipe to convert DNG's from embedded to ProPhoto.
    Thanks again. Colourspace would never have occurred to me.
    Wilson

  • I've just imported photos that are misdated and appear out of order in my events. How can I correct the dates on these events so they appear properly?

    I've just imported photos that are misdated and appear out of order in my events. How can I correct the dates on these events so they appear properly?

    The one iin the Photos ➙ Adjust Date and Time menu option:
    checkbox below:

  • Convert jpg to gif images

    I make an application that create jpg images with jfree chart.
    But my client need the graphics in GIF format.
    I need:
    1. A conver program to pass from JPG to GIF format
    or
    2. A program to generate graphics (pie 3-d with texts) in GIF
    Someone likes help me?
    Thanks.
    MIGUEL ANGEL CARO
    [email protected]

    JFreeChart is open source, I'm sure you can get a Java GIF encoder library and wedge it into the JFreeChart API to make it create GIFs.
    Why does it need to be GIFs, though?

Maybe you are looking for