Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 06-18-2007, 10:49 PM   #1
samifox
Registered User
 
Join Date: Jun 2007
Posts: 58
Default problem reading txt files

Hi,

i load a txt file in pc and I access it by variables only the first line is accessed and really load into the text. Any idea why?


Thanks
S
samifox is offline   Reply With Quote
Old 06-18-2007, 11:57 PM   #2
Cota
Super Moderator
 
Cota's Avatar
 
Join Date: Jul 2001
Location: NYC
Posts: 10,175
Default

Are there "&"s in the text? That will cause a break in the text, as flash see's the "&" as a new variable.
__________________
Color Wars™ | (kul′ər wôrs) n. - Open conflict between factions. www.theColorWars.com

cota - www.chadworkman.com | http://shavedplatypus.com
occupation: designer | flash developer | server-side developer (php, asp, mssql, mysql)
Cota is offline   Reply With Quote
Old 06-19-2007, 01:27 AM   #3
atomic
Banned by AS.org Staff
 
Join Date: Jan 2007
Location: Montréal, Québec
Posts: 14,073
Default

Or is the textfield set to Mutiline?
atomic is offline   Reply With Quote
Old 06-19-2007, 06:45 AM   #4
samifox
Registered User
 
Join Date: Jun 2007
Posts: 58
Default

loadVariables("mytext.txt",_root);

in the text file :

var=some hebrew words

no there is no &.

i try single and multilne, its not that.

the text file saved in notepad, and in uncode format since the language is Hebrew, maybe its a new direction for thoughts?
samifox is offline   Reply With Quote
Old 06-19-2007, 06:50 AM   #5
alexandre_lab
Registered User
 
alexandre_lab's Avatar
 
Join Date: Jun 2002
Location: brussels
Posts: 220
Default

what is the code you use to load the txt?
alexandre_lab is offline   Reply With Quote
Old 06-19-2007, 07:11 AM   #6
samifox
Registered User
 
Join Date: Jun 2007
Posts: 58
Default

It’s a gallery , each button has this code :

on (press){
_root.alphax=1
_root.bigpic.loadMovie(_root.p_arr[1])
loadVariables("mytext.txt",_root);
}

the text box has vars names

author=blabb la bla
apps=blabb la bla
des=blabb la bla

the txt file is :

author=שי גאג
des=,תמונת שטח
des=תמונת תלת מימד של הבדהה מזהב,הדגמה ראליסטת של זהב

Only the “author” is showen on the stage when I click the button , the other links are left empty.

Thanks
S
samifox is offline   Reply With Quote
Old 06-19-2007, 07:20 AM   #7
alexandre_lab
Registered User
 
alexandre_lab's Avatar
 
Join Date: Jun 2002
Location: brussels
Posts: 220
Default

in your text file, you must link each variable/value declaration next to each other via the &

author=me&foo=bar&woman=beautiful
alexandre_lab is offline   Reply With Quote
Old 06-19-2007, 08:19 AM   #8
samifox
Registered User
 
Join Date: Jun 2007
Posts: 58
Default

Quote:
Originally Posted by alexandre_lab View Post
in your text file, you must link each variable/value declaration next to each other via the &

author=me&foo=bar&woman=beautiful
yakkk

is this the only way? i want it to be in tablet fasion so i can maintain it.

Shay
samifox is offline   Reply With Quote
Old 06-19-2007, 08:25 AM   #9
alexandre_lab
Registered User
 
alexandre_lab's Avatar
 
Join Date: Jun 2002
Location: brussels
Posts: 220
Default

with text files, yes it is the only way. For more intelligent data structure, use xml. (tutorial here).
alexandre_lab is offline   Reply With Quote
Old 06-19-2007, 09:45 AM   #10
samifox
Registered User
 
Join Date: Jun 2007
Posts: 58
Default

Quote:
Originally Posted by alexandre_lab View Post
with text files, yes it is the only way. For more intelligent data structure, use xml. (tutorial here).
Hi….after reading the tutorial you gave me….i made a little thinking….i have only 4 variables and deadline that going to hunt me. So ill stay with the yak text

In the same matter, I want to use component , a ScrollPane , what I did is :

1. created a text, convert it into a movie clip and name it. than in the library > Linkage , I check the export to AC checkbox.
2. draw a component, go to its parameters and change the path to the movie clip’s name.

everything is fine by now but the problem is that I want the text to be loaded into the component from external txt file.

How can I do it?

Thanks
S
samifox is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
external txt files used to fill radio button labels & correct txt style not displays rksadia ActionScript 2.0 1 02-12-2007 07:18 PM
Compiler not reading modified files Prpl_Ppl_Etr Other Flash General Questions 2 01-26-2007 09:06 PM
directory problem loading files through AS (file:///) the good war ActionScript 2.0 5 05-16-2006 01:33 AM
Problem reading variables in HTML. Help! Mineut ActionScript 1.0 (and below) 6 02-20-2004 12:10 AM
problem with pdf files Planche ActionScript 1.0 (and below) 0 07-28-2003 12:21 PM


All times are GMT. The time now is 01:34 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.