Writing A Variable To Text
Can someone please show me a working example of a .swf (or projector?) writing a variable to a text file.. I need something to run simply on my computer.. not on the internet.. so i'd assume I don't need backend scripting...
But for some reason I can't seem to find anything that works for me?
For example..
I would like two input text boxes.. one for the file name
and one for the variable .. such as "Hello World!"
So if I typed in HelloWorld into both text boxes.. a text file would be created "HelloWorld.txt" and within would be something like var=HelloWorld
can anyone help me out? thanks in advance
FlashKit > Flash Help > Flash General Help
Posted on: 10-06-2005, 03:09 AM
View Complete Forum Thread with Replies
Sponsored Links:
Writing A Global Variable.
hey guys, im trying to make a back button in flash and i wrote a variable on each page
_global.sci=about;
_global.sci=contact;
etc.
so that the page knows the previous page,
now to write the variable i use this code
trace (_global.sci)
but how do i write this into a gotoAndPlay line of code without using ""
and also the if statement would go something like this wouldnt it?
sceneid = trace (_global.sci)
if (trace (_global.sci)<>""){
backbtn.onPress = function() {gotoAndPlay('sceneid', 1);
}
} else {
backbtn.onPress = function() {prevScene()
}
}
cheers guys
thanks in advance
View Replies !
View Related
JAVA Writing A Flash Variable?
Hi all,
This is my first post here (I'm a photoshopper)! I am trying to get JAVA to see and then write a flash variable. It's a simple thing - I think. I am running SlideshowPro which outputs a variable
my AS code:
var ImageNumber = new Object();
ImageNumber.onImageData = function(eventObject):Void {
trace(eventObject.data.number);
};
my_ssp.addEventListener("onImageData",ImageNumber) ;
So I have the variable (checked in the output window), now how do I get JAVA within the HTML that the .swf is embedded to see and then write the var (ImageNumber)?
I have really tried hard to find this answer and understand it. Help my little brain - please.
Thanks for any reply,
Craig
View Replies !
View Related
Assigning / Writing The Contents Of A Variable
strange question
so im defining a set of complex movieclips with onPress and onRelease etc using an array of them, and then looping through the array and giving them all the same code.
the only problem is in the code for my buttons is one piece that needs to be unique for each button. when i assign all the buttons with N they get the code N instead of what N really is.
i need to hardcode/write the actual value of N into their onPress function instead of just the variable N. is there any way to do this?
i cant really think of anything clever...
View Replies !
View Related
Writing A Variable That Sets Doors To Open And Close Upon The Click Of A Button
Ok so i'm working on a project that has a number of doors. Once you click on a door I have a movie clip that allows each door to slide open. Now my quandary is that I would like to have an active door close upon either a click on itself or another button attached to a different door movie. I have about 10 doors. I'm not sure if i described this very well, please ask feel free to ask me questions if I didn't explain this well enough.
Please please please help me!! I'm stuck!
View Replies !
View Related
Text Effect (Writing Text 1 By 1 [small Problem ;)])
i was thinking of writing this, like so
Frame 1
Code:
msg.text = "A";
Frame 2
Code:
msg.text = "Ah";
Utill this
Code:
msg.text = "Ah yes, "+ _level0.playername +" I knew that was it.
Do you know who I am?";
But as you can see there is a varuable (user inputs his or her name),
so how do I write it, if I dont know that value and the amount of characters?
View Replies !
View Related
Trouble Writing Text To Dynamic Text Box
I am using Flash MX (6.0). I am trying to display some text in a dynamic textbox. In my first frame a have a routine that imports and parsed a csv file into an array. After completing the array, the playhead goes to frame 2 where I am just trying to assign a value to a dynamic text field. I don't think it should be this difficult. Here is my actionscript. I have also attached the fla. Thanks!
First frame (creating array):
code:
stop();
// Initialize variables and constants
var _fileload = new LoadVars();
var full_array = new Array();
var DIR = "pix/";
// Start the data loading
_fileload.load("csv.txt");
// Functions
_fileload.onData = function(txtfile)
{
var temp1_array = txtfile.split('
');
for (var i = 0; i < temp1_array.length; i++)
{
var temp2_array = temp1_array[i].split(',');
full_array[i] = temp2_array;
}
gotoandplay(2)
};
Second frame (assign part of array to dynamic field):
code:
stop();
// Populate listbox
for ( var i = 0; i < full_array.length; i++)
{
listbox_lb.addItem(full_array[i][0]);
}
// Add some text
title_txt.text = full_array[0][0];
View Replies !
View Related
HELP With Writing Text On External Text File Using PHP
Hi,
i need some PHP code and Flash AS for updating my news on my web site.
My flash movie loads text on dynamic text field from external text file.
I've made Admin CP where the text fields are Input Text Fields, where i can write/change the news. I need PHP file who can write/replace the text to the text file, and AS for flash.
I want to be able to replace the news in my external text file directly from the web site (AdminCP), not downloading the text file to my PC, than replacing the text and uploading again.
Thanks!
View Replies !
View Related
Writing Text
Does anyone know how to make a word look like it's being written out by hand? Sorry, it's kind of hard to explain.
Example:
Say I wanted to say "Hello".
Then H
E
L
L
O
would be written out as if I'm actually writing it down on a pice of paper.
Any ideas?
I have Flash Pro MX 2004
View Replies !
View Related
Self-writing Text
Anyone has any idea of how to create code for "self-writing" text? or what's out there that can be used?
Basically, I'm creating a little flash book and I want the letters to appear as they are narrated. Since there's so much text, doing it with masks would be a pain. So I'm looking for a code, doesn't need to be perfect, just give you that sensation that words are being written while they are spoken.
View Replies !
View Related
Writing Text
This is kind of a nice effect for forms. When you click on a text field that has the default text for the text field in it, the next is taken off in a "write-off" fashion. Deselecting an empty text field will cause the text to be written back on. However, text that the user types in will remain in the field. The speed that the text is written off at is easily adjustable and the default text can be changed anytime.
Example
The source is in AS3 but I will happily post some AS2 or AS1 if people want it. Hope this comes in handy
View Replies !
View Related
Text Writing
can i create text that will write itself, but not use standard font? also, could i put that at an angle?
i know you can do like letter by letter, but i want it more realistic, how would i go about doing this?
any help would be great. thanks.
View Replies !
View Related
Writing To Text Files And PPC
hello all,
i need to know if u can write to text files i.e save a text field to file...is the a command like load variables?
I need this to work in flash 4 as i am working in the pocket pc flash environment....
Also anyone doing dev on the pocket pc flash? interested to know u...
maybe we can exchange stories...
Alvin.
View Replies !
View Related
Writing A Text.txt On MAC/Apple
Is it possible to write a text.txt on MAC/Apple Computer as seen in lot of these Calendars???
I know that it is possible using the EXEC-Function and FS-Command but it doesn't work a Mac/Apple Computers...
Is there any solution for this ???
Thanx in advance
Mark
View Replies !
View Related
FMX Writing Text Files?
I was just getting ready to buy flash jesters jsave and netcheck, when I saw the flashmx announcement. WIll MX proivide the facilities to do these things from a flash projector?
1. check for internet connection.
2. write a text file.
I am building a desktop app that will load data from our live site and display it, but I need to be able to write to a text file on the hard drive so I can show the latest possible info (written to text file at time of last connection) if they are not currently connected. Hope some one can/will answer this... trying to save $300 (money is short here as everywhere).
Thanks in advance
Felix_Man
View Replies !
View Related
Writing To A Text File ---help
i need to have flash write to (update) a text file everything will all run local. flash swf/exe and text are all on the same machine this will be a local presintation.
this will be communicating with a visual basic app.
help!!!!!!
please call i f you cant explane
714.372.5344 huntington beach california
thank you
View Replies !
View Related
Writing Text Into A Dynamic Box... (v5)
The situation-- Trying to develop a small Flash app that simulates the Oblique Strategies deck (http://www.rtqe.net/ObliqueStrategies/) ... which should be a relatively simple task, right? So here has been my approach so far... Set up the stage to initially have a blank space where the "card" will be dealt with room enough for a masthead and the button that "draws" the card. The "card" is actually just text written into a dynamic text movie clip template stored in the library (exported/linked & all that good stuff)-- So anyway, the stage is set and the library has this dynamic text template in it. Now here's my script that should make the whole thing run:
====
stop();
#include "obliquedeck.as"
function drawCard () {
// remove the prev card, if there was one
obliqueCard.removeMovieClip();
// determine the next card
var obliqueText = strategies[randomCard()];
// draw the next card to the stage
attachMovie("cardTemplate", "obliqueCard", 0);
obliqueCard._x = 175
obliqueCard._y = 150
obliqueCard.cText = obliqueText;
}
function randomCard () {
// determine the length of the array
// and thus the bounds of the randomness
var n = strategies.length;
// randomize
Math.floor(Math.random() * n);
}
// and the array is stored in that "obliquedeck.as"
// file looking something like this...
strategies = ["string1","string2","string3","etc."];
===
And yet Flash doesn't seem to draw the text clip (or fails to assign the text to the clip and draws an empty clip) . . . did I miss something tremendously obvious?
cheers,
-r
View Replies !
View Related
Writing Out Text Effect
I was wondering if anyone could help me with an effect I am trying to do. I am trying to make a circle look like it is being drawn out. Can anyone provide me with a link for a tutorial? Can you make a mask follow a motion path too? thanks again.
View Replies !
View Related
Writing To A Text File
Can Flash's Action Scripting write to a text file and read from the same file like a sort of database? Can the Action Script also append more data to the text file? If so, can someone point me to a tutorial or Web site tutorial illustrating the techniques involved?
Thanks in advance,
Chris G ~`^%
View Replies !
View Related
Writing To Dynamic Text Box
Hello, I've made an mp3 player with a list of songs. Each song is a button that streams the mp3 associated with the button.
What I want to do now is make a dynamic text box that will show what song is playing. I have a book and have figured out how to do this with a text file.
Is there a way of doing it without the text file so that once the song button is hit it will write to the dynamic box the text I specify?
Thanks
Brian
View Replies !
View Related
Writing Text Files
I'm doing a project where by it would be extremely helpful if options that a person selects in a flash movie file could be saved into a .txt file (...or possibly a cookie if necessary) so that when the movie is closed and then reopened, the previously set options are used to dictate variable settings.
If anyone knows how to write variables to a file, it would be very much appreciated?
View Replies !
View Related
Writing To A Text File? Can It Be Done?
Can Flash when published as an EXE or a web based SWF write to a Text File?
If so does it add to the existing text or over write it?
Can Flash create a New text file to write to?
Just simple yes or no is fine but if you know how one or more of these things is done a description of how would be fantastic!
View Replies !
View Related
Writing To A Text File
Anyone know of a tutorial available that will allow me to write from an input form to a .txt file? I have PHP, and ASP available to process it.
Basically, I just want to write one variable's contents into a text file. Shouldn't be to difficult but i cant find any resources out there.
Thanks
View Replies !
View Related
Writing To A Text File
i am making an application that is stored on a CD. the user pops in the cd and d-clicks the main SWF to start the app. i need to read/write to text files. id be stupid to assume that the client machine has a specific backend script -- how can i do simple writes to a text file in this situation?
thanks
View Replies !
View Related
Writing To A Text File
I have set up a movie so that 4 text boxes read variable's from a text file. Here is the code:
Code:
&date01=01/12/05
&title01=The Weeping Camel
&blog=
&time01=2:48AM
This is what is contained inside the text file.
Code:
loadVariablesNum("December.txt", 0);
This loads the variables. This all works fine. I am trying to write from an input text box back into the the text file. Can anyone please help??
View Replies !
View Related
Writing Text On Screen?
Did this on one of my first flash projects, and I've still got the .swf file and I know I used a mask to reveal already written text--but I'm jiggered if I can remember exactly what I did.
Have searched the forum under every variation of "writing/revealing text/letters on the screen," but could find no tutes.
Thanx heaps, y'all, for your attention and help.
View Replies !
View Related
[F8] Writing Text To The Screen
I am trying to write text to a text box but I cant seem to change the size, color or any attributes but position. I update it with this line.
I update it from a movieclip script ( doteater movieclip ).
_root.mytext.text = _x;
The fla is included as an attachment.
Code:
function CreateTextBox()
{
_root.createTextField("mytext",_root.getNextHighestDepth(),100,100,600,400);
mytext.multiline = true;
mytext.wordWrap = true;
mytext.border = false;
mytext.color = 0xffffff;
//mytext.border = false;
//mytext.size = 24;
//trace( mytext.size );
myformat = new TextFormat();
myformat.color = 0xffffff;
myformat.bullet = false;
myformat.underline = true;
myformat.size = 16;
mytext.text = "";
mytext.setTextFormat(myformat);
}
View Replies !
View Related
[F8] Writing To A Text File
I am creating a game of "snake" and need to be able to write the end score and the name of the person who played the game to a text file in the users documents, as the end file will be a .swf for an assignment I was wondering if this was possible and if so, what code I would have to use.
The code I am using for the game is similar to this code: http://www.strille.net/tutorials/snake/index.php
thanks in advance if you can help.
steph.
View Replies !
View Related
Writing To Text File
could anyone please explain the most straightforward way to write variables from Flash 8 into a text file? from my Googling i discovered that certain fscommands could do it, but that this was an undocumented feature that only worked up to Flash 5 and with older versions of the standalone player.
the only condition is that the system of writing must work offline. presumably this means that a php script would not be the best solution? would something like javascript be able to do the job?
thanks in advance for any help.
View Replies !
View Related
Writing To Text File
Is there any way to write a text file on the hard disk (without using shared docs) using flash 8. I want to develop a simple application which will save and retrieve chracters from the text file.
Thanks in advance
View Replies !
View Related
Writing To Text Files
hi,
i'm tryin to make a survey and i want to write the collected information into a text file and save the text file. After that i want to load from the text file and display the results in a certain way...
can anyone help me?
View Replies !
View Related
Writing A Text File From A Swf?
I am trying to develop a Flash site with text that is editable from the SWF file. The editor could log in via a password > dynamic text fields become input text fields which could be edited and THEN I need a method for writing the information somewhere so it can be loaded back in.
This is a small brochure site and I think a database is a little over-kill, and too expensive.
Anyone have any suggestions of methods for writing to a text file? Is it possible (I mean easy) to write a text file from Flash?
(I have looked for tutorials, if there are any I'm missing them)
View Replies !
View Related
Writing Text Files
right i am current a relitive noob to flash, i know motion and shape tweens and not much action script, infact virtually nothing..
i want to place all the info from a text box, then pressing submit place this into a text file. is there a way to do this without using a external script php/asp/cfm/perl
View Replies !
View Related
Writing A Text File From A Swf?
I am trying to develop a Flash site with text that is editable from the SWF file. The editor could log in via a password > dynamic text fields become input text fields which could be edited and THEN I need a method for writing the information somewhere so it can be loaded back in.
This is a small brochure site and I think a database is a little over-kill, and too expensive.
Anyone have any suggestions of methods for writing to a text file? Is it possible (I mean easy) to write a text file from Flash?
(I have looked for tutorials, if there are any I'm missing them)
View Replies !
View Related
Writing To A Dynamic Text Box?
Just wondering if anyone knew how to have a flash program that you can wright whatever say "News" to a .txt file?
The way I have it set up is, you enter a password, then it loads a screen where you can update the news as you please. And is will wright over whatever is in the .txt file. Is this possible? Thanks in advance.
View Replies !
View Related
Writing Text Files
right i am current a relitive noob to flash, i know motion and shape tweens and not much action script, infact virtually nothing..
i want to place all the info from a text box, then pressing submit place this into a text file. is there a way to do this without using a external script php/asp/cfm/perl
View Replies !
View Related
Text Writing Animation
How do I create the text effect shown here where the text is being written on the screen: http://www.kiawahresort.com/golf/the-ocean-course/
Please could someone point me in the direction of a good tutorial?
Thanks.
View Replies !
View Related
Writing To A Text File
i am able to write to a text file within Player via a server script, ie. the Flash movie sends the value to a aspx page (for example) which in turn prompts the user to save the text.
just wondering could i do it entirely on the client side, much like what JSave does?
View Replies !
View Related
|