Detect 'enters' In Textfiles?
Hey,
I want to make a little aplication that finds 'enters' in text... I've got a couple of text files, eacht with some characters on a whole bunch of lines: code: /*The textfile*/ as as gsd gs sa d eat hyare sfda rew afe h awert
Here's a rough example, I want to read the textfile in Flash and then save every line in a varaible (var1, var2, var3, enx... the name doesn't realy matter)
Is this possible in Flash? If not, will it work using Flash + another coding language like PHP?
Thnx, SaphuA
FlashKit > Flash Help > Flash ActionScript
Posted on: 12-12-2003, 08:05 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Acheive Animation Where Enters One Side Of Stage And Re-enters When Exits
Oh my goodness where is my vocabulary??!!!!
Im sorry i know theres a better way to describe what i mean, a word inparticular bit its on the tip of my tongue and .....
I have a few little moving animations, and i want them to continuosly.....move from left to right, in and out, one after the other in my movie, from left to right. Lets say its 5 shapes in a row and when the square exits on the right it reenters on the left anain, and its nice and smooth.
Any ideas how to do this?
I am urgently needed to get this done and the way im going about it now is too tedious to explain and im sure its wrong.
Thanks in advance
Cesca
Can You Have Two On Key Enters On A Single Movie?
Basically I have a password dialog box with a ok and cancel which have an on (release, keyPress "<Enter>") which work fine for when clicking with mouse however if you tab and press enter the cancel button then carries out the ok's actions.
Thought it would carry out the items actions in focus which is the one the yellow rectangle is over or is that not the case or are you just not allowed multiple commands testing for the one key press??
Any help appreciated
Get URL/user Enters Word
I'm in Flash 4 and I would like to do a Get URL that the user can add a sort of password to get to their specific folder.
I'd like to have a text box that the user can add their password to that when they hit the enter button will add onto the end of a Get URL command. The problem is, each user would have their own specific password.
Ex. Get URL ("http://www.mycompanyname.com/password")
This way it would take the user directly to what we've posted for them to view.
I've submitted this question last week some time but never did see it posted or get a reply by email. I must have made the question so confusing no one wanted to touch it...ha ha.
HELP!
User Enters Url, Like A Browser...
I have this code I found, which on the site which I found it, there was a working flash file that does what I need. The user enters a url and the button sends you there, like a browser address bar.
On (Release, Key: <Enter>)
If (url ne "")
If (Substring ( url, 1, 7) NE "http://")
Get URL ("http://" & url, window="_blank")
Else
Get URL (url, window="_blank")
End If
End If
End On
I'm using Flash MX and this code I don't think has the right syntax, but I dont' know how to fix it. I think too, that I'd rather keep in the input text bob "http://" so the script won't have to go through all of that if else statement stuff. I think I can't figure out how the button recognizes what is put into the textbox as the url to go to...
I'm sure this is simple. Please help. Thanks
Stacy
Character Goes Over Door Enters Building
I am in the process of making an RPG and I was just wondering what is
the code (or how do you) make it so that when a character "enters" a door he goes inside of a building. I was thinking of something like this:
The character would go over the door and then you would go to, oh let's say, frame 3. So then your character would move around in that building.
And when you exit it goes back to, frame 1.
Does anyone have some Action Script (or a tutorial!) for this. I would really appreciate it!
by the way. i am not doing a tile type RPG, just a man walking around, whom you can control.
Character Goes Over Door Enters Building
I am in the process of making an RPG and I was just wondering what is
the code (or how do you) make it so that when a character "enters" a door he goes inside of a building. I was thinking of something like this:
The character would go over the door and then you would go to, oh let's say, frame 3. So then your character would move around in that building.
And when you exit it goes back to, frame 1.
Does anyone have some Action Script (or a tutorial!) for this. I would really appreciate it!
by the way. i am not doing a tile type RPG, just a man walking around, whom you can control.
Character Goes Over Door Enters Building
I am in the process of making an RPG and I was just wondering what is
the code (or how do you) make it so that when a character "enters" a door he goes inside of a building. I was thinking of something like this:
The character would go over the door and then you would go to, oh let's say, frame 3. So then your character would move around in that building.
And when you exit it goes back to, frame 1.
Does anyone have some Action Script (or a tutorial!) for this. I would really appreciate it!
by the way. i am not doing a tile type RPG, just a man walking around, whom you can control.
After Preloader, Enters Wrong Scene
hi, annoying problem, would really love some help.
I created a flash site, which started to take too long to load, so i made a preloader.
The preloader works fine, but when it has loaded, it doesnt go to the next scene, it skips about 9 scenes.
the code for the preloader tells it to go to 'next scene'. Can anyone tell me why it doesnt.
I searched the forums for this problem, and found someone else wiv the same problem, they posted it about 3 months ago, but nobody has replied.
Can anyone help?
Enters In Externaly Loaded Txt Files?
Hey,
I'm loading an external txt file to input into a textfield, but I'm having troubles displaying enters.
When I put the enters into the txt file at start, like this:
Code:
&txt1=Line 1
Line 2
Line 3
Line 4&
It get's displayed like this:
Code:
Line 1
Line 2
Line 3
Line 4
How do I get rid of white lines?
I've also tried to use this:
Code:
&txt=Line 1
Line 2
Line 3
Line 4
And this:
Code:
&txt=Line 1<BR>Line 2<BR>Line 3<BR>Line 4
Both without succes. (yes html is on, because I'm using it for other stuff already)
Does someone know how I can fix this?
Thanks,
SaphuA
[CS3] AS1 To AS 2 Tabs And Enters For An Instructional Piece
Hello,
I'm trying to get this piece to work.
Basically it works fine until you get to frame no "4". Once you type in "data1" you should go to the next frame (5) but it just loads frame "4" again even though the answer is right. The same can be said for frame 5 and going to frame 6.
Basically, it's for a training form, to teach people how to fill in form codes correctly. So if they make a mistake, the form should promt them to type in correct answer, otherwise if correct they can move on. (of course this is just a terrible rough example, but just to give an idea of how it would work).
Updated flash files
form01.swf
form01.fla
A Plus In External Textfiles?
hi,
can anybody help me with the "+" I'd like to read it from external and show it as text but it won't be displayed.
tigerhasi
Variables In Textfiles
Hello evrybody!
I have a little prob with variables in textfiles.
I can read the variables in a textfile, the varibles are (for example):
&entrys=3&
&entry1=sdklaöghaög&
&entry2=446486&
&entry3=7d7d&
I'd like to put all entrys into another variable but i dont wont to write: text= entry1 + entry2 + entry3; I'd like to write something like: for (i=1;i<=entrys;i++) { text = text + entry(i). but it doesnt work!
i hope u can help me. thx
Multiple Textfiles.
I'm loading textfiles into a scrolling textbox, and i wanted to load different textfiles by using buttons. However it'd be really helpful to make the button change the textfile by sending a statement to the
scrolling textbox, i thought it would be this line here but i'm not sure how to do it
this.loadVariables("text.txt");
rather than changing the frame, to a different text file.
thx for any help in advance
RecordSet And Textfiles
Hey guys,
A client of mine wants a database for all there products ... but doesn't want to pay for the creation of a DB ... so I'm going to use a textfile as the database ...
But I'm a little confused ... I can't seem to figure out how it works ...
Can anyone point me to an example of one ...
thanks
Targeting URL's In Textfiles
what is the correct syntax for targeting a url from a text file?
i know this sounds stupid but i can't get it to work
URL,target="_blank"
Thast the code I am using but it just doesnt work
Random Pictures Each Time Someone Enters Site?
Two questions:
1. How do I make a random picture script so that each time a person enters the site a different pictures is at the top?
2. I am trying to make my site in Dreamweaver and I can't seem to get it right. My site stretch to fit the screen...I would rather have it set up like the http://www.atlantafalcons.com/ where they have a picture on the right side for monitors with higher resolutions. http://www.lonestarposse.com/ciscv41/
The falcons site also sometime has the random picture thing at the top.
Is It Possible To Preload Variable Textfiles?
Is it possible to preload variable textfiles? What i mean is when you preload a movie and inside that movie you want to load ext text files, will they be preloaded aswell?
I noticed when uploading my swf some times i have to press buttons twice before it will show the ext.text. That is not what i want !!
Hope some can help me out
THX
FD
Double Newlines In Textfiles?
I'm making a movie that reads stuff from a text file, but whenever I want a variable to contain a newline character, it ends up having two newlines in my movie. It's a big problem because I can't have a single newline show up in my variables. So for example, my text file looks like:
-----------------
stuff=Hello world
How are you
&eof=1
-----------------
and when I read this text file into my movie, the variable "stuff" is:
Hello world
How are you
so that when I put "stuff" into a text box it reads:
-----------
Hello world
How are you
-----------
How can I get it so that Flash reads only one newline for every newline in my text file (instead of 2)?
Loading Pictures And Textfiles
before i post my code i should note that the text file is fully loaded before the code is run, so thats not my problem
this code loads the contents of the text file into an array
Code:
var picArray = new Array;
for(i=1; i<=_root.galleryText.numPics;i++){
_root.picArray[i] = _root.galleryText["desktop" + i]
trace(_root.picArray[i])
}
the trace tells me that the array has been populated by everything it needs to be populated by
this code makes a gallery and loads the respective pics into each thumbnail
Code:
onClipEvent (load) {
var x = 43
var y = 10
for (i=1; i<=_root.galleryText.numPics; i++) {
if (i == 1) {
_parent.attachMovie("thumbnail", "thumbnail", 1);
_parent.thumbnail._x = 43;
_parent.thumbnail._y = 10;
_parent.thumbnail.imageMov.loadMovie("desktops/"+_root.picArray[1]+"thumb.jpg");
_parent.thumbnail.picName = _root.galleryText["desktop1"];
x += 143;
} else {
_parent.thumbnail.duplicateMovieClip("thumbnail"+i, i);
_parent["thumbnail"]._x = x
_parent["thumbnail"]._y = y
_parent["thumbnail"].imageMov.loadMovie("desktops/"+_root.picArray[i] + "thumb.jpg");
_parent.thumbnail.picName = _root.galleryText["desktop" + i];
if (i%2 == 0) {
y += 85;
x = 43;
} else {
x += 143;
}
}
}
}
now the thing is the last pic is loaded every time but no others, further more it doesnt say that undecided.jpg cant be found which means that its loading the other pics but not displaying them. When a thumbnail is clicked, though it says it cant find undecided.jpg
also the whole gallery is in a scroll pane and its larger than the scroll pane but the pane isnt making a vertical scroll bar and vertical scroll is set to auto, it didnt work on true either,
here is a link to the swf
http://petoria.thedrunkenclam.com/mu...st/najuah.html
once it loads press media to get the gallery
any help or ideas would be greatly appreciated
edit: and now the movie isnt loading at all, im going to cry myself to sleep
Can You Save Textfiles With Flash?
can flash make a textfile and save in the same directory as the .swf. Just like Loadvar but than save. Because i want to make a levelcreator.
Reading Up Textfiles, Need A Return?
Hi I read up textfiles into an array to create a photo gallery.
first field is the caption, second is used to find an image.
I use | to indicate a new entry.
Caption is in a HTML textfield in flash
here is a piece of a textfile
&ThumbListVar= AIWD Photo : Steve Jennings|Sheryl Crow 050|Safe %26 Sound Photo : Steve Jennings
How can I put a return in the textfile before "Photo" to make it a 2 line entry?
thanks
mark
Moveclips, Textfiles And Movement
Here's a tricky one, I hope not too tricky!
I have a .txt file, i want to take the contents of it (which i can do) and store it in a variable in flash (which i can also do).
Next I want my movie clip to follow the instructions in the variable (this is what i can't do).
e.g.
.txt file content - "move around in a circle"
flash variable - varA = "move around in a circle"
movieclip content - onClipEvent(enterFrame){
do varA ??????????????
}
I don't want to hard code the instruction ("move around in a circle) because it's going to be changed at different times.
Please Please Please Help, i'm going out of my mind!!
thanks
Problem With External Textfiles
I have a problem with scands. I load text to textfields from txt-files that have ä and ö characters. These characters appear just as some boxes. How can I get my movie to show them right.
Working With Interaction With Textfiles
Hello all,.. There is no use lying about it.
I am a newby in flash,...
I've been surfing this site for a while, searching for the answer, but no luck.
Ok this is the question.
I want to make a price list,..I ve made a file in notepad, and I loaded this in the first frame of the movie, it took a long time to figure that out,..but this I mastered
the file looks something like &a1=2.70&a2=2.20&a0=3.75
all are seperate products, a1,a2, and a0, and the prices
now the following is hard,...for me at least
I 've made 2 textboxes, a input and a output.
and if a user writes a1 in the input the price will appear in the outbox
so, I think somewhere in the movie there must be a code to search the txt file and a code to put the price in the outbox, can someone of u ,..point me in the right direction?
In what frame does the codes fit in?
Hope someone can help me with this.
REgards
Formatting External Textfiles?
When working with the loadVars object and an external textfile, is it possible to format the text in the textfile somewhat? It only seems to work when you write every var after the other separated by &, without any car. returns.
I'd love to be able to use a file that looks like this:
&name1=blabla
&address1=adress here
&hobby1=this is ones hobby
&name2=balbalba
&address2=numero two lives here
&hobby2=this is mr.two's hobby
&name3 etc...
Now all my txtfiles look like
&name1=blabla &address1=adress here &hobby1=this is ones hobby &name2=balbalba &address2=numero two lives here &hobby2=this is mr.two's hobby &name3 etc...
cheers !
S.
Rollover States In Textfiles?
Hey is it possible to have rollover's from a text file. Meaning when I load my text file into my flash movie, I have links in the text file? Is it possible to make the links turn colors when the user rolls over them? Also some of my links contain "&" in them. But this makes my text not load. Here is an example of my text file script:
<b><a href='http://contacts.gsa.gov/content.jsp?channelID=1006&smvp=1&cid=1'>General Services Administration Forms</a></b><br>
So i need Genberal Services to change to be red when I roll over it and my href URL is screwing everyhting up because f the '&'
PLEASE HELP!
Edit Textfiles From Flash Via PHP :)
Hello! I have a problem today, and that is making an update tool for my clients. It´s soppose to update a flash site built by loading text files into dynamic textfields.. Now I want to make a update tool that edits textfiles on the ftp.
I have found what I think would be a part of the solution ,and that includes PHP.
http://www.kirupa.com/developer/acti..._php_email.htm
Maybe it can be modified to edit a text document....
I wish....
Would LOVE some help, really think this will gain every webdesigner!
Edit Textfiles From Flash Via PHP :)
Hello! I have a problem today, and that is making an update tool for my clients. It´s soppose to update a flash site built by loading text files into dynamic textfields.. Now I want to make a update tool that edits textfiles on the ftp.
I have found what I think would be a part of the solution ,and that includes PHP.
http://www.kirupa.com/developer/acti..._php_email.htm
Maybe it can be modified to edit a text document....
I wish....
Would LOVE some help, really think this will gain every webdesigner!
Preloading Loading Textfiles
A site I am working on, mainly runs off textfiles. So some of them do have a lot of information. How can I send a message to the user that the information is loading instead of having a horrific blank textfield until the file loads?
Here's my code
ActionScript Code:
loadText = new loadVars();loadText.load("publications.txt");loadText.onLoad = function() { scroller.html = true; scroller.htmlText = this.publicationsText;};
I tryed a few different things but I was not successful.
Formatting External Textfiles?
When working with the loadVars object and an external textfile, is it possible to format the text in the textfile somewhat? It only seems to work when you write every var after the other separated by &, without any car. returns.
I'd love to be able to use a file that looks like this:
&name1=blabla
&address1=adress here
&hobby1=this is ones hobby
&name2=balbalba
&address2=numero two lives here
&hobby2=this is mr.two's hobby
&name3 etc...
Now all my txtfiles look like
&name1=blabla &address1=adress here &hobby1=this is ones hobby &name2=balbalba &address2=numero two lives here &hobby2=this is mr.two's hobby &name3 etc...
cheers !
S.
Showing Submit Button Only After He Enters Something In Textinput Field?
i have three input text fields ,where i want the user to enter three reasons for something.and i have a submit button below that.Now i donot want to show the submit button unless he has entered something(anything) in the third field,is their any way to do this??? something like checking the third inputfield variable for something and then showing the button..any suggestions???
User Enters Text Fields - Saves In Database?
I don't even know if this is possible, or how involved but...
I would like to create a United States map, where a user could click on a state to add his or her website. When they click on the state, a form comes up. They fill in the info and a little pin/marker automatically shows up in the State where they originally clicked. Then, other users can click on that marker and it will pop up a box with the info the person entered about themselves.
I'm guessing you would have to have some kind of database set up that flash can save to and pull from???
I know this is probably very complicated, but if anyone knows of a Tutorial that does something similar or if you have other ideas/comments... that would be great!
Counter Showing Countdown When Movie Enters Frame
heres the code Ive wtitten I know its ugly and it doesnt work any ideas I have to get this finished fast
onClipEvent (enterFrame) {
mySecs = 15;
min2 = _root.StartTime-_root.tNow/1000;
trace("StartTime="+_root.StartTime);
trace("min2="+min2);
curT = new Number();
curT = getTimer();
trace("curT="+curT);
curT2 = curT/1000;
trace("curT2="+curT2);
if (curT/1000<=_root.tNow/1000) {
mySecs = 15;
mySecs = mySecs+Math.floor(min2-curT2/1000+_root.tNow/1000-curT/1000);
trace("mySecs="+mySecs);
trace("min2="+min2);
race("curT="+curT);
trace("curT2="+curT2);
displaySecs = mySecs-_root.TimeNow;
_root.secs = displaySecs.toString();
} else {
_root.gotoAndStop("calc");
}
}
Setting Focus On An Input Field When It Enters The Frame
I can set the focus to a input field via a button using:
PHP Code:
on (release) {
Selection.setFocus("Name");
}
but how can envoke this without a button press? My animation plays and the text fields appear in the final frame and this is where I want it to setFocus. I tried Selection.setFocus("Name"); on the main timeline but that dont seem to work.
Cheers.
Setting Focus On An Input Field When It Enters The Frame
I can set the focus to a input field via a button using:
PHP Code:
on (release) {
Selection.setFocus("Name");
}
but how can envoke this without a button press? My animation plays and the text fields appear in the final frame and this is where I want it to setFocus. I tried Selection.setFocus("Name"); on the main timeline but that dont seem to work.
Cheers.
Load Textfiles In Specific Frames
hi!
I'm trying to load different textfiles in a dynamic textfield depend on wich frame is playing right now. When I load textifiles with buttons I use loadvariable but it don't seem so work at frames. I'm new at flash MX so it may be some difference from flash 5? I would be very glad if someone could help me with this problem.
/lemon_juice
Dynamically Include Actionscript Textfiles
Hi there, it's my first message on this forum.
Let's go straight to the point:
I'm using the #include directive to import actionscript into my MCs
#include "external_file.txt"
What if I want to dynamically include textfiles? I tried something like this:
#include "actionscript.asp?id="+id
but I was not successful. Include is always expecting a string, not an expression.
How do I solve this? I could not figure it out
Thanks everybody
Animated Text + External Textfiles
I'm a flash mx user and I'd like to know how to make a animated text, i.e text sliding in from the corner of flashfield, by using external textfiles. I know how to play with variables when it comes to static text, but if I try to animate it, (I put the textfield inside MC of course) I fail to make it work, it just doesn't show any text then.
Loooong Strings In Textfiles Mess Up Processing
hi,
i have long strings in text files (url encoded)
they are several 1000 characters long
when i try to load them into my movie, the player gets stuck for a looong time (one could think of the computer crashed)
this occurs, if a certain count of characters is surpassed
its on mac OS 9.1
i tried pepper and BBEdit to create the txt files
anyone had this problem before?
ae
How To Send Variables (string) To External Textfiles?
text from external .txt file via variable - help!
i want to load text from an external textfile into a dynamic textfield using variables inside the textfield (&example = text).
i already have the code for that
_root.bgtext.textfeld.htmlText = this.example;
which works.
but instead of "example" i want to use a variable from my flash movie
>> inside .txt file:<<
&text01 = text
>> in action script: <<
myvariable = "text01";
_root.bgtext.textfeld.htmlText = this.myvariable;
... which doesn't work. does anyone know how to send variables (string) to external textfiles?
thx!
eve
Loading Variable Textfiles On Button Press?
Hello
I have a small problem that I'm hoping you good people here would be able to help me with
I'm making a slideshow, that only changes when the user clicks either next or previous, loops, and reads it's pictures and text from external files.
Now, the first 4 bits was easy enough to make, but for some reason I can't get my head around how to do the text loading
My buttons, all script on frame 1 of main timeline (there is only one frame, everything should be handled from script) look like this:
Code:
buttonnext.onRelease = function(){
i++; //i is a global variable that is used to determine what image/text to load
if (i <=images){
loadimg(i+".jpg"); //loadimg is the function that loads images into a movieclip located on the stage, this results in for example 1.jpg being loaded
}
else{
i=1;
loadimg(i+".jpg");
};
trace(i);
};
So I want to add a bit here, like loadtxt(i+".txt") so that when you go to the next/prev slide, you get the text associated with that, from a text file using that. I figured that since flash has issue with loading txt with breaks in it, that multiple textfiles would be better to start with. At least since there will not be any immediate integration with any CM system.
My main issue is with the LoadVars object, I'm not sure how to use that in connection with a variable input :|
Thanks for your help
http://snake-oil.eu/temp/flashdemo/slideshow.html <- the running swf.
Invisible Enters Output=" %0D%0A%" While Reading Data From Php
Hello, i made a php file and returns this output: hello=ok in the internet explorer.
But in flash it outputs hello=ok%0D%0A%
If you look in the source of the internet browser you can see that there are invisible enters after the output text.
It seems flash converts this into code? But i can't seem to find any enters in my php file.
Is there a way to get rid of this %0D%0A% code?
The way i traced the output is:
function dataOnLoad(evt:Event){
trace(evt.target.data);
if(evt.target.data.hello=="ok") {
gotoAndStop(2)
} else message_txt.text = Error??"
}
IS There A Way To Save Text A User Enters In A Input Text Box?
I'd like to create a movie that allows for cumulative input from a user.
That is, perhaps there are instances of input text boxes stacked in a corner of the page.
Then the user comes along, grabs one and pulls it p and writes in it.
Then that text is saved so the next user sees it AND can respond to it.
Maybe this can't be done or can't be done by a beginner?
Thanks in advance.
To Detect Or Not
Here's my dilemma. I want to start a MC once another moving MC reaches a certain position. I tried detecting the _y position of the moving MC through a button action. (press button, if (_y > 20) goto) Simple right? Well, it doesn't work. Now I'm wondering if it doesn't work because the action is attached to a button. Or if I should use collision detection. Any advise from all those flash guru's out there on the best way to do this.
I'm willing to send out the fla if necessary.
-Casper
How To Detect The
Speed = ( _level0.getBytesLoaded()/ 1024 ) / (getTimer() / 1000)
isn't working or not showing the correct speed
How To Detect
HI everyone,
I have made a form and wann to check valid data i.e if alpanumeric value is req. user cannot enter numeric value and vice versa. I found no inbuilt fn. in flash which could detect whther the entered value is string or numeric.Now how should i check this ..pls. help
MX Detect
How are you detecting MX player. Is their a componet that I just didn't see at MM site.
|