Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   ActionScript 1.0/2.0 (http://www.flasher.ru/forum/forumdisplay.php?f=93)
-   -   как в dynamic text передать значение из txt файла? (http://www.flasher.ru/forum/showthread.php?t=96404)

Sylkoga 30.05.2007 00:49

как в dynamic text передать значение из txt файла?
 
такая проблема есть тхт файл :

Цитата:

x1=because it is the beauty
because it is the blessedness
a cup of goodfeeling.a goblet of the soul substance
i like the golden whirlwinds in my face when being with the sun. to challenge the wind for a run /to drink tea/
to laugh.with mouth.wide open.in the rain.to yearn for.to look for.into myself and in the bees.to understand.to find/not find

to see.is it nature? /that is mine?/
the good old riddle
a look through the world`s flapping skirt.in an easy step.these are my binoculars.magnifying glass.
***
my love and my fear – the photo

that`s me&
но когда я вставляю его он мне между стро4ками которие в .тхт делает огромние отступи, а если строка не влазит в поле ДТ то там отступ нормалйний! по4ему такое проишодит и как ре6итй ету проблему?

file : http://sylk.times.lv/text.rar

†‡Paladin‡† 30.05.2007 01:30

loadVars Так-же пользуй поиск.

etc 30.05.2007 01:59

Sylkoga, бегом на http://translit.ru и редактировать пост.

this.create 30.05.2007 02:01

Код:

var mn:MovieClip = this;
var loader:LoadVars = new LoadVars();
loader.load('tx.txt');
//
loader.onLoad = function(success:Boolean):Void  {
    if (success) {
        var tf:TextField = mn.createTextField('tf', mn.getNextHighestDepth(), 0, 0, 600, 100);
        tf.html=true
        tf.multiline=true
        tf.wordWrap=true
        tf.htmlText = this['tx'];
    }
};

файл tx.txt - текст в одну строку, без переносов.
Код:

tx=because it is the beauty<br>because it is the blessedness<br>a cup of goodfeeling.a

goblet of the soul substance<br>i like the golden whirlwinds in my face when being with

the sun. to challenge the wind for a run /to drink tea/<br>to laugh.with mouth.wide

open.in the rain.to yearn for.to look for.into myself and in the bees.to understand.to

find/not find


Sylkoga 30.05.2007 04:19

странно но он не видит <br>. написал так :

Код:

text1.createTextField("my_txt", this.getNextHighestDepth(), 0, 0, 400, 400);
text1.my_txt.html = true;
text1.my_txt.htmlText = "ja <b>ti </b>ona <BR>ono";

и он "ti" делает bold, а переходить не хочет! может тега <br> уже нету?

etc 30.05.2007 04:35

Sylkoga получает второй плюс за транслит. Если не оформит код в пятом посте, то получит бан. Время пошло.

screamge 30.05.2007 07:37

Код:

multiline = true

Sylkoga 30.05.2007 17:16

ничего не получается! он не переходит


Код:

text1.createTextField("my_txt", this.getNextHighestDepth(), 0, 0, 400, 400);
text1.my_txt.html = true;
text1.multiline = true;
text1.my_txt.htmlText = "qwer<br><b>asdf<br>qwerty<b>";


this.create 30.05.2007 17:45

Цитата:

Сообщение от Sylkoga
ничего не получается! он не переходит


Код:

text1.createTextField("my_txt", this.getNextHighestDepth(), 0, 0, 400, 400);
text1.my_txt.html = true;
text1.multiline = true;
text1.my_txt.htmlText = "qwer<br><b>asdf<br>qwerty<b>";


Код:

text1.createTextField("my_txt", this.getNextHighestDepth(), 0, 0, 400, 400);
text1.my_txt.html = true;
text1.my_txt.multiline = true;
text1.my_txt.htmlText = "qwer<br><b>asdf<br>qwerty<b>";



Часовой пояс GMT +4, время: 21:25.

Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.