A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: how to: part of image in flash to change pic on every load

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    4

    how to: part of image in flash to change pic on every load

    I'm using Flash CS4, and a template that I got from a friend to create a website.

    The template I have uses this "man figure" on the right side of the file. I want to make it so that this pictures loads a different picture each time the page refreshes. The picture can be randomly rotated to a different picture.

    I'm wondering if there is a possibility to do this, and if so, how should I go about it.

    My knowledge of Flash is very poor...

    Here is the template and swf file of the original file I have uploaded to a downlaodable website. The link is only available for 7 days from today.

    http://www.yousendit.com/download/TH...YSsyWGZIRGc9PQ

  2. #2
    Senior Member
    Join Date
    Jan 2010
    Location
    England
    Posts
    268
    ello there. i fixed this little problem of yours for ya i saved it as a flash 8 document.
    download it and open up your "man" movieclip. everytime you load the swf youl get a random pic. youl notice i pasted the frames to make 4 different pictures with a different number on them. the code will pick a random number and then associate a number with the framelabel, picture + random number = picture. just replace the numbered pics with your own photos and you'll be away if you run into anymore probs il try and help. good luck with your project.

    http://www.megaupload.com/?d=4S62JESR

    flashkits file management thing has just let me down for the FIRST time. wont let me attach it so here it is by megaupload.
    Last edited by stevehungry; 03-13-2010 at 08:25 PM.

  3. #3
    Senior Member
    Join Date
    May 2008
    Posts
    332
    PROCEED WITH CAUTION !!!
    In following the link show above my machine was infected with the "2010 Vista Internet Security" spyware/malware.
    This is a malicious and fake antivirus program and very hard to remove!
    BE AWARE!
    Eye for Video

  4. #4
    Senior Member
    Join Date
    Jan 2010
    Location
    England
    Posts
    268
    thats a real kick in the teeth..but its got nothing to do with me. just trying to do some good by helping this guy.

  5. #5
    Junior Member
    Join Date
    Mar 2010
    Posts
    4
    thanks for that help!!! totally cool!

    sorry I didn't get to reply early. I posted from my work, bookmarked the link, and forgot to save my bookmark to my usb to take it home. haha.

    Thanks again!

  6. #6
    Senior Member
    Join Date
    May 2008
    Posts
    332
    Hey,
    Looks like you've been putting in your time here trying to do the right thing... so no hard feelings.
    I'd just like to remind Forum members to be very careful about out-sourcing file uploading. If you have a Web site, then you have access to a server. So just upload your oversized or odd file type file and provide a direct download link to that file.. easy as pie!
    Best wishes,
    EfV

  7. #7
    Junior Member
    Join Date
    Mar 2010
    Posts
    4

    one more thing...

    just for future reference, would you mind telling me how I could make these images in non-random way, such that the "next" image will show in every load, and repeating from the beginning image again?

  8. #8
    Senior Member
    Join Date
    Jan 2010
    Location
    England
    Posts
    268
    oh hi again, if this was for that thing with the businessman loading on the site then i think i remember it. instead of using the random code you would just use
    Actionscript Code:
    buttonname.onPress = function () {
    nextFrame();
    }
    that will play the next image each time that particular button is clicked.
    might be addicted to flash...
    _______________________________________

  9. #9
    Junior Member
    Join Date
    Mar 2010
    Posts
    4
    that's the guy haha.

    sweeeeet, thanks! works great!

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