A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: Can anyone help with this slideshow...

  1. #1
    Junior Member
    Join Date
    Aug 2009
    Posts
    14

    Can anyone help with this slideshow...

    ...because I'm pretty close to chucking my mac out the window in frustration.

    Basically, I'm trying to build a simple slideshow with AS3 consisting of one movie clip which should be controlled backwards and forwards using simple buttons. I can get the slideshow to play forward once but, apart from getting slide 2 to go back to slide 1, I can't get it to work with the remaining slides. If anyone could take a quick look at the attached file and let me know what I'm doing wrong, I'd really appreciate it. It's driving me pretty insane -
    I know the slidehow is unfinished but I wanted to figure out how to make it work properly before I did that.

    Thanks,
    Marc
    Attached Files Attached Files

  2. #2
    Senior Member
    Join Date
    Jun 2009
    Posts
    171
    If your willing to rebuild it as an AS2 file. The code is pretty simple.

  3. #3
    Senior Member Robb@exo's Avatar
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    1,540
    Hey Marc, just looking at your file and I was wondering about the buttons. Is the "forward" button always supposed to advance 10 frames? And is the "back" button supposed to always go back to the beginning? Or rewind 10 frames?
    Wile E. Coyote - "Clear as mud?"

  4. #4
    Junior Member
    Join Date
    Aug 2009
    Posts
    14
    Quote Originally Posted by Robb@exo View Post
    Hey Marc, just looking at your file and I was wondering about the buttons. Is the "forward" button always supposed to advance 10 frames? And is the "back" button supposed to always go back to the beginning? Or rewind 10 frames?
    Yeah, the forward button should go forward ten frames ie. to the next part of the slide, and the back button should rewind 10 frames to the previous part of the slide. It's probably pretty simple but I just can't get my head around it. The bit that's causing me a headache is that I want it to slide smoothly, rather than simply jump ahead/backward by 10 frames.

  5. #5
    Junior Member
    Join Date
    Aug 2009
    Posts
    14
    Quote Originally Posted by dplows View Post
    If your willing to rebuild it as an AS2 file. The code is pretty simple.
    Thanks for the reply dude - but I'd really like to persevere with AS3, as I think its the way forward (albeit not in my slideshow )

    Thanks again,
    Marc

  6. #6
    Senior Member Robb@exo's Avatar
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    1,540
    Hey, had a look at the file and made some changes, let me know if they're suitable. Have a look at the file and let me know. Cheers!
    Last edited by Robb@exo; 04-01-2010 at 12:18 AM.
    Wile E. Coyote - "Clear as mud?"

  7. #7
    Junior Member
    Join Date
    Aug 2009
    Posts
    14
    Dude, that's it!! What can I say - thanks again. I honestly wasn't trying to get someone else to write my code for me, but its very helpful. Now I'm going to go through it all and try to find out what makes it work...

    Thanks again, it's much appreciated (and you've saved my Mac from ending up on the pavement outside!)

    Cheers,
    Marc

  8. #8
    Senior Member Robb@exo's Avatar
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    1,540
    Let me know if you want me to comment any pieces of code that you don't understand. Glad you liked it.
    Wile E. Coyote - "Clear as mud?"

  9. #9
    Junior Member
    Join Date
    Aug 2009
    Posts
    14
    Well, it would be really helpful if you could comment the following lines:
    6
    12 (what do the true and false values represent? Also applies to lines 39 & 40)
    30
    34
    43

    Also, if I try and change the easing on line 11 from Regular to say, Strong - when I test the movie, the buttons no longer fade in. Do you know why that is?

    Thanks,
    Marc

  10. #10
    Senior Member Robb@exo's Avatar
    Join Date
    Jun 2003
    Location
    Canada
    Posts
    1,540
    Sorry, my bad... forgot to remove some useless code on my part. That being line 6, 28 - 31, 34 & 36. That leaves lines 12 & 43. Line 12 is just a tween event listener, listening for the completion of the tween, at which point will trigger a function, the button fade ins. Line 43 is just calling a function "checkPosition" to run. That function checks the x position of the "highlifeSlide_mc". I tested the tween "Strong" effect as well and the buttons did not show up either. That's really odd. I'll have a look at more closely when I get a bit more time.
    Wile E. Coyote - "Clear as mud?"

  11. #11
    Junior Member
    Join Date
    Aug 2009
    Posts
    14
    Thanks very much Robb@exo, it's much appreciated.

    Yeah, can't figure out why those buttons are disappearing - weird.

  12. #12
    Junior Member
    Join Date
    Aug 2009
    Posts
    14
    OK, one last question and I'm out of your hair...

    How would I stop the slide from disappearing off either side of the stage? ie. stop it from going either back past the opening image, or forward past the last one?
    And... what is meant by your code: "checkPosition(null);"

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