Solved

ActionScript text Animation

Posted on 2000-03-01
14
792 Views
Last Modified: 2012-05-04
www.Lunarmedia.com/home.html is a site that boasts that they have figured out how to use actionscript to animate long strings of text and by the looks of the site they must have.  Doing it character by character would be excruciatingly slow.  I'm relatively new to flash and don't know whether or not this is a well kept secret, but I can't find references to this "painless actionscript character animation" anywhere.  Perhaps someone knows of some tutorial links??  I have sent an e-mail to the creator of the Lunarmedia site and am hoping for a response from him as well.  So the question is, how do you animate long strings of characters using actionscript??
0
Comment
Question by:smcdonald
  • 8
  • 5
14 Comments
 
LVL 3

Expert Comment

by:SuperMario
ID: 2575114
That looks like a simple loop, which just modifies the _xscale, _yscale, _alpha and other properties of a text clip.

-Dan
0
 
LVL 2

Expert Comment

by:coopa
ID: 2616393
> and don't know whether or not this is a well kept secret
I believe it is.

I've been trying to achieve this for a while!

My thoughts:
This would be very difficult to automate as character width is not consistent.
I don't believe there is a way of extracting individual characters from a text variable.

They would have a animation that changed the alpha and scale/rotation of a text variable

Otherwise it goes a litle like this.

IF not End of text file
   IF not end of line
      Position Movie Clip x points to the right of that last letter.
      Read individual character to a variable in the movie clip
   Else
      Position Movie Clip (on begining of next line)
      Read individual character to a variable in the movie clip
   EndIf
ELSE
   Stop
EndIf

This would be an action on the 2 frame of a movie clip that is looping, this way the characters would appear one by one.

To get the different effects they'd just use a different movie for the character.

IF IT'S THE LAST THING I DO... I WILL ACHIEVE THIS !!!
0
 
LVL 7

Expert Comment

by:ssdesign
ID: 2729446
I know of the script and not just one but atleast two to three of them with different types of animations.
0
 
LVL 2

Expert Comment

by:coopa
ID: 2729663
Well tell us then !

8o)
0
 
LVL 7

Expert Comment

by:ssdesign
ID: 2729759
I can give you one for free and rest two can be shared for a charge.
If you want to look at one of the samples then go to my site at http://ssdesign.hypermart.net

The one that i intend to share for free will be posted on this board later in the day.
0
 
LVL 7

Accepted Solution

by:
ssdesign earned 100 total points
ID: 2730238
Ok so here it is......... something that all of you have been waiting for.

One of the script i am sharing with you for FREE is in a zip format and it's a excellent text effect using action script.

To get this effect go to the url mentioned below and download the zip file that contains the .fla, .swf and .html files for the above mentiond.

Hope you find it useful.

I have many such effects and if you like the above i can share the other for a price of course.
0
 
LVL 7

Expert Comment

by:ssdesign
ID: 2730250
sorry i forgot to write the URL it's http://ssdesign.hypermart.net/text1.zip
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 2

Expert Comment

by:coopa
ID: 2730349
I'd forgotten how much I hated reading other people's code.

Still... Nice effect, I like it.
0
 
LVL 2

Expert Comment

by:coopa
ID: 2730630
Okay I don't know about smcdonald but I think it's impossible to work this out unless you give more details.

For example Variable descriptions.
string_leng
k_main
l_main
ops
m_main
alone

And some pseudo code would be useful.
If you are in this for the points then i can post some.

Oh and one more thing.... Why does the movie contain the flashplanet logo ?
hmmm ?

Oh now I see....  You got this off FlashPlanet.com... from their open source section.

Does that mean you don't know how/why it works ?

Bummer !
0
 
LVL 2

Expert Comment

by:coopa
ID: 2734049

I gave up on that example and pretty much worked this out on my own...

I used my own pseudo code (above near top) to produce a small movie with an animated sentence... based on the 'Duplicate movie clip' function.

I found that you can read a variable 1 character at a time using:
Substring ( textline, Lnum, 1 )

Where Lnum is the position of the character in the sentence.

So with a sentence like 'hello world'
Substring ( textline, 2, 1 )
would return 'e'

Easy huh !  You just loop through the sentence incrementing Lnum.

In my original post i put:
> This would be very difficult to automate as character width is not consistent.

This is still a problem... the only way around this as far as i can see is to set some rules;

like if the character is 'l or i or j or ; or , or . '
then only move right slightly,
if it's a 'o or h or e or t etc.'
then move on slightly more and if
it's a 'W or M etc' then move on the most.

This is a pain in the arse and if any one as a better solution i'm listening !!

I will post my example with full pseudo code soon.

Rich.
0
 
LVL 2

Expert Comment

by:coopa
ID: 2734159
LETTER WIDTH CODE:
Found this in that example... It's for working out text widths...

      If ((cr eq "i") or (cr eq "j") or (cr eq "l") or (cr eq "I") or (cr eq ".") or (cr eq",") or (cr eq ";") or (cr eq":") or (cr eq " "))
            Set Variable: "siz" = "54"
      Else If ((cr eq "f") or (cr eq "r") or (cr eq "t") or (cr eq "!"))
            Set Variable: "siz" = "61"
      Else If ((cr eq "s") or (cr eq "z") or (cr eq "?") or (cr eq "c"))
            Set Variable: "siz" = "75"
      Else If ((cr eq "B") or (cr  eq "P") or (cr  eq "R") or (cr  eq "S") )
            Set Variable: "siz" = "104"
      Else If ((cr  eq "H") or (cr  eq "C") or (cr  eq "K") or (cr  eq "V") or (cr  eq "Y"))
            Set Variable: "siz" = "115"
      Else If ((cr eq "A") or (cr  eq "D") or (cr  eq "G") or (cr  eq "N") or (cr  eq "O") or (cr  eq "Q") or (cr eq "U") or (cr  eq "X")or (cr  eq "ø")  or (cr  eq "ì")  or (cr  eq "û")  or (cr  eq "þ")  or (cr  eq "ô")  or (cr  eq "æ")  or (cr  eq "ù") )
            Set Variable: "size" = "130"
      Else If ((cr  eq "w") or (cr  eq "m")or (cr  eq "Ô")  or (cr  eq "Ö")  or (cr  eq "Æ")  or (cr  eq "Ý")  or (cr  eq "Ø")  or (cr  eq "Ì")  or (cr  eq "ß")  or (cr  eq "Ä")  or (cr  eq "Þ")  or (cr  eq "Ó")    )
            Set Variable: "size" = "150"
      Else If ((cr  eq "M") or (cr  eq "W"))
            Set Variable: "siz" = "170"
      Else
            Set Variable: "siz" = "90"
      End If
0
 
LVL 2

Expert Comment

by:coopa
ID: 2734498
here is the result.

www.coopa.demon.co.uk/ee/funky.html

I'm pretty prowd of this !!

Rich

P.S.  Obviously this is just a test so the interface is crap.
0
 
LVL 7

Expert Comment

by:ssdesign
ID: 2734710
coopa that script basically relies on the one i had posted. So do you think i should be getting some points at this stage?........ :)
0
 
LVL 2

Expert Comment

by:coopa
ID: 2734799
You mean for the script you downloaded from FlashPlanet.com ?  You already got the points by the look of it...  

I'm not in this for the points.  I was genuinely interested in getting that effect to work.

The only bit I used was the code to space the letters correctly, the rest is my own work.

Congrats.

Rich.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SCCM 2012 - Deploy Flash 16 6,895
YouTube Link 10 353
Action Script commands 5 234
camtasia alternative that can record 3 hours video plus audio 24 104
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now