A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Question about images in flash

  1. #1
    Junior Member
    Join Date
    Apr 2006
    Posts
    6

    Question about images in flash

    What is the overall best way to bring photographs into flash so that they will not have too much of a problem loading, and be of decent quality? Thanks!

  2. #2
    Senior Member Computer Dork's Avatar
    Join Date
    Mar 2001
    Location
    St. Louis
    Posts
    1,026
    Optimize them in fireworks first - that's what I do, and it seems to save on quality.

  3. #3
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    agreed. (although I use Photoshop)... also if you need to have transparency in yor images you need to use .gif or .png...if your Object (on a transparent BG) has highlights or drop shadows...you will need to use .png.

    Also...are you talking about loading the images dynamically (externally) or imporing them into your MOVIE before hand?

  4. #4
    Junior Member
    Join Date
    Apr 2006
    Posts
    6
    Thank you for your help! I was talking about bringing them into flash to use them for a website. I'm not really sure how to load them dynamically

  5. #5
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    well compress in your images in your Image Editor as you see fit...

    but to use an image dynamically, is more or less like calling an image in HTML...(you link to it)...and the image in a directory within your website directory.

    heres an example:
    1.) make a blank/empty movieClip and drag it to our stage. (give it an instance name of containerClip)
    2.) make a button
    3.) put this code on the button:
    code:

    on(press){
    containerClip.loadMovie("image1.jpg");
    }



    thats it! now to explain what you just did.

    1.) First you basically created a "TARGET" to load your image into (this was the blank movieClip with the INSTANCE name of containerClip)

    2.) you created a button that had the actions to LOAD our image into the containerClip. pathed to it: containerClip.

    the you added the action: loadMovie();

    and in the parameters you filled in WHAT you want loaded into the containerClip: "image1.jpg"


    you can also create blank/empty movieClips on the fly (meaing you dont need to have a target already on the stage..you create one same tie you load the image

    code:

    on(press){
    this.createEmptyMovieClip("containerClip", this.getNextHighestDepth()); // you can assign a level here instead of nextHighestDepth.
    containerClip.loadMovie("image1.jpg");
    }


  6. #6
    Junior Member
    Join Date
    Apr 2006
    Posts
    6
    Wow thank you so much for explaing that to me! I just tried it and it worked. I have a question, is there a way to control where the image will show up? Does it just always show up basically where your movieclip is placed? Thanks so much again... you are awesome, lol.

  7. #7
    Senior Member
    Join Date
    Jan 2005
    Posts
    152
    Also if you are rotating your image at all you will notice it will distort. Convert it into a vector graphic (usually a smaller file size).

    You do this by clicking on the jpg (or any image) on your stage, Modify>bitmap>trace bitmap.

    For the best results, closest to the original image do the following settings:
    Color Threshold: 10
    Min Area: 1 pixels
    Curve Fit: Pixel
    Corner Threshold: Many corners

    Have fun

  8. #8
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    Quote Originally Posted by lamblove
    Wow thank you so much for explaing that to me! I just tried it and it worked. I have a question, is there a way to control where the image will show up? Does it just always show up basically where your movieclip is placed? Thanks so much again... you are awesome, lol.
    well you can control the placement of the containerClip like you would anything else

    containerClip._x = 55;
    containerClip._y = 155;

    for example.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center