Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




[F8] Trying To Read A Text In Flash



hi i'm trying to read a text file but it wont display in my swf
the code i'm using is


Code:
myLoadVar=new LoadVars();
myLoadVar.load("comes1.txt");
myLoadVar.onLoad = function(success) {
if (!success) {
trace("Text didn't load");
} else {
trace("Text loaded");
dyn_txt_0 = myLoadVar.vaRiable;
}
};
thanks



FlashKit > Flash Help > Flash Newbies
Posted on: 06-11-2007, 10:01 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

How To Make Flash Movie Read Text From A HTML Text Box In Current Page
I want to have a flash movie on an html page. I want to read the text from a text box in the parent html page.

I presume action scripting is the way to do it.

I am using flash 5

Please help.

Read XML Into Flash Text Field
Hello
I have a tutorial given by my teacher that uploads XML content (text) into a combo box
exemple
in XML
<image name="auto"/>
<image name="fridge"/>
etc....
I want the XML content to be loaded in a text field rather than in combo box, and I want each content of XML to be a link in my text field (do i have to do many text fields, or can I just do one?)
exemple :
I want in flash to link the word auto to a frame called auto
and link fridge to another frame

and I want to be able to control the font of the field
how do I do all that
It is quite complicated for me, but I really want to do it
thks a lot

Can Flash Read The Text Length Of XML?
I have been going through Senocular's excellent XML tuts and am trying to build a function of my own.

In his 'squirrel menu' he uses a variable called 'item_spacing' to define the gap between menu items. When new menu items are generated, this variable defines the spacing.

My question: Can Flash read the text length of the node when the XML has been parsed?

so instead of the variable just being

var item_spacing = 20;

it would be

var item_spacing = items[i].childNodes[1].text.length;

or something similar to above as I am a XML noobie!

What I want to achieve is a menu which can tell the length of the previous menu item so that when there is a new entry, it can position itself automatically.

Thanks for your help, Billy

Formatting Text Read Into Flash By XML
Alrite guys.

I've got a general question about reading in XML. Say i read in a couple of paragraphs of text from XML into flash.... I want to format that text, for example:

Bolden headings
use italics
create paragraph breaks
change font colour

Now how would I go about doing that? if i start adding tags like <b></b> into my xml file that will cause the xml file to keel over because flash parses the<b></b> tag to be a content tag.....

So how does one format text read into flash via xml?

Any suggestions would be most appreciated

Read Text Files Into Flash
Is it possible to load text files into flash using a component? Making it easier to edit the text files rather than having to edit the fla.

I have been trying this with the ScrollPane and Loader componenst which is what I am looking for but this only allows you to load swf or jpg. Is there any component etc for me to load basic HTML or text into a scrollpane?

Thanks in advance for any help,
jonny

Read Text File - Display In Flash
Hello,

i have a text file with 100 lines. I would like to display the first 3 lines on my flash movie. When i click the button next i would like the flash movie to display the next 3 lines or else to display the previous 3 lines...
This is for a simple news system...could u help me doing this way or in other way if u think it's better?

Thanks,
Miguel

How Can I Get Flash To Read Content From A Text File?
Hello!

Thanks for the interest in my post.

Does anyone know how I can get Flash MX to read my page content from a .txt file so I can update the news pages etc. easier?

In a bit more detail, what I need to do is when the user clicks on a button, a movie clip

comes up with a bitmap background and an up and down scroller (which I take would all be in

the Flash), and then have the page content which is read from the text file. I need to do this for many separate pages so I take it each page would have a different text file.

Then, I need it to be able to be able to be scrolled. How would I do this?

Please help.

Thank you very much and I hope to hear from you.

Mark

Get Flash To Read TM, Registered TM, SM, Etc. From Text File?
I finished the actionscript that read the XML file and display the texts in the text fields. So far, so good. That was last week.

Then today, we encountered a problem. We noticed that if we put in a Trademark icon, Servicemark icon or Copyright icon in the texts in the file and have Flash read them. It couldn't render the symbol icon in the flash's text field. But the Registered Trademark icon does work. So, we knew that Flash doesn't support some of the Window's character map icons that are supported by variety of fonts, like Arial, Verdana, etc...

So, does anyone have an idea that we can use instead? Or what can we do to make those Intellectual Property icons to work from the text file?

Thanks a million!!!
FletchSOD

Flash Standalone To Read/write Text Files?
Hi: I have a flash form that I want my customers to install or use from a cd. I need them to be able to type in their personal information and for this to become permanent and read by the flash form every time it loads. I also need to save the input of this invoice each time it is printed on the local client computer. No web connectivity is present. Can I use flash as an interface to do this? What scripting language can I use to communicate with flash...read and write text files, and enable flash to display the results of a query to this text database (which would populate the records of an old invoice)? I tried this first using an access standalone app which crashed 40 % of the systems. I would like to use flash as the interface, but I am not sure how to do this without using html. Again, this needs to be a standalone distributable application. Any suggestions of samples of similar text file database manipulation with flash?

Can Flash Read Text File And System Date?
Flash newbie, way newbie here. I am working on a project where I need a swf file to read a parsed text file, and based on the system date, place text into the swf to be viewed. Is this possible, how do I go about it.

The end result is to have a flash movie that will run content for a year (365 entries in file). Other wise I am going to have to create 365 different ones.

Hopefully this made sense and is doable.

Thanks in advance

Example file with two entries

07042002~The Brave and the Bold~
07052002~The Stupid and the Clueless~

Fonts For Sharp Text - Possible In Flash? Very Important, Please Read
Well, when it comes to Flash technology, it is really interesting how much stuff you can “afford” to create. But one thing that I, and clients, are often irritated over – is difficult to manage sharp text in Flash.
The big question is – why? What I have been notice by practicing Flash, is that as text goes smaller – it becomes unsharp. Not jagged but unsharp. So one possibility is come around this problem is to use function “use device fonts”. But unfortunately that doesn’t work of you want for example to use Bank Gothic Medium BT font for body text with 12 size. Not at all.
To bad because this Bank Gothic Medium BT (found at flaskit.com font section) font is a “typical” FLASH style font. So any suggestions on how to solve this problem? Maybe it is so that fonts like Bank Gothic Medium BT are not made with high quality perception in creators mind? Don’t think so.
Please tell us or give a suggestions on how did you, actually if, you solve this problem.


Regards

Read / Write To External Text File From Flash
Hi pieps,
I hope someone can help me out here.
I am trying to make a banner that shows percentages from a external text file. The percentages are showing the interest on a morgage for 1 year, 5 years 10 years. So the banner is showing more then one percentage.
I have come so far that the banner is showing the percentages from a external text file. I added the %-sign in the action script.
All working fine until now....
Now what I want is to ba able to change the percentages through the banner. So I was thinking of a hidden button on the banner that brings you to a password field. If correct password, leads you to a input box (or 3 input boxes). Here you can insert the new percentages and then click on GO!
The flash movie should then 'talk' to a php-script that writes the new percentages to the external text file where the flash movie is reading the percentages from. So the next time someone will view the banner, they will see the new percentages.
But you know how a external text file, where flash reads it's info, looks like.... percentageOneYear=2&percentageFiveYear3&.... etc.
How does the php-file know how to change only the right number?
Can anyone help me with that last part (php part).
That would be very helpfull.

Maby my way is not the best or the easyest, so help on more then only the technical level would be more then welcome.

HTML Being Read In Flash Imported From Text File
Hi Everyone,
I have the following code below in which I import a variable called Don from a text file called "thetext.txt". I would like my textfield to process HTML tags. I went ahead and enabled HTML tags in the text field properties panel but it seems to still not be working. Any help would be greatly appreciated. Thank you.

create = new LoadVars();
create.load("thetext.txt");
create.onLoad=function(x){
if (x){
tdata.html=true;
tdata.text=this.don;
}
}

How To Set Up An XML File So Flash Can Read Right-to-left Text (Arabic, Etc)
Hi

Can anyone help me set up the attached XML file (or text below) so that I can do Arabic and Farsi presentations in Flash?

I'm missing the XML rtl (right-to-left) tags. The text below reads normally (left-to-right), instead of the other way round

Any help would be much appreciated...

Thanks

Danirob

================

<?xml version="1.0" encoding="utf-8"?>

<props>
<txt1 >English maze تحولی عظیم درروشهای آموزش زبان انگلیسی است.</txt1>
<txt2> دراین شیوه از جدیدترین روشهای آموزشی، با هدف آماده کردن دانشجویان در کوتاه ترین زمان وبا موثرترین روش برای یاد گیری محاوره زبان انگلیسی در کار، سفر و مکالمه روزمره، استفاده می شود.
تیم ما، که متشکل از افراد خبره و حرفه ای می باشد، به هزاران نفر از زبان آموزان کمک کرده تا انگلیسی را با توجه به نیازهای دنیای مدرن و رقابتی امروز، صحبت کنند.</txt2>
<txt4>زبان انگلیسی برای قرن 21ام</txt4>
<txt5>شرکت شما چگونه از مزایای English Maze بهره مند می شود؟</txt5>
<txt6> بیشترین میزان بهره مندی از زبان انگلیسی، کمترین هزینه</txt6>
<txt7>با پرداخت مبلغ اندک ماهیانه، آموزشگاه، اساتید و دانشجویان شما می توانند از منبع عظیمی از اطلاعات انگلیسی عمومی و تجاری، به همراه هزاران فعالیت تمرینی بهره مند شوند</txt7>
<txt8>انعطاف پذیر است</txt8>
</props>

Create/Read/Write Text Files In Flash
Hi to my Haiku Masters,
Guys i would like to know if is it possible to CREATE .txt files into a predefined directory from inside flash instead of creating them outside flash and then do the READ/WRITE operations

Raj

Flash Must Read And Execute External Text File.
Hi,

How can my actionscript be replaced by an external text file?

I have the following code for a dynamic flash menu:


ActionScript Code:
total = 11;
text1 = "home";
text2 = "dogs";
text3 = "cats";
text4 = "rabbits";
text5 = "hamsters";
text6 = "rats";
text7 = "mice";
text8 = "guinea pigs";
text9 = "ferrets";
text10 = "chinchillas";
text11 = "monkeys";
 
//submenus
subText2 = 2;
stext21 = "puppies";
stext22 = "adult";
 
subText4 = 2;
stext41 = "short hair";
stext42 = "long hair";


I'd like to use a text file with this code instead, and have flash point to that text file on runtime. This is to enable an editor who does not own Flash to make easy modifications to the menu.

Thank you for your insight.

I am also posting my source file, which is from a tutorial I had downloaded.

http://www.gustografik.com/ultrashoc...cmenu/menu.fla

Is It Possible To Read A Text File And Draw Animation Dynamically In Flash
Hi,

I want to draw lines and animations similar to (Flow Charts) dynamically based on the information provided in a text/XML file.

The file has information about:
1) Shape of the simple animation like rectangle and image to be drawn
2) Relative position of the animation that has to been shown

Wondering whether this is possible with Flash 5.

I would appreciate if any one can post a sample file explaining the above mentioned scenario.

Thanks,
-Raj

How To Read From Text?
Sorry for all,
I knew that it is possible to lopad text from txt file into swf...but I just forgot how to do, can anyone give me a hand?
MKit de HK

Why Do I Need To Read Out Text Box?
hi guys!

i have a problem reading directly from a variable that holds xml data.
when i try to run an if statment on it, it wont show up, the only way i can get round it is to pass the variable onto a textbox then run the if statment out of that.

what am i doing wrong?!!!

this is what i have:



Code:
thePath = "myurl"

varDestination = xmlData.firstChild.childNodes[2].childNodes[2].childNodes[1].childNodes;

_root.destinationHolder.text = varDestination;


if (_root.destinationHolder.text == "hello"){ xpos = 50, ypos = 84;

xmlData.load(thePath+ '/xmloffers.xml');

how can i get rid of using the textbox and just use the variable?

ta!

How To Read Text?
How can I check the text in a textbox and set the color of a mc to Black if the textbox says "01" and Red if the text is "02"

This is my best try.. It doesn´t work the way I want, brobably because I don´t know how to do it.. =)



Code:
if( _root.level.text == "01")
{
_root.A1.color = 0x000000;
}

if( _root.level.text == "02")
{
_root.A1.color = 0xFF0000;
}

Text Read From Php
Hello!
I have a problem...
I read 2 texts from PHP...
the php outputs " text1=blablabla&text2=dfdfdfds "
now, the problem is that it may occur that "&" apperas in the text (like text1=yes&no&text2=dasdasd)
and so text1 will not be read correctly.
what can be done?
thanks

Bought CS3 But Haven't Read My MX Actionscript, MX2004, Books. Should I Read Them?
I just bought CS3 and I am now debating whether I should read my Flash MX Actionscript bible, Flash 2004 Bible. I should have read them, but It's just hard to fit the time in.

Would I benefit from reading these books when CS3 is Actionscript 3? How much functionality is lost when scripting in Actionsript 2 and 1 as compared to Actionscript 3.

Would it be wiser for me to just learn Actionscript 3 properly and get a book on Actionscript 3 than waste my time on reading old scripting and technology?

Also is MC tween compatible on CS3, actionscript 3.

Text File Not Read?
I've made a scrolling text box. But for some reason, it won't read the .txt file I have specified it to read. Here is what my actionscript looks like:

onClipEvent (load){
this.loadVariables("news.txt");
scrolling = 0;
frameCounter = 1;
speedFactor = 3;
needInit = false;
}
onClipEvent (enterFrame){ if( needInit ){
if(TextBox.maxscroll > 1){
//Text is loaded!
needInit = false;
}
}

if( frameCounter % speedFactor == 0){
if( scrolling == "up" && TextBox.scroll > 1){
TextBox.scroll--;
}
else if( scrolling == "down" && TextBox.scroll < TextBox.maxscroll){
TextBox.scroll++;
}
frameCounter = 0;
}
frameCounter++;

onClipEvent (data){
needInit = true;
}

}
on( press ){
scrolling = "up";
frameCounter = speedFactor;
}
on( release, releaseOutside ){
scrolling = 0;
}
on( press ){
scrolling = "down";
frameCounter = speedFactor;
}
on( release, releaseOutside ){
scrolling = 0;
}

I've followed the tutorials "Actionscript for Flash 5 dummies: Scrolling a text box" and "Actionscript for Flash 5 dummies: Scrolling a text box II". The only thing I didn't add from the second tutorial is the new scroll bar. I didn't want that. Anyway, could someone help me pleasssee? I need some help bad. I'm real confused on what to do. Thanks!

Read From A Text File (CSV)
I have a great free PERL script running on my server that reads from a flattext file which is very easy to use in HTML.

My question is how do I get my movie to read from the text file and pull into the frame..??? I have figured out how to write to the text file via a loadVariablesNum ("", 0); action, but I can't figure out how to read to the movie...

Please help..!!!


Thanks, and God Bless America for we are FREE...

HELP - How Can I Read The Value Of A Dinamic Text
I have one dinamic text (named moviename) the needs to read a value from the text.

I load the text file using :
loadVariablesNum ("movies.txt", 0);

this work fine, the dinamic text on the screen shows the right value from the txt file

the problem is , in the following line I need to use the text value to open a movie clip, using something like :

loadMovie(moviename, 0);

it doesn't work.
even if I use trace(moviename) it doesn't display the text field value, but only the text field name

I've tried to access the text value using :
trace(moviename);
trace(moviename.value);
trace(moviename.String);

and doesn't work;

Somebody knows a way to read the value of a dinamic text field ?

Thank you very much for the help

Ivelton

Is There Any Way To Read From A Text File But
not loading it into a text field, but rather load it to a variable??????
i want to load what's in the text file on the server to a variable and not to a textField!
is it possible?
how?
thanks
PEleg

Read Text Files
Hi,

How can i get flash to read a whole text file on the click of a button, without actually modifying the text file itself.
The textfile is being generated froma script and i cannot change it.

Can i get flash to open the text file instead?

Please can you send me a working example

Thanks

umarK

Read Variable Name: Text
Hi, i have a text file, with a number of different variables inside, i can read them into my movie fine, but im reading in the variable names in from the text file randomly, so im not actually putting the name of the variable in the "textFore.text=myVars.variablename;" string, instead i have a variable which contains the name,
eg:
textReadin = ("text0" + imageloaded);
textFore.text=myVars.textReadin;

is it possible to do this, and if so, how could i do it, because this does not work at the mo, is there a way so that it can read the contents of the variable rather than the actual name,
cheers

Read Text With Actionscript
I have been looking all around for this answer but I never really found the exact answer I'm looking for.... I need something that would read a .txt file and compare it to a variable containing a .txt file (already loaded), and if it is the same then it will do an action.
My case is that I have 1 file for each language (3 languages) containing the same information but in a different language. And I would like to check what language is already loaded, so that it knows what language file it should load in the variable when someone presses a button in the nav bar.
I hope I'm clear enough. Please let me know if you know or if you need me to find a better way to say this.
Thanks you.

Read XML Text Data
Hi,

I have an XML file with that is similar to this example:

Code:
<Category title="Main">

<Category title="Cat1">
<Link title="Link1" />
<Link title="Link2" />
</Category>

<Category title="Cat2">
<Link title="LinkA" />
<Link title="LinkB" />
</Category>

<Category title="Cat3">
<Link title="LinkE" />
<Link title="LinkG" />
</Category>
</Category>
I am reading it in the following method:

ActionScript Code:
var xmlString:URLRequest = new URLRequest("TreeData.xml");
            var xmlLoader:URLLoader = new URLLoader(xmlString);
            xmlLoader.addEventListener(Event.COMPLETE,initData);
           
            function initData(evt:Event):void {
                var TreeData:XMLList = XMLList(xmlLoader.data);
                var numOfCategories:Number = TreeData.Category.length();
                var CategoryArrays:Array = new Array(numOfCategories);
               
                for (var catI:int=0; catI<numOfCategories; catI++) {
                    CategoryArrays[catI] = TreeData.Category[catI].@title.toString();
}

This way I can know what object is under the main category.
I want to read the tree recursively.
Is there a way of reading the XML text under a certain object?

For example, if i want the XML text under Cat2 i will get:
<Link title="LinkA" />
<Link title="LinkB" />

???

Thanks.

Read Text From Site
How do I read the text after 'Game Server Status:' ?

http://www.battleon.com/msg-guardianmax5.asp

Thank you

Read Text With Actionscript
I have been looking all around for this answer but I never really found the exact answer I'm looking for.... I need something that would read a .txt file and compare it to a variable containing a .txt file (already loaded), and if it is the same then it will do an action.
My case is that I have 1 file for each language (3 languages) containing the same information but in a different language. And I would like to check what language is already loaded, so that it knows what language file it should load in the variable when someone presses a button in the nav bar.
I hope I'm clear enough. Please let me know if you know or if you need me to find a better way to say this.
Thanks you.

Linking Text Read From XML
I went through this tutorial and i pretty much understood how to extract data from nodes.

I got a few questions though. (I'm new to flash and AS)

How do you apply a getURL to a text? if i use "getURL" as such, it opens the page without being clicked on. And if i use onRelease, it'll cause an error because i don't have any buttons.


Code:
function loadXML(loaded) {
if (loaded) {
_root.inventor = this.firstChild.childNodes[0].childNodes[8].childNodes[2].firstChild.nodeValue;
_root.comments = this.firstChild.childNodes[0].childNodes[8].childNodes[0].firstChild.nodeValue;
_root.link = this.firstChild.childNodes[0].childNodes[8].childNodes[2].firstChild.nodeValue;
name_txt.text = _root.inventor;
comment_txt.text = _root.comments;
getURL(_root.link);
} else {
trace("file not loaded!");
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("http://news.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss091.xml");
I'm used to java so i can pick up some things fast. If thats used in the AS template from the tutorial it works pretty well except that the link opens up without it being clicked on. I'd like to learn how to link a piece of text.

Secondly, from the RSS there are several such links, how would i go about a for loop? or an If statement? Could i do something like "if nodeName = URL" do something?

I'm just curious thats all. Could someone please explain?

Cheers

XML Text Read Without Nodes
I just read the great tutorial on reading external XML data into a dynamic text box here...
http://www.kirupa.com/developer/acti...ldataflash.htm

What I would like to do is take a xml document with 4 nodes per item and display the entire thing inside 1 scrolling dynamic text box. I tried taking out the nodes like this...

original..
_root.inventor = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;

modified
_root.inventor = this;

but it displays everthing - the tags included and I just want the info inside the tag to be shown, EX: <item> red </item> - I only want the "red" to be displayed.

Can anyone help me out?
Thanks.

Read Loaded Text
I am trying to read the text that is been dynamicly loaded into a textearea.

I get stuck on the part were a value must be "readed"
This part of code will clear my question :

Code:
on (release) {
if (_root.hidden1.text == c ) { // the hidden1 is loaded dynamicly
_root.reactie.text = "juist";
} else {
_root.reactie.text = "fout";
}
}
anyone ?
thx

Linking Text Read From XML
I went through this tutorial and i pretty much understood how to extract data from nodes.

I got a few questions though. (I'm new to flash and AS)

How do you apply a getURL to a text? if i use "getURL" as such, it opens the page without being clicked on. And if i use onRelease, it'll cause an error because i don't have any buttons.


Code:
function loadXML(loaded) {
if (loaded) {
_root.inventor = this.firstChild.childNodes[0].childNodes[8].childNodes[2].firstChild.nodeValue;
_root.comments = this.firstChild.childNodes[0].childNodes[8].childNodes[0].firstChild.nodeValue;
_root.link = this.firstChild.childNodes[0].childNodes[8].childNodes[2].firstChild.nodeValue;
name_txt.text = _root.inventor;
comment_txt.text = _root.comments;
getURL(_root.link);
} else {
trace("file not loaded!");
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("http://news.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss091.xml");
I'm used to java so i can pick up some things fast. If thats used in the AS template from the tutorial it works pretty well except that the link opens up without it being clicked on. I'd like to learn how to link a piece of text.

Secondly, from the RSS there are several such links, how would i go about a for loop? or an If statement? Could i do something like "if nodeName = URL" do something?

I'm just curious thats all. Could someone please explain?

Cheers

XML Text Read Without Nodes
I just read the great tutorial on reading external XML data into a dynamic text box here...
http://www.kirupa.com/developer/acti...ldataflash.htm

What I would like to do is take a xml document with 4 nodes per item and display the entire thing inside 1 scrolling dynamic text box. I tried taking out the nodes like this...

original..
_root.inventor = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;

modified
_root.inventor = this;

but it displays everthing - the tags included and I just want the info inside the tag to be shown, EX: <item> red </item> - I only want the "red" to be displayed.

Can anyone help me out?
Thanks.

Read Loaded Text
I am trying to read the text that is been dynamicly loaded into a textearea.

I get stuck on the part were a value must be "readed"
This part of code will clear my question :

Code:
on (release) {
if (_root.hidden1.text == c ) { // the hidden1 is loaded dynamicly
_root.reactie.text = "juist";
} else {
_root.reactie.text = "fout";
}
}
anyone ?
thx

How Can I Read The Value Of A Dinamic Text To Another Var ?
I have one dinamic text (named moviename) the needs to read a value from the text.

I load the text file using :
loadVariablesNum ("movies.txt", 0);

this work fine, the dinamic text on the screen shows the right value from the txt file

the problem is , in the following line I need to use the text value to open a movie clip, using something like :

loadMovie(moviename, 0);

it doesn't work.
even if I use trace(moviename) it doesn't display the text field value, but only the text field name

I've tried to access the text value using :
trace(moviename);
trace(moviename.value);
trace(moviename.String);

and doesn't work;

Somebody knows a way to read the value of a dinamic text field ?

Thank you very much for the help

Ivelton











Read In From A Text File
Hi,

Is it possible to read some words in from a textfile
and put a small animation an them (something like fading in, ...).  I would like to do this so I can change the words whenever I want.

So,
- there is a file (lets say with the words, "Welcome,test,hello"

- These words are read in via Flash
- A small animation is put on them

Thanks for any help,

Rgds,

Tijs

PS I'm  new to Flash



Programming is like sex: one mistake and you have to support it for the rest of your life.

REad In A Text File
Hey,

I am making a game and want to be able to read in a file. Does anyone know how to do that?

Mike

HEELP - How Can I Read The Value Of A Dinamic Text ?
I have one dinamic text (named moviename) the needs to read a value from the text.

I load the text file using :
loadVariablesNum ("movies.txt", 0);

this work fine, the dinamic text on the screen shows the right value from the txt file

the problem is , in the following line I need to use the text value to open a movie clip, using something like :

loadMovie(moviename, 0);

it doesn't work.
even if I use trace(moviename) it doesn't display the text field value, but only the text field name

I've tried to access the text value using :
trace(moviename);
trace(moviename.value);
trace(moviename.String);

and doesn't work;

Somebody knows a way to read the value of a dinamic text field ?

Thank you very much for the help

Ivelton

Read/write From A Text File
hi
i have a text file which has two columns each seperated by a tab spacing.i want to read those contents and put in two arrays ,first array holding the first column value and 2nd having the 2nd column of the file.after that i want to write back the array contents back to the file in the same format.how to do it?

bye
geethanandh

Read/write To Text File
I am unable to find any Flash functions that are able to read and write text data to a text file on the user's computer.

I am assuming that this is possible, either through javascript or maybe a flash MX function, but I would ideally like to use it in Flash 5.0, so the javascript option may be better, anyone got any code for this?

Need Dynamic Text Box To Read Off Of A .txt File.
Hello, I am having trouble with a .txt file being read of a dynamic text field. I have put in news.txt in a bunch of places, it doesn't read it. I do have the .txt file in the same folder as the flash is it so that shouldn't be a problem. Please respond to this message.

Read From External Text File
Hi,
My problem is that it reads the text file when it is in the main scene, but I need it to be in my movieclip and it does not work then,
Do you know what I should do?

Thank you in advance.

Scrolling Text Tutorial...READ :-)
Hello,

I asked how to do this in another forum, and eventually figured out a way to do it myself, so I thought I would post it here for anyone interested.

This tutorial will allow you to scroll a mc back and forth, say for instance you want to scroll a text tween up and down like a scrollbar would do, without the scrollbar... with up and down arrows for instance. The most unobvious part of this,and the part I was asking about originally, was how to scroll the clip backwards. I have attached a file below for anyone to download if they want.

I realize there are more elegant ways to accomplish this with actionscript, but for those not very versed in actionscript this tutorial will give a functional workaround. Thanks for reading.

-----------------------------------------------------

First create the text you want to scroll and hit F8 to convert it to a mc. Name the clip “textMC”, and make sure it has movie clip behavior selected. Go to the properties panel and name the instance "text". On the main timeline, create a new layer and call it "mask". Then create a shape on that layer and place it over the text where you want the text to be visible. Right click on the mask layer and select "mask" from the drop-down menu. This will lock both layers, so unlock the text layer and hide the mask shape by clicking the column under the eye.

Next, create a new layer in the main timeline, name the layer "arrows" and create your arrow shape on that layer. Convert the shape into a mc with the button behavior, and then copy and paste another instance of the clip onto the stage. Place the buttons where you need them. Now select both arrow buttons and hit F8 to convert them to a mc. Name the instance “arrows” in the properties panel. Double click the mc, and create a new layer. Call the layer “actions” and put a stop action in frame one. Click frame two of the arrows layer and hit F6. Select the down arrow and hit F9 to open the actions panel. Delete all of the actions for the down arrow in the second frame of the timeline only. We’ll come back to why later on.

Now we're going to create our text tween. Double click the text mc, click frame 20 (the closer to frame one, the faster your text will scroll), and hit F6. On the last frame, move the text to where you need it so that the last line is visible under the mask. Then right click on frame one and select "Create Motion Tween". Create a new layer, call it actions, and put a stop action in the first frame. Then go to the last frame and put a stop action there as well.

It’s time to start making this all work. Double click the “arrows” mc, and select the down arrow instance in frame one, and hit F9. This will open the actions panel. Place this actionscript on the button:

on (press) {
_root.text.play();
}
on (release) {
_root.text.stop();
}


Test the movie. The down arrow should scroll the text until the last frame, and then stop. You will notice however that when you release the button and then click it again, the text jumps back up to the first frame. Remember when we created the second frame with our arrow buttons in it and deleted the actionscript for the down arrow? That will fix this small but annoying problem. Go to the last frame of your actions layer inside of the “text” mc and hit F9 to open the actions panel. Put this actionscript below the “stop” action for that frame:

if (this._currentframe == 20) {
_root.arrows.gotoAndStop(2);
}


This code says that if the current frame of the mc you are inside of, “text”, is at frame 20, for the mc “arrows” to go to frame 2 and stop. And remember, we put a down arrow with no actionscript on it in frame 2 of the “arrows” mc, so there is just a functionless button in frame 2. Test the movie again and when you reach the end of the text, the down arrow should no longer cause the text to go back to frame one when it’s clicked. Then select frame 19, hit F6, and put this line of actionscript on the frame:

_root.arrows.gotoAndStop(1);

That will cause the “arrows” clip to go back to frame one once you click the up arrow, otherwise the down arrow would stop functioning if you scrolled back up after the first time you reached frame 20.

Ok, all that’s left is to get the up arrow working, which is a little more complicated than getting the down arrow to play the text tween forwards, because the up arrow must play the text tween backwards, but we’re almost there.

Let’s start by creating an empty mc. Hold ctrl and click F8. This will bring up the new symbol dialog. Name the mc instance “controllerMC” and make sure you select the movie clip behavior. Click ok and you will be taken inside the newly created mc. Click frame 2 and hit F6, then click frame 3 and do the same. Click frame 1 and hit F9 and insert a stop action. Click frame 2, then F9, and put this actionscript on that frame:

_root.text.prevFrame();

Then on frame 3 put this actionscript:

gotoAndPlay(2);

This will keep the empty clip on a continuous loop between frame 2 and 3 until a command tells it to go back to frame 1 and stop. Also, as there is a stop action on frame 1, this loop will not start until it is told to do so as well. We’ll take care of that now.

Go to your text tween mc and create a new layer and name it “controller”. In frame 2 of the controller layer, drag an instance of “controllerMC” onto the stage. It can be placed anywhere on the stage, as it’s an empty clip and invisible.

Double click your “arrows” mc and select the top arrow and place this actionscript onto it:

on (press) {
_root.text.controller.gotoAndPlay(2);
}
on (release) {
_root.text.controller.gotoAndStop(1);
}

This is the command that tells the controller clip to go to frame 2, and that loop we created continuously moves “text” back one frame over and over again as it loops. The third and fourth lines tell the “controller” clip to go back to frame one on release, which stops the loop. All that’s left is to select the up arrow on frame 2 as well and paste the same code in.

Test your movie.
----------------------------

Please let me know of any errors. Any questions or comments are welcome.

Can Read Text Variables From Word Doc?
New to ActionScript, I was successful in reading a text string from a .txt file into a text object in Flash. Works great.

But my management is asking that Microsoft Word be the default editor for the text string (mostly to be able to spell check). But when I try to read a simple string from a Word document, it appears as squares (since there's all that Word stuff intermixed wirth the simple text string I'm trying to retrieve).

Anybody know how to just get the string?

Thanks,

Ron Cook
Boulder, CO

Text Scroller Problem. Please Read
Hey there users I got a problem, but Im pretty sure someone would know how to easily fix this. I'll explain...

I am intergrating flash with php and Mysql and I am able to display the information just fine. I went on this website and made a text scroller.
http://www.smartwebby.com/Flash/text_scrollers.asp

Now basically I made the dynamic text then I converted it into the movie clip but the problem is I can display the content information from the mysql databse into flash but the scrollbar doesnt work. And if the dynamic text is not a movie clip, the scroller would work but I am not able to get the content from the MySQL database.

For some odd reason I am not able to load in a variable into a dynamic text until I convert it into a movie clip. Does anyone know the problem to this. What Im really trying to do is be able to convert the dynamic text into a movie clip and still be able to use the scroller to move up and down. I hope someone knows the solution.

Copyright © 2005-08 www.BigResource.com, All rights reserved