Flash Text Arcing

  • sreejithks
  • Newbie
  • Newbie
  • User avatar
  • Posts: 5
  • Loc: India

Post 3+ Months Ago

i want to know how to make a dynamic text in arc shape ..
and should have to change the font and size on selecting the values from a combobox


  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

now where do you think you are? in photoshop? :P
if you want in arc shape then you'd probably have to do it by actionscript.
Create textbox for each letter, and place it in the form of a arc.
The size and font are properties of TextFormat.
read the help for that
  • sreejithks
  • Newbie
  • Newbie
  • User avatar
  • Posts: 5
  • Loc: India

Post 3+ Months Ago

it arcing should be dyanmic ..
number of letters will be dynamic ..
it will some time 1---20 or 30 ......blb bla bla ....

ven we type a text in input field ..i vant to display it in movie.and changing the arc value from a combobox ..the text should be arced.if the value is "zero" the text will be straight line..
  • krismeister
  • Graduate
  • Graduate
  • krismeister
  • Posts: 202

Post 3+ Months Ago

The simplest method is to make a make a movieClip of a textbox, give the textbox a variable like tCharacter.

Export the movie clip for use in actionscript give it a name say mcSingleCharacter

Split the user entered characters into an array.

Loop through the array with these steps:

Code: [ Select ]
var sCurrentCharacter:String = "a"; //this will be the current character

this.attachMovie(
  'mcSingleCharacter', 'mCharacter1', this.getNextHighestDepth(), {
    _height:80,
    _width:90,
    _y:200,
    _x:90,
    tCharacter: sCurrentCharacter
    }
)
  1. var sCurrentCharacter:String = "a"; //this will be the current character
  2. this.attachMovie(
  3.   'mcSingleCharacter', 'mCharacter1', this.getNextHighestDepth(), {
  4.     _height:80,
  5.     _width:90,
  6.     _y:200,
  7.     _x:90,
  8.     tCharacter: sCurrentCharacter
  9.     }
  10. )


As you go through each character you will have to change the width, height, x, and y values of the init object. Also the second parameter (character1) has to be unique for each instance.
  • sreejithks
  • Newbie
  • Newbie
  • User avatar
  • Posts: 5
  • Loc: India

Post 3+ Months Ago

please chk this url
http://www.customizedgirl.com.

i need this type of arc.
  • krismeister
  • Graduate
  • Graduate
  • krismeister
  • Posts: 202

Post 3+ Months Ago

i found this while running a search, it's amazing, but no source code:
http://www.teknoel.com/show/?file=/theo ... cs/arc.htm

anyway you'll probably have to brush up on your Triganometery. I didn't find a simple way to do. You'll have to use a method simliar to above but with alot more math.
http://www.actionscript.org/resources/a ... Page1.html
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

it`s easy ... you just need to know the formula of a point from the circle.
that would be:
Xpoint = Xcenter + r * cos(alpha);
Ypoint = Ycenter + r * sin(alpha);

where Xcenter, Ycenter are the coordinates of the center of the circle.
r = the radius of the circle.
alpha = the degree between the horizontal line that goes through the center of the circle and the line that unites the center of the circle with the wanted point from the circle.

in this case, alpha can start from 0 and will be increased by a fixed amount for each letter. Also, each letter of the text mus be a stand alone movie clip so that you can rotate it.
  • krismeister
  • Graduate
  • Graduate
  • krismeister
  • Posts: 202

Post 3+ Months Ago

I think you'll also have to measure the distance between 2 points (your beginning and end) around an arc.

Then divide by the number of characters.

Then again the distance between 2 points but given the first point and a distance to travel along the arc for the second the location of the 2nd point.
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

it's not about the distance between 2 points, it's only about the alpha angle, which you divide by the number of characters. So for a arc that corresponds to 90 degrees, you divide 90 by the number of characters and that will be the amount that alpha with get increased for each letter.
Also he needs to rotate the letters according to the alpha ... didn't think yet of the formula but it shouldn't be too complicated.
  • krismeister
  • Graduate
  • Graduate
  • krismeister
  • Posts: 202

Post 3+ Months Ago

wow thats great, just divide the angle, don't worry about distances around the arc. genius ;)

Post Information

  • Total Posts in this topic: 10 posts
  • Users browsing this forum: No registered users and 6 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.