  | |  | RE: (Ron help me?) Flash text | RE: (Ron help me?) Flash text 2003-12-17 - By L.R. Valstar
Back hmm... I did this just now:
myNam = 'txtIntro'+i; _root.createTextField(myNam, 3, 100,100, 200,0); oLtxt = _root[myNam]; oLtxt.autoSize = true; oLtxt.wordWrap = true; oLtxt.selectable = false; oLtxt.text = 'asdfasdfasdf';
which works fine... I put the code in the first frame and put a stop in the second (but I usually code almost everything in external scripts)
I mostly do this as well... (instead of oLtxt.text = '';) //oLtxt.html = true; //oLtxt.htmlText = sText; to ensure certain characters show up in the text like ?and ' ... (plus it enables you to use certain html tags which you could combine with css...)
these lines are for formatting the font //oLtxt.embedFonts = true; //oLtxt.setTextFormat(new TextFormat('Font 1')); but you'll need to embed the font CTRL-L for library press the little button on the top/right of the library bar then choose new font after you've inserted it you'll have to set the 'linkage' for the font to make it accesible in actionscript to do so rightclick the newly created font from the library and press 'linkage'
If you still can't get it to work then it might be a different version of flash?... I use flash 7 but I went from flash 3 to flash 7 (and did some minor actionscripting in 5 a year ago) so I'm not really up to date about what is backward compatible in actionscript and what not....
hope this helps better...
Ron
> -- --Oorspronkelijk bericht-- -- > Van: dirgames-l-bounces@(protected) > [mailto:dirgames-l-bounces@(protected)] Namens Director > Verzonden: maandag 15 december 2003 20:28 > Aan: 'Director - Shockwave - and Flash Game Production' > Onderwerp: [dirGames-L] RE: (Ron help me?) Flash text > > > Hi Ron, > Excuse me for being such a dumbass, but help me out a bit > with this one... Where do I put this code? > > I tried oLtxt.text = "this is my first test field object > text"; to see some text, but nothing happens (it's on a frame > script).. > > Thanks, > > Ben > > -- --Oorspronkelijk bericht-- -- > Van: dirgames-l-bounces@(protected) > [mailto:dirgames-l-bounces@(protected)] Namens L.R. Valstar > Verzonden: maandag 15 december 2003 10:33 > Aan: 'Director - Shockwave - and Flash Game Production' > Onderwerp: RE: [dirGames-L] Flash text > > myNam = 'txtIntro'+i; > _root.createTextField(myNam, 3, 100,100, 200,0); > oLtxt = _root[myNam]; > oLtxt.autoSize = true; > oLtxt.wordWrap = true; > oLtxt.selectable = false; > oLtxt.html = true; > oLtxt.htmlText = sText; > oLtxt.embedFonts = true; > oLtxt.setTextFormat(new TextFormat('Font 1')); > > this creates a textfield in layer 3 of the _root at position > 100,100 with size 200x0 since autoSize is used the height of > the textfield will automaticly go with the amount of text you > put in... _root can also be replaced by a movieClip instance > (especially when you want it to be a button)... > > > ...Ron > www.sjeiti.com > > > > > -- --Oorspronkelijk bericht-- -- > > Van: dirgames-l-bounces@(protected) > > [mailto:dirgames-l-bounces@(protected)] Namens Director > > Verzonden: maandag 15 december 2003 9:06 > > Aan: dirgames-l@(protected) > > Onderwerp: [dirGames-L] Flash text > > > > > > Hi all, > > I hope I'm in the right group for this one, but I'll give a try. > > > > I want to show some text in directory, using a flash movie. I > > manage to send a string to the variable which I defined in > > flash, but I would like the text field to appear > > autoresizable, so that it matches the content size. I found > > some flash action script, but haven't got the foggiest idea > > on how to implement this code into the flash object. > > > > Name.autosize = true; > > > > I don't know where I have to specify name (is it an > > instance?) and where and how to call this comment! > > > > Can anybody help? Please? > > > > Thanks! > > Benjamin > > > > __ ____ ____ ____ ____ ____ ____ ____ ____ ____ > > dirGames-L mailing list - dirGames-L@(protected) > > http://nuttybar.drama.uga.edu/mailman/listinfo> /dirgames-l > > > > __ ____ ____ ____ ____ ____ ____ ____ ____ ____ > dirGames-L mailing list - dirGames-L@(protected) > http://nuttybar.drama.uga.edu/mailman/listinfo/dirgames-l > > __ ____ ____ ____ ____ ____ ____ ____ ____ ____ > dirGames-L mailing list - dirGames-L@(protected) > http://nuttybar.drama.uga.edu/mailman/listinfo/dirgames-l >
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ dirGames-L mailing list - dirGames-L@(protected) http://nuttybar.drama.uga.edu/mailman/listinfo/dirgames-l
Earn $52 per hosting referral at Lunarpages.
|
|
 |