A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Help with OnClipEvent r.e. Fonts & Scroller

  1. #1
    Senior Member
    Join Date
    Oct 2001
    Posts
    101

    Help with OnClipEvent r.e. Fonts & Scroller

    Please refer to:

    www.jmrcreative.com/wmc/construction.html


    At issue:

    A) I want to be able to hover over the up/down buttons and scroll instead of clicking to scroll

    B) I want to use a pixel font (i.e., kroeger) instead of arial


    Present effects are achieved via this script:





    onClipEvent (load){

    daTextBox = "<FONT FACE=\"Arial\" SIZE=\"11\" COLOR=\"#FFFFFF\">TEXT GOES HERE</FONT></P>";
    scrolling = 0;
    frameCounter = 1;
    speedFactor = 3;

    }

    onClipEvent (enterFrame){

    if( frameCounter % speedFactor == 0){

    if( scrolling == "up" && daTextBox.scroll > 1){

    daTextBox.scroll--;

    }


    else if( scrolling == "down" && daTextBox.scroll < daTextBox.maxscroll){

    daTextBox.scroll++;

    }

    frameCounter = 0;
    }

    frameCounter++;
    }



    Much thanks!

    Zievfret
    [email protected]

  2. #2
    Random without a cause Bartsje's Avatar
    Join Date
    Apr 2003
    Location
    Lalaland
    Posts
    193
    I suppose you are setting the value of "scrolling" from the buttons?
    In that case, in stead of using
    code:
    on(release)

    the use of
    code:
    on(rollOver)

    should do the trick.

    If I thought wrong, let me know

    As to that font: been wondering about that myself

    Greetz!

    Bart

  3. #3
    Random without a cause Bartsje's Avatar
    Join Date
    Apr 2003
    Location
    Lalaland
    Posts
    193
    Btw: kewl graphics mate

    Greetz

  4. #4
    Senior Member
    Join Date
    Oct 2001
    Posts
    101
    thanks bartsje, i'll try that change in the script (it was given to me by someone else, so I'm not intimately familiar with it)

    As to the font, I know how to use pixel fonts "normally", but how to use it within this structure is another story.

    Thanks!

  5. #5
    Senior Member
    Join Date
    Oct 2001
    Posts
    101
    then again bartsje, i don't see how your suggestion works

    can you enter it into my script above and show me where that's supposed to go?

    muchh thanks!

  6. #6
    Senior Member
    Join Date
    Oct 2001
    Posts
    101
    okay, i found it.

    BUT (heh heh)

    here's the script on the (down) button (with your suggested change):




    on( rollover ){

    scrolling = "down";
    frameCounter = speedFactor;

    }
    on( release, releaseOutside ){

    scrolling = 0;

    }


    That works fine, except it doesn't stop scrolling. When I pull the cursor away from the mouse, it keeps scrolling anyway.

    any ideas???

  7. #7
    Random without a cause Bartsje's Avatar
    Join Date
    Apr 2003
    Location
    Lalaland
    Posts
    193
    Yup: replacing "(release, releaseOutside)" by (rollOut) should do the trick. Sorry mate, should have mentioned that

    Greetz
    Last edited by Bartsje; 07-29-2003 at 08:16 PM.

  8. #8
    Senior Member
    Join Date
    Oct 2001
    Posts
    101
    And indeed it did.

    Thanks!

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