ActionScript 2.0 :: F8 Reading From A Notepad File

Feb 9, 2009

I am making a random name chooser for a class (using an array to read from 28 names). I was wondering if it is possible for flash to read an array from a notepad file. [code]Is there a way to make it so that instead of having to edit the Fla file to edit the names, I can just make a notepad file with the array and _root.NumberOfStudents variable so that it can be edited from year to year easily?

View 3 Replies


Similar Posts:


ActionScript 2.0 :: [F8] Reading An Array From A Notepad File?

Feb 18, 2009

pulling both a variable and an array from a text file (.txt). In my case I have the following:A flash file (.fla)A text file (named MyTxtFile.txt)Now, I just need to be able to pull an array from the txt file. Is it possible to do this? On the main timeline of my flash file I have the following:

Code:

MyArray= new Array("Pizza", "Cheese", "Fish");
_root.NumberofItems= 3;

My goal is to have the "MyArray" array in the text file so that I can edit the values from the txt file.Then I have a button on the main timeline ("Item_txt" is just a dynamic textbox in the flash file):

Code:

on(release) {
_root.Item_txt = _root.MyArray[random(_root.NumberofItems)]; }

I want to be able to update this file often, so I thought it would be handy to just "store" an array and a variable in a text file. Let's say in MyTxtFile.txt I had the array "MyArray" and the variable "NumberofItems". I could just update the information in the txt file and it would update the Flash file.

Edit: Would it be possible to store a string in a text file, then have that string put into a blank array? For example: If I had "cheese", "stars", "playdoh" in a text file and then I pulled the string into flash using the LoadVars class could I have the code in my time line set up like this:

Code:

_root.variable1 = "";
var ARRAY:LoadVars = new LoadVars();
ARRAY.onData = function(thetext:String) {

[code]....

View 2 Replies

ActionScript 2.0 :: Loading Text From Notepad File Externally

Dec 26, 2005

I have a file that loads text from a notepad file externally. This is working fine. But when I try calling this animation from another flash file (using loadMovie), I do not see any dynamic text attached to the child file.

View 1 Replies

IDE :: Change Movieclip Color Frim Txt(notepad) File ?

Jun 25, 2009

i just want to know that is there any idea for changing color of Movieclip from TXT file....

View 1 Replies

Create A Flash Webpage That Creates Or Edits A Notepad File?

Jun 8, 2010

Background: I am trying to create a website that is easily updateable by a non-html savy user. I figure I can load the content of my flash page from a notepad file within the same directory.I would prefer to not make the editor use a FTP program, so I figure the best method is a webpage where the person can log in and type the updated text and have it create a new notepad file and overwrite the old one. I am not sure if this is technically flash or simply a html question, but does anyone know how to go about doing this

View 6 Replies

ActionScript 2.0 :: Make Flash 'communicate' With Notepad File To Store Information?

Jun 17, 2003

i want to make a discussion/message board. but a very very simple one. no username, password.. just a board where people can wite one or two lines. thats all.its very hard to find one out there. i think if i can manipulate a guestbook files, i can make a simple discussion board. The problem is that i dont understand how to make flash 'communicate' with notepad file to store information like how they did in guestbook. this is link to one of flash message board i found, but it has too many section - like kirupa forum. i dont have any ideas to make it as simple as i want. i dont understand the AS

View 2 Replies

ActionScript 3.0 :: Use Random File Access For Reading And Writing Data To File In It?

Jan 20, 2010

I am wondering if it is possible to use random file access for reading and writing data to file in Actionscipt 3.0 similar to that what is in Visual Basic?

View 1 Replies

ActionScript 2.0 :: Flash File Reading An External Text File For The Content?

May 16, 2005

I turn to you for help, dear sweet Kirupa Forumites. First, let me explain the problem: I have a flash file reading an external text file for the content. Everything works perfectly for nearly everyone - you click a menu button, and the content text comes up fine. However, a couple of people have found that the text shows up as "undefined". I have checked the player versions of the people where it doesn't work, and it is the same as for those where it does work, so that ain't the problem.

I don't understand why it works perfectly for nearly everyone, but a small number of people have this "undefined" text problem. It seems to be a problem with loading the external text file, but I don't know why. I have a main flash movie, and load the text in the first frame, using the following:

var my_content = new LoadVars();
my_content.load("content.txt");
my_content.onLoad = function(success){
if (success){

[Code]...

I then have a couple of dynamic text boxes in the main movie - one called ErrorText (for displaying an error message to the user) and one called ContentText (for displaying the content). I use an external menu swf which jumps to a specific frame in the main movie, depending on which button is clicked. Actionscript on the main movie frame for the first button does the following, with the other frames similarly configured:

ContentText.htmlText = my_content.content1;
stop();

My external text file is properly configured (content1=blah blah&content2=other blah blah) etc.

Does anyone have any advice on how I can solve this particular weird problem??

View 3 Replies

Reading SOL File From A C/C++ Application

Oct 19, 2009

I would like to have two applications communicate with each other. One app is a Flash running the browser and the other one is another app of ours that is distributed as *.exe file. We need the C/C++ application to read some info out of the SOL file, that is written by the Flash app.
 
Any other mean that can be used to read the SOL file from a C/C++ application? How often is the format of the SOL file being changed ?

View 1 Replies

ActionScript 3.0 :: Only Reading One Xml File?

Apr 22, 2010

What I have so far...sure there is a better way to do this and as I learn AS3 I will figure it out. The following is what I put together where I now have three instances of the segmented thumbnail button that shows an image when cliked on. What I figure out why it only reads the one xml file.

My XML files: images, images_a, images_b
<images><image full="images/full/image1.jpg" thumb="images/thumb/image1.jpg" /> <image full="images/full/image2.jpg" thumb="images/thumb/image2.jpg" /> <image

[code].....

View 4 Replies

ActionScript 2.0 :: Reading An Xml File And Get URL?

Apr 23, 2010

I'm trying to read a url from an xml file and attach an onRelease event to a movieclip that opens the url when clicked.

Code:

var thelink = getValue(findNode(i, "link")).toString();
var thelink2 = "../news/Press Releases/testpdf.pdf";
if (thelink <> "")
{
tempMC.bat.onRelease=function(){ getURL(thelink); }
}

If I use the "thelink" variable as input to the getURL function, I get a "Page not found" error.If I use the "thelink2", it works as expected.When I look in the debugger, "thelink" and "thelink2" are identical!Here is the code for the findNode function. I've had no problems before with this code, so I don't think the problem is there.

Code:
function findNode(node, nodeName)
{
if (node.nodeName==nodeName)

[code]....

View 2 Replies

ActionScript 2.0 :: Having A Swf Reading Its File Name?

May 18, 2010

I was wondering if there was a way to have a flash file read its own flash name and use it as a variable within that swf. ie, 05.swf. I would want 05 to be a variable with the page.

View 2 Replies

ActionScript 2.0 :: Reading XML In PHP Instead Of An XML File?

Nov 4, 2010

I have a couple variables coming from PHP. So for example if my PHP looks like this:

PHP Code:

$qry = "Select * from memory"; 
$result = mysql_query($qry); 
echo "memory="; 
while($resultset = mysql_fetch_array($result)){ 
echo $resultset['name'].";".$resultset['memory'].","; 

For this the output from the PHP file would look like this:

memory=Person2;Memory2,Person1;Memory1,

So basically the comma represents a new record in the database. So basically in my text field I'd like the following result to happen:

Memory: Memory2
From: Person2
Memory: Memory1
From: Person1

So take the first record and display it like I've shown and then have a couple break lines (not sure how to accomplish this either) and display the next record that was separated by the comma.I have the following AS code which works for one variable but I have more then one like above:

ActionScript Code:

files = new Array();
lv = new LoadVars();
lv.onLoad = function() {

[code]....

View 4 Replies

ActionScript 2.0 :: Reading A Txt File

Sep 16, 2008

i'm trying to read a txt file (well actually, the file has a different extension but it's a simple txt file). i have a path in that file that points to a jpg that i want to load. if that path has a plus sign (+) in it, the actionscript reads it as a space!

View 2 Replies

ActionScript 3.0 :: Reading LoaderInfo Flashvars Then Chaning Them And Reading Them Again Fails

Oct 24, 2011

I am changing the flashvars variables v1=value&v2=value ect then after the flash movie runs I am changing the variables externally by javascript, so far so good.when flash first loads it reads the vars correctly.when I try to read them ( after the change ) it keeps reading the old values.[code]everything works except I cannot seem to read the changed FlashVars.

View 1 Replies

Professional :: Reading File (MP3) When Being Imported

Mar 5, 2012

I remember that I tried it on my friend's laptop and it worked. I am using a trial version of flash and is a beginner?

View 4 Replies

Flex :: Reading Data From XML File?

May 31, 2010

How to read data from XML file in flex?

View 4 Replies

Xml :: Reading Variable From File In Flex?

Jan 15, 2011

I'm trying to read the address of a flv file from an xml file and then put it in the "source" property of a videodisplay tag .

[Code]...

View 1 Replies

AS3 :: Flash - Reading An Attribute From A XML/RSS File?

Feb 14, 2011

very simple question, i have this: (only a part of the complete rss file)

<item>
<title>Ok, de regalo de San Valentin me pueden dar un viaje a Playa del Carmen! Digo, entre todos lo pagan! No?? #So&#241;arNoCuestaNada</title>

[code]........

View 1 Replies

Xml :: Flex 3 - Reading External Xml File?

May 4, 2011

I've tried every example I could find, but nothing really worked. What I'm looking for the to actionscript code (without using classes - i'd like to do all the code in the section of the mxml file) to load in an XML file that is stored in the same location as the swf file.

[Code]...

View 2 Replies

Flex :: Reading In Existing File In 4.6?

Mar 8, 2012

I have a data file on my computer that I need my flex mobile app to read from. Is it possible to put this file in a certain location on my computer so that the app will see it when I'm testing(ex-can i put it in a folder that is linked to the applicationstoragedirectory directory)?

View 1 Replies

ActionScript 3.0 :: Reading String From Txt File

Jul 13, 2010

How do I read a string from a txt file and extract variables from it?[code]

View 3 Replies

ActionScript 2.0 :: Reading Values From A XML File

Sep 13, 2004

from this file i want to read the values from <model> tag using a for loop with code. i don't know xml well.

[code]...

View 2 Replies

ActionScript 3.0 :: AIR: Way To Specify Where To Start Reading File?

Sep 23, 2009

I have an AIR app im currently developing. And often I am reading 150+MB CSV files. To load the entire file takes a long time, and is quite a memory hog. Im currently loading the entire thing, but the software often only needs part of it, but then will need other parts later.he files are about 1.7Mill lines long, so what I am trying to do, is read the file, but just load every 1000th line. then load all the lines of just the part the person is looking at. But when the look at a different part, I need to load that part in full.

View 1 Replies

ActionScript 3.0 :: Reading All Text From A .txt File?

Oct 15, 2009

Quick question. Ofcourse I know that you can read flash variables from a text file, which is formatted like: @var1=firstVariable@var2=secondVariable and so on.But is there a way to read normal text out of a textfile? Is it through the bytearray class?

View 2 Replies

ActionScript 2.0 :: 'this' In Reading Text File

Jan 6, 2010

[Code]...

View 8 Replies

ActionScript 2.0 :: Reading Data From A File?

Sep 22, 2003

I need to join three images adjacent to each other by reading the file locations from a text file or database. After joining these images I have to make it to a single movieclip.

View 4 Replies

ActionScript 2.0 :: Xml File Not Reading Properly?

Dec 29, 2010

I am trying to import an xml file with multiple sections of HTML. It looks like:

<?xml version="1.0" encoding="utf-8"?>
<htmlcontent>
<application>
<title>Site Deployment</title>

[Code].....

Whenever flash sees an html tag such as <p> or <img src=""> it stops reading the xml file at that point. I currently have it working with each application in its own xml file, but that is messy and I would rather it all be in one place.

View 2 Replies

ActionScript 2.0 :: Reading Values From A XML File?

Sep 13, 2004

from this file i want to read the values from <model> tag using a for loop. i don't know xml well.

- <cat-product-structure>
- <Product_Group>
<ProductGroup>DI</ProductGroup>

[Code].....

View 2 Replies

ActionScript 2.0 :: (mx) Reading From Text File?

Nov 1, 2002

i dont even really know what xml is... i saw somthin with sql and somthin else on here (cant remember what) but i dont know what those are either... so umm i was wondering if there is a basic way to just read in from a text file... a command or anything... to load from a local text file into a dynamic text box... i wanna make a flash site with like a weblog... but i just wanna type in the text file instead of modifying the fla every time i wanna update... so is there an easy way to do it... or a place you know where there is a tutorial on it?

View 8 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved