Professional Web Applications Themes

how to make the last char of a string blink/flash? - Macromedia Director Basics

I'm working on a project which allows the user to click buttons and the corresponding number is displayed (just like a calculator). Every number they enter MUST flash until they enter a new one and the only way I can do this is to use the a loop which overwrite the last char with a " ". But, doing it this way causes slight delays which is unacceptable. Is there any other way I can achieve this flashing/blinking result without using loops or delays? btw, I'm using fields to display the numbers if that's any help. :) Thanks in advance ...

  1. #1

    Default how to make the last char of a string blink/flash?

    I'm working on a project which allows the user to click buttons and the corresponding number is displayed (just like a calculator). Every number they enter MUST flash until they enter a new one and the only way I can do this is to use the a loop which overwrite the last char with a " ". But, doing it this way causes slight delays which is unacceptable.
    Is there any other way I can achieve this flashing/blinking result without using loops or delays?

    btw, I'm using fields to display the numbers if that's any help. :)

    Thanks in advance for any help or guidance.



    Gaz Walker webforumsuser@macromedia.com Guest

  2. #2

    Default Re: how to make the last char of a string blink/flash?

    Oh, sorry. First time posting on here :)

    Unfortunately, the code is at work so I'll post it tomorrow.
    Thx for your reply.



    Gaz Walker webforumsuser@macromedia.com Guest

  3. #3

    Default Re: how to make the last char of a string blink/flash?

    > How did you know I had problems with the justification moving when
    > entering a space? lol
    I only knew you might be having problems with the justification because I've run into it many times before. It's really bad when you have a bunch of text and decide that a good rollover would be making part of the text bold. Then you realize that bold text is larger than normal text, and can cause it to jump around and wrap differently.

    > I'll stick this in my code this afternoon and see if it works, fingers
    > crossed. I'll be sure to let you know either way. Thanks again for
    > your wisdon :)
    I'll look forward to hearing how it worked. And if it's giving you problems, or you would like some help with changing the character color I can give you a hand with that too.

    Nathan
    Nathan Friesen Guest

  4. #4

    Default Re: how to make the last char of a string blink/flash?

    I think I've found a better way to do it, without two text fields.

    I assume you have your text field ink set to matte or transparent background, or something similar so you can see your bitmap through the background. If your text is black, you can set the sprite ink to transparent and nothing should show through the text still (if the text isn't black this will still work, but you may be able to see the background through it). Now if you change the last character to white (or whatever the background color of the text is) it will become transparent and disappear. And if you change it back to black, it will appear again, all without making your text jump.

    Let me know how this sounds, and if it works. Or if you would like any help with implementing it.

    Thanks

    Nathan
    Nathan Friesen Guest

  5. #5

    Default Re: how to make the last char of a string blink/flash?

    Thanks for your help Nathan. I decided to go ahead with the ink colour idea. I didn't realise you could use "RGB" values, but when I found it out, I got the RGB figures of my bitmap background using photoshop and assigned this value to my text so it "disappears". Then just made it green again so it is visible.

    This has worked a treat and is alot less complicated. I really appreciate your input for this post and hopefully I can offer some advice to others once I complete my 5-day lingo course :)

    Well, at 500 quid per day, I'd better learn SOMETHING! lol

    Thanks again.


    Gaz Walker webforumsuser@macromedia.com Guest

Similar Threads

  1. #39533 [NEW]: ord() cast with (unsigned char), chr() with (signed char)
    By fred at cashette dot com in forum PHP Bugs
    Replies: 0
    Last Post: November 16th, 02:54 PM
  2. Replies: 7
    Last Post: January 8th, 05:19 PM
  3. count char in string
    By W. Paulisse in forum PHP Programming
    Replies: 3
    Last Post: September 24th, 08:12 PM
  4. String formatting function - First char Upper, rest lower
    By James Johnson in forum PHP Development
    Replies: 1
    Last Post: September 6th, 09:48 PM
  5. Best way to process a string 1 char at a time
    By Joshua Ghiloni in forum PHP Development
    Replies: 0
    Last Post: August 20th, 08:21 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139