15 Replies Latest reply on Dec 13, 2006 5:10 AM by Sketchsta

    Text Effect

    Sketchsta Level 1
      I was wondering if anyone could help me with code for this blur effect i made HERE.

      This is one of 2 i made, but it was all made in the timeline, with no action script, appart from afew stop() actions.
      I would like to learn how to make this effect entirely with Action Script, and for it to be a function. So that i can call it for individual letters.

      I realise this might be alot to ask for, so any help would be much appreciated.

      Thanx in advance.
        • 1. Re: Text Effect
          Sketchsta Level 1
          Is it even possible to add filters with Action Script?
          • 2. Re: Text Effect
            Peter Lorent Level 2
            Yes, you can. And you can animate filters with ActionScript. The effect you are trying to build with AS is a tricky one. If I have the time today, I'll try to make an example but I'm swamped with work so I can't promise anything.
            • 3. Re: Text Effect
              Sketchsta Level 1
              Hey LuigiL, thanx for the reply..

              just lead me in the right direction, if you are busy, and i'll try it from there.

              I'm new to Action Script, so I don't even know where to begin.
              • 4. Text Effect
                Sketchsta Level 1
                don't worry about this message.. i accidentally posted 2 times, and im trying to delete this... but i dont know how to. =)
                • 5. Re: Text Effect
                  Peter Lorent Level 2
                  Attached example code. This doesn't replicate the effect precisely but you can experiment with the code and different filters, maybe even a combination with the Matrix Class... well you can put as much hours in as you have available. Just paste the code in a new fla and test.

                  • 6. Re: Text Effect
                    Sketchsta Level 1
                    Thats REALLLY good LuigiL,
                    Thanx alot for the code, this should get me going..

                    one thing tho, i remember when i was working with Drawing API, any movieclip i made on "top" of another, i couldnt see the bottom one anymore...
                    even if the top movie clip was smaller than the bottom clip..
                    i used
                    this.getNextHighestDepth()

                    i might have been doing something wrong.. but my question is, HOW would i type this code to " OVERLAY " the same code only with X-BLUR ??

                    anyway.. i'm going to study your code now.. maybe i will get lucky and figure it out.. =)

                    Thanx again!
                    • 7. Re: Text Effect
                      Peter Lorent Level 2
                      Well, I'm not using movieclips in this case but text fields. You can however put the text fields in a movieclip and then duplicate the movieclip. Or, create a duplicate text field in the same function. Or use a duplicate of the createCharacter() function... there are several ways (as always). You'll figure it out, it's not that hard to understand.
                      • 8. Re: Text Effect
                        Sketchsta Level 1
                        Thanx for the confidence you have in me =) I hope you are right, and i'll figure this out.

                        I'll let you know how it goes, when I get more time to mess around with it.
                        Like you, I'm quite busy at the moment. But alot of the time i stop work and come here to read the forums, and learn all that i can. =)

                        Thanx for the help.
                        and good luck with your work.
                        • 9. Re: Text Effect
                          Sketchsta Level 1
                          ok, so i went through the whole code, and I undrestand it ( thanx to your //comments) really helpful. =)

                          I see what you mean by using text fields, instead of movie clips.. I have one question tho,
                          Is there a way, instead of

                          var textWidth:Number=20;
                          var textHeight:Number=50;

                          to have something like, var textWidth:Number = getWidth(); ??

                          i havent used the getWidth before, so i dont know how,where or IF it can be used in this situation.
                          • 10. Re: Text Effect
                            Peter Lorent Level 2
                            Ah, working on the spacing. Well, the TextField Class doesn't support getWidth(). And you can get the width only AFTER the text is assigned. But I added more control over the spacing and I've dupped the effect using a duplicate of the character.

                            • 11. Re: Text Effect
                              Sketchsta Level 1
                              Thats PERFECT...
                              i dont quite understand how you fixed the spacing, I have to go through the code afew more times, to maybe understand it..

                              this is so easy to use too.. I LOVE IT..
                              I REALLY have to learn how to use Arrays, they can obviously do such good things, and are easy to update.

                              Well Thanx again for all your help, I hope it wasn't too much trouble, and I hope I didn't keep you from your work either. =)
                              Much Appreciated!
                              • 12. Re: Text Effect
                                Peter Lorent Level 2
                                That's quite simple. It's in this snippet:
                                if(s==" "){
                                spacing+=spacer;
                                } else {
                                spacing+=(letter_txt._width+leading);
                                }

                                After the text is assigned I get the width of the text and add that width to the timeline var spacing (that defines the _x of the next text field). To have more control over the spacing I added the timeline var leading so you can add extra space between the characters. And the timeline var spacer just gives you control over how much space you want between individual words.

                                • 13. Re: Text Effect
                                  Sketchsta Level 1
                                  ohh ok, i get it now.. i'm sooo jealous, this is kids stuff to you.. but to me, even the spacing if/else statement sounds " smart "

                                  I have a LOOOONG way to go.. but the forum here is helping me get there alot faster,
                                  especially with people like you, kglad, and David Stiller, you guys are god's gift to Flash users =)
                                  soo smart, and explain things soo well.. a perfect combination i think =)
                                  • 14. Re: Text Effect
                                    Peter Lorent Level 2
                                    >>especially with people like you, kglad, and David Stiller, you guys are god's gift to Flash users =)

                                    I fully agree
                                    • 15. Re: Text Effect
                                      Sketchsta Level 1
                                      lol, the king pins of Adobe Forums!!! =)