A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Difficulty with onClipFrame..Help Plz!!!

  1. #1
    Member
    Join Date
    Mar 2006
    Posts
    47

    Difficulty with onClipFrame..Help Plz!!!

    Hi all!

    I'm creating a website for myself with a image gallery. The gallery consists of a row of thumbnails at the top, which I want to be able to scroll smoothly horizontally.

    When the user clicks on a thumbnail, it displays the image for the relative thumbnail.

    The click and display image works perfectly, but I am having trouble getting the horizontal scrolling to work. I've got the following code:

    onClipEvent(onEnterFrame){
    mcThumbnails._x += value;
    (I've tried _root.mcPortfolio.mcThumbnails._x amongst some other attempts)
    }

    ...but no matter where I put it, it doesn't affect the thumbnail movieclips position at all. I've tried accessing the mc via the _root variable, but to no avail. It appears as if onClipEvent is not executing at all.

    The basic hierarchy looks as follows:
    _root
    ..\\mcPortfolio - Movie containing thumbnails and images.
    ..\\mcPortfolio\\mcThumnails - Movie with thumbnails (which should scroll left/right)

    Can someone please help?!?! I've been struggling for 3 hours today to get this right, but I just can't.

    Thanks for your interest in my problem!

  2. #2
    Member
    Join Date
    Mar 2006
    Posts
    47
    A'ight!!! Not to worry dudes!!!

    I struck a Bingo, here's what I did.

    Select the parent movieclip, right click and select properties. In the behaviour tab, select Actions.

    Add an Actionscript with the code I mentioned above, and hey presto. The movement is a bit jerky though, does anyone know how to smooth that out?

  3. #3
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    onClipEvent(enterFrame) is the proper syntax I believe. I'm surpised it would work the way you have it.


    As far as making is smoother, depends on how you are doing things. Source would help.

  4. #4
    Member
    Join Date
    Mar 2006
    Posts
    47
    Sorry man, I mistyped the onClipEvent(onEnterFrame) bit. I think it's because I've had a long day working on my website, my eyes are tired and I'm low on consentration juice.

    All I needed to fix my problem was to get my eyes away from the screen for a while.

    Thanks guys!

  5. #5
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    good news then, let us know when we can see it....

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