A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: jpegs

  1. #1
    Ivor1 ivor1's Avatar
    Join Date
    Aug 2006
    Location
    Dundee, Scotland
    Posts
    478

    jpegs

    I want to ascribe buttons to jpegs held in my Flash library for a photo album(in much the same way you might attach sound files stored in the library).Can anyone help?

  2. #2
    Registered User Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    You'll have to put them in a movie clip, you can't use Linkage on a bitmap.

    But I'd advise against that, cause they won't load with the preloader and your going to have a large white square on the page until they all load.

  3. #3
    Ivor1 ivor1's Avatar
    Join Date
    Aug 2006
    Location
    Dundee, Scotland
    Posts
    478
    Thanks, I figured I'd need a m_clip but if I place all 20 jpegs in one clip will they react
    separately to each button, eg. will 1.jpeg respond to button1, 2.jpeg to button2 and so on?

  4. #4
    Registered User Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    If you make a new movie clip, put a stop in frame 1 of the actions layer. Make another layer for the images. Start in frame 2 with the first image, frame 3 for the next and so on. Put this clip on the stage, give it an instance name of picsClip. Then you can use just 2 buttons to play next or previous frame, or you can add 20 buttons if you want and just use code to gotoAndStop(3); or whatever frame corresponds for that frames picture.

    This way, your preloader will load all the images.

    Or, you can use LoadMovie to load your images off the server into an empty clip and they will load one at a time, and only as they are called.

  5. #5
    Ivor1 ivor1's Avatar
    Join Date
    Aug 2006
    Location
    Dundee, Scotland
    Posts
    478
    I'm off to try it. Many thanks for your help.

  6. #6
    Registered User Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    Post back if you have trouble. It's really a simple concept though.

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