PDA

View Full Version : moving a text field



smccallig
April 29th, 2002, 08:25 AM
i'm creating a flash news scroller that accesses an external file to read news headlines.
I've created the main system which works roughly as follows.
The main movie clip reads the external headlines & related article texts from a file (using loadvariables) and puts them into an array.
I loop over the array creating several new instances of a movie clip (lets call it "news_piece"), placing one above the other. "News_piece" contains 2 text fields called "Headline" and "Article", so i change the contents of these for each instance of the movie, retrieving the contents from the array.
The outer movie then scrolls the lot.

It works pretty well. (Pat on the back for me, I haven't worked with flash much).

Now comes the difficult bit...stay with me... sometimes the headlines can be 1, 2 or 3 lines in length. So, if I want the article text to start directly below the headline, I guess I'll have to move the lower Text field ("Article") a bit higher in that particular instance of the "News_piece" movie.

So, to summarize, I wanna move the co-ordinates of a text field in an instance of a movie clip.

Anyone?

(Or... better yet... if anyone is still reading this... any other better way to do this whole thing?)

upuaut8
April 30th, 2002, 11:03 PM
wow.. that's tough.. and interesting.

I guess that the best way would be to place the text field inside a movie clip, give the movie clip an instance name, and then set the _y location of it dependent upon the title length. It definitely would take some working to get it right though.