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




(FMX) Random Text Question?



Hello, I'm trying to write some words with this effect but i can't..... can any one help to write my words with this effect... here is http://www.rootcode.co.kr/index.htm T.H.A.N.K.S



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 09-19-2006, 05:36 PM


View Complete Forum Thread with Replies

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

Random Background With Random Text File
I am trying to create a resizable flash file that will act as a background for my html/css website. Within the flash I want to have a script that randomly loads a jpg file from a specific folder on my server as well as a correlating txt file for that background. Here is an example of what I mean.

Say there is a movieclip named "background" and then a dynamic text area named "info" in the lower left-hand corner of the flash movie. I want a script to randomly load a jpg file (say 234.jpg) from a folder named "backgrounds" on the server. I also want it to load the correlating text file into the dynamic text area (234.txt) from a folder named "info". How would I do this and what would the script be?

NOTE: the names of the jpg and txt files would be 1.jpg, 1.txt, 2.jpg, 2.txt, etc.

Thank you for any help you can give!

-- K

Flash Script - Random Text Effect With Default Text Display
This is a dedicated thread for discussing the SitePoint article 'Flash Script - Random Text Effect With Default Text Display'

Space Age Random Generated Text Before Revealing Real Text?
How is this done?

http://www.rodec.com/site/content/home.asp

See how the text comes in as random generated text before revealing the real text. Its like that matrix or space aged thing happening.

Here are some code that I found, but don't know how to modify it to do this:

Code:

var str:String = " What is the answer";

var sInt = setInterval(writeIt,1);
var count:Number = 0;
var s:Sound = new Sound();
s.attachSound("type");

function writeIt() {
if(count == 0) {
s.start(0,1000);
}
theText.text = str.substring(0,count);
count += 5;
if(count > str.length) {
clearInterval(sInt);
s.stop();
}
}

I don't mind how this is setup though, it looks pretty straight forward, it just doesn't do that random generated text to reveal the real text and just do standard masking.

Space Age Random Generated Text Before Revealing Real Text?
How is this done?

http://www.rodec.com/site/content/home.asp

See how the text comes in as random generated text before revealing the real text. Its like that matrix or space aged thing happening.

Here are some code that I found, but don't know how to modify it to do this:

Code:

var str:String = " What is the answer";

var sInt = setInterval(writeIt,1);
var count:Number = 0;
var s:Sound = new Sound();
s.attachSound("type");

function writeIt() {
if(count == 0) {
s.start(0,1000);
}
theText.text = str.substring(0,count);
count += 5;
if(count > str.length) {
clearInterval(sInt);
s.stop();
}
}

I don't mind how this is setup though, it looks pretty straight forward, it just doesn't do that random generated text to reveal the real text and just do standard masking.

Fading Random Ordered Text From External Text File
Newb to flash. Watching various tutorials trying to come up to speed.

What I would like to create is a small flash ap that displays text in a randowm order from an external text file. I wantot create a small text box in the sidebar of a web page where customer references are displayed in random order. (so users dont see the same ones each time) I want the text to fade in and out as the next text item is displayed.

Can someone kindly point me to a resource that is close to helping to create this? Or; is flash the wrong way to go for this?

Curt





























Edited: 12/02/2006 at 12:22:31 PM by cwrig

Display Random Text Message From A Text File
How do i display a Random text message in Flash from a text file?

I want to do something like a "quote of the day" thing
so i need a random quote in the flash movie everytime
users call up the htm page in the browser.

Please help.

Loading Random/dynamic Text Into A Text Field
Hey everyone,

Could someone please help me work this problem out: When a user enters the website, it will pull text from some location (possibly an XML file) and load it into a text field. The trick is that I want it to randomly load a different chunk of text in each time the user opens the site. There are about 25 different small pieces of text I want to randomly load.

I'm thinking of using XML to store the 25 different text sentences, but am open to other ideas.

Thanks so much!

Random Text Effect With Default Text Display
Can somebody please send me a tutorial on this one. I think this is very cool effect.

Example of this can be seen at www.rob-dougan.com

Would appreciate it....

Loading Random/dynamic Text Into A Text Field
Hey everyone,

Could someone please help me work this problem out: When a user enters the website, it will pull text from some location (possibly an XML file) and load it into a text field. The trick is that I want it to randomly load a different chunk of text in each time the user opens the site. There are about 25 different small pieces of text I want to randomly load.

I'm thinking of using XML to store the 25 different text sentences, but am open to other ideas.

Thanks so much!

Setting Random Text Colours For A Text Box Within A Range?
How do you make it so that text placed dynamically within a text box is given a random colour that is specified in a colour array?

i need to apply it to this code:
Code:

var x:XML = new XML();
x.ignoreWhite = true;
x.onLoad = function(ok) {
   if (ok) {
      navigation = this.firstChild.childNodes;
      for (i=0; i<navigation.length; i++) {
         nav = _root.attachMovie("btn","btn" +i,i);
         nav._y = 5;
         nav._x = (i*85)+5;
         
         nav.btn_txt.text = navigation[i].attributes.text;
      }
   } else {
      trace("error loading xml");
   }
};
x.load("index.xml");

Random Text Message From Text File
i have a text file full of quotes.
i want to be able to generate a random quote in flash from that text file, how would i go about doin this??
Please help

Random Text From Text-files?
Hi,
im new in AS and i have a big problem. i want my movie to load text from textfiles and display they randomly.
i have a ready working way for flash-player 6.0 - but i want to publish my movie in 5.0

here is the AS for FlashMX.

System.useCodepage = true;
function zufallstxt() {
loadVariables("text"+Math.round(Math.random()*5)+" .txt", mytextfield);
}
setInterval(zufallstxt, 3000);


Here is my question:
Is it posible to have the same function in Flash5.0 -
i dont need the time-interval , only the random-function at the first frame of my object.

i hope my english is working

thank you for help

Starkeeper

Help With Random Text, Please
Hi guys
I’m trying to do something that’s driving me nuts. Most probably it’s not that difficult but I can’t make it
work.
What I’m on is doing a script that should create a text effect for any string of text in a variable.
The thing is quite simple: I want the characters of that text to appear random on the screen until they
complete the whole word or sentence.
What I’ve managed to do by now is making the text appear from left to right as if it was some kind of
type writting, but that’s far away from my wishes. When I try to use a random parameter the script
doesn’t work properly because I don’t know how avoid taking a character already used, and further more,
when to stop: if I use a loop in which the number of actions is set by the length of the string (in
characters) it doesn’t show all (as it repeats characters), on the other hand if I make the loop go on for 100
times it can build the whole string, but in my opinion there should be a better way.

Could you please help me?

Thanks a lot

Random Text - How?
I have a set of about 15 sayings that I need to have come up randomly.

So I'm think that I'd want to have a dynamic text box.

I'm thinking that I'd want an array to hold the sayings.

I'm thinking that I'd want a function to randomly pull out a saying form the arrray and assign it to the variable that the dynamic text box is using....

I'm thinking that I have no idea how I'd actually do this!!

Any help would be GREATLY appreciated - especially a bit of script that might get me pointed in the right direction....

Random Text. Help
I was wondering how to get a random text. For example: Having a random qoute in a text box and when you press a button it changes. I have all the quotes and things i just dont know how to make it be random. Thanks,
aaron

Random Text
i am trying to load random quotes into a text field ... could someone help. i started and i think i am on the right track but it does not work. code below


loadVariablesNum("text.txt", 0);
z = Math.random(2);
text=eval("text" + z);

Random Text
I want to make a dynamic text box. I'd use an external text document to contain everything and I want the textbox to randomly load something when the flash movie is brought up.

I don't want it to change every X amount of seconds, but load a random value and keep it until the browser refreshes or the person leaves and comes back later.

How would I go about scripting this?

Random Text
Basically I want to have a textfield duplicated over and over and over like 200 times within a masked area that are randomaly placed but slowly progress downward and are tilted either left or right but still right-side up.

I know that sounds complex but I know there's an easy way to do it with duplicateMovieClip or something. Anyway, I have an array of messages to use and I'd for them to be randomly chosen from as well.


So, in a nutshell have it look like phrases are just randomly appearing overlapping total chaos, you can't really read all of them but each one is slowly moving downward.

The hardest part is keeping all that wihtin a masked area....

Possible? Any help would be greatly appreciated. Thanks!

Random Text
is it possible to do a "quote of the day" type function in flash, using an external text file?

Random Text
Hi guys,

Imagine that:

Scene 1 - there is placed a button (1st frame). A button is linked to
2nd frame.

When you click the button it goes to the second frame and
there is a text for example (number1, number2, number3).

How to action script this? I want this text to appear
randomly after clicking the button. 3 different texts and
different places.

Any ideas? Thanks in advice.

Random Text
Does anyone know how to create random numbers or letters until it actually shows the actual text.

For example, I want the text to read "HOMEPAGE".
I want the letters to appear one at a time. For each letter I want a few letters to show up first until that one finally appears.

Any tutorial or help someone can give?

Random Text..?
i was wondering if i could somehow have random text appear at the top of a flash site..?

the text would be chosen randomly from an external file.

if anyone has any thoughts it would be greatly appreciated..

Random Text
Hi,

I am trying to make a code that includes a list of names (probably in an array I think) and displays one name in an input text field.
I'm still learning al of this so maby someone can change this code a little bit so it works:


PHP Code:



NumName = random(2);
pArray = ["test", "test2"];
inputtextfield = pIndex+NumName 




As you can see, I have no idea what I am doing...

Random Text..?
i was wondering if i could somehow have random text appear at the top of a flash site..?

the text would be chosen randomly from an external file.

if anyone has any thoughts it would be greatly appreciated..

Is There A Way To Create RANDOM Text?
here's the deal... i have this client who wants a screen saver like the flying windows thing, only with words from her book flying around... now, i can convert a flash movie with screen time - but how do i create the random text in flash to start with?

I was really hoping i'd just be able to pull it from a text file with each word on a sep. line or something... but it appears not... or perhaps i'm just blind which is not out of the question...

I could really use a hand on this, and would be willing to spend a little $$ to get it - she's not paying me much for this job due to the learning curve, but i'm happy to share if it helps get the job DONE faster.

thank youuuu!

Some Dynamic Text And Random Help/
So here I am again. I've got one dynamic text field that has about 5 different sayings that randomly change when a button is pushed. My code is :

<i>myArray = new Array();
myArray[0] = "0";
myArray[1] = "1";
myArray[2] = "2";
myArray[3] = "3";
myArray[4] = "4";
myArray[5] = "5";
function randText() {
r = int(Math.random()*5);
_root.display = myArray[r];
}</i>

The button code is:
<i>on (release) {
_root.randText();
}
</i>

Thanks to some people who replied to an earlier thread. But now the question is how do I get another text field to synchronize with this one. For example: Say I have some brain teasers and I want to display in the 'display' box and the answers in the other box. But they answers have to correspond with the question so it cant be random. Man, I need some help. Thanks.
Aaron

Random Text Messages
how can I display a set of text messages to display randomly at each browser loading? I want to do this in Flash MX and bring it into an existing browser
[Edited by lsaylor on 09-13-2002 at 11:59 AM]

Random Text Display
How can I have text display (a series of quotations) randomly in a browser? I want to create this in Flash, have the text display randomly on each browser load.

Random Text Display
I'm doing a series of quotations in Flash MX that must display randomly in an existing browser upon load. How can I get it to display randomly?

Loretta

Random Text Question
I have searched the forums here and looked through about 30 pages of threads! What I'm wanting to know how to do is this.
I seen a flash site that had the word "Initializing" flashing and then some random text and numbers started going acroos a small part of the screen like it was being typed and then it went to the next line and did the same thing etc.. down the side of the page and then it would stop(clear all visible) for a sec and start up again showing files and numbers etc..
It was just an effect, I mean it really wasn't loading anything! My question is how do you get this effect without actually MAKING a Frame for each letter displayed. Hope I'm exsplaining this right!

Importing Random Text
i'm wanting to make a who wants to be a millionaire style game and have all the questions in a text file.

i'm not sure how to import random text and also i need the correct answer to be held in the text file.

at the momnet the questions are just in the .swf its self and i'm using the

frame = Number(random(20))+2;
gotoAndStop(/:frame);

code, but it sometimes repeats the same question.

cheers for any help

Random Text Loader
How can i make something that would randomly load a certain line from a text. For example have quotes in a text file as follows:

Sun always blah blah
Grass is greener blah blah
Always a rainbow after rainy day

so that each time someone loads website it would load randomly one of these quotes? Preferably from a text file so to be easily changeable for my client...

Thanks in advance,
<- This is what i really look like except i dont like sunglasses and i have a nose

Random Text - Set Interval?
I've got a function that displays random text on the screen using phrases from an array. There are two problems I'm having.

01.
I have the text staying within the bounds of the Stage, but I'd like it to move from the center out.

02. (More importantly)
Right now the text just appears... it's going to be used as a transitional piece inbetween movies. Is there a way to use SetInterval so it looks like it's being placed individually and not as one solid mass??

It's also fairly CPU intensive, and using this for a preload movie is gonna hurt... if anyone has any adjustments or suggestions lemme know.

Here's the code... PLEASE HELP if you can:

Code:
messages = new Array();
messages[0] = "I'll trade you halos";
messages[1] = "the Hardest thing";
messages[2] = "Worth this train wreck";
messages[3] = "flesh & concrete";
messages[4] = "A great Pair";
messages[5] = "I'm permanant";
messages[6] = "You don't know Me";
messages[7] = "I'm someone";

function randomText(){
for(i=0; i<700; i++){
// -- Phrase
while(true){
num = math.round(math.random()*10+1);
if(num >=0 && num < 8){
break;
}
}

// -- Font Size
while(true){
size = math.round(math.random()*100+1);
if(size >=12 && size < 30){
//trace(size);
break;
}
}

// -- TextFormat
format = new TextFormat();
format.size = size;

// -- Rotation
while(true){
degree = math.round(math.random()*100+1);
if(degree >=15 && degree < 80){
break;
}
}

// -- Rotation Direction
while(true){
bool = math.round(math.random()*10+1);
if(bool > 0 && bool < 3){
break;
}
}
if(bool == 1){
rotate = "-"+degree;
}else{
rotate = degree;
}
// This is a mc with an empty textfield in it
this.attachMovie("_rtext", "rtext"+i, 100+i)
this["rtext"+i].message.text = messages[num];
while(true){
x = math.round(math.random()*1000+1);
if(x < Stage.width && x < Stage.height){
break;
}
}
while(true){
y = math.round(math.random()*1000+1);
if(y < Stage.width && y < Stage.height){
break;
}
}
this["rtext"+i]._x = x;
this["rtext"+i]._y = y;
this["rtext"+i]._rotation = rotate;
this["rtext"+i].message.setTextFormat(format);
}
}

randomText();

Random Text Headlines
Hi,

I'm designing a website and my client wishes to have 4 headlines randomly generate each time the page is visited... I know this can be achieved using HTML, but I wasn't sure if I could do it in flash. If so, I'll need help with the action script. Someone please help!! =)

thanks!!
rick
rickolus18@hotmail.com

Random Array Text
I'm very new to scripting.
I created an array with quotes and want to display them randomly in a text field when the uesr views. I searched the forums and found nothing usefull. This is my array of quotes.
How may I display them in a text field randomly?
the text field var is whichOne

var quoteList=new Array(6);
quoteList[0]= "Someday I want to be rich. Some people get so rich they lose all respect for humanity. That's how rich I want to be. Rita Rudner" ;

quoteList[1]= "My problem lies in reconciling my gross habits with my net income. Errol Flynn (1909 - 1959)" ;

quoteList[2]= "The first half of our lives is ruined by our parents, and the second half by our children. Clarence Darrow " ;

quoteList[3]= "People who say they sleep like a baby usually don't have one. Leo J. Burke" ;

quoteList[4]= "The power of accurate observation is commonly called cynicism by those who have not got it. George Bernard Shaw" ;

quoteList[5]= "When you have only two pennies left in the world, buy a loaf of bread with one, and a lily with the other. Chinese Proverb" ;

Random Dynamic Text
Hi everyone!

Just wondered if anyone out there could give me a hand with something simple (I'm a total AS nOOb!):

I would like to set up a button next to a Dynamic Textbox, which when clicked "prints" a random sentence from the text file linked to the box...I guess this will involve some kind of Array, but do not know how to start!

I'd be very grateful as always for help with this!

Displaying Random Text
Is there any way that I can get a text box to display a different message everytime you press a button. The different messages would already be pre-written obviously I just want to show them up at random when the button is clicked.

Thanks for the help in advance.

Loading Random Text
I want to load a random text, (a random line from an external .txt file if possible), into a dynamic text field each time a button is clicked...
can anybody help me?

Random Text Effect
hey,

download the file please.

i have 2 questions...

1. how can i make the effect happen by itself (meaning i wouldn't have to mouse over the button for the effect to happen, it would just start playing by it self.)

2. if i insert long text in there, it gets cut off. How can i avoid this?

Thanks.

Random Text Appear Effect
Hi, I was wondering how I would go about to make a button or mc where when you put the mouse over it, the it displays the text next to it, but each letter in the word appears randomly in sequence. So if I have a button for 'about' when mouse is over, it appears like _ _ o _ _>_ _ o u _>a _ o u _>a b o u _>a b o u t (without the underscore of course), but instead it's random every time. Any ideas? Thanks!

Random Spaces In Php Text
hello all i'm getting a wierd problem...

i'm getting paragraphs of text like so:

hello i'm line one
hello i'm line two

that was a break '<br>' now look at what i've done but if wrap on to the next live i'm fine but oh wait...

that was another break wasn't it? damn now i'm gonna do this again!

ok so basically after every break the next new line starts with a space. the text is going into dynamic html enabled text fields which have condenseWhite set to true; the php script which calls them (and send them to flash) runs the string through a trim() function & a nl2br() function.

i'm not sure why it's doing it but i am literally pulling my hair out over this one. grrrrr.

for example of what i mean go to www.dspmedia.co.uk and click login.

user: example@dspmedia.co.uk
pass: password

cheers guys(n gals)

Random Picture/text Without PHP
I was trying to do a banner with a random picture in the background, then a random quote or text in the foreground. My purpose in this is to have a picture with a different quote a good majority of the time. I've seen posts about doing it over PHP, but i'm trying to avoid that. I've figure out a way to do it but i have to specify how many pictures and quotes.

example
choice = Math.round(Math.random()*6);
switch (choice) {
case 1 :
location2.loadMovie("pic01.jpg");
break;
case 2 :
location2.loadMovie("pic02.jpg");
break;
case 3 :
location2.loadMovie("pic03.jpg");
break;
case 4 :
location2.loadMovie("pic04.jpg");
break;
case 5 :
location2.loadMovie("pic05.jpg");
break;
case 6 :
location2.loadMovie("pic06.jpg");
break;
}

Only problem i see with this is, if someone wants to add a picture later on, they have to edit the FLA.

Is there a way that someone later on, without the FLA file, can edit a text file or such and have more pictures rotated into the mix?

as in a bin that randomly calls pictures, no matter how many pictures are in it?

Also concerning the quotes. I want the same thing, but for the quotes to be called from a text file randomly. So again, someone can edit a text file, put new quotes in there, and it will be randomly called.


My apologies for the long post. Any help would be greatly appreciated. Thanks.

Random Text Header
I have created a banner (attached) and would like a selection of quotes to be randomly animated one at a time. How would I go about this?

[F8] Random Text Display
i want to have my quotes (text) display on a website
each day a different quote all store in the same folder on my server


can anyone help with a actionscript

Random Flying Text
Hi guys...

Has anyone come across any code that I can utilise to make the letters from a sentence fly around the stage and then gradually settle to form the sentence? I could obviously tween every single letter and have pretty much the same effect, but there must be some code out there that does something much cooler than this.

Any ideas?

Many thanks.

[MX][F8] Random Text Generation
Hello.
I am trying to test the theory that if an infinate amount of monkeys typed on a keyboard each for ever, then one will eventualy type a readable paragraph, or even a page.

Now, i know you can do this using flash actionscript.
The way i think you can do it is by using a variable called text, with a dynamic text box with that variable.
You would have to make a random number generate, from 1 to 27 (26 letters of the alphabet, and space), then flash would recognise the number then add the corosponding letter in the variable (1 for A through to 26 for z, and 27 for space)

How would i do this?

(have both flash versions, so i dont mind if you awnser using either)

Thanks if you can help.

~Tom

Random Text Retrieving..
I am a actionscript newbie so please excuse me if I am unclear or incoherent.

I was wondering if it is possible to call strings/text into a movieclip? The way I would like it to work is; everytime the movieclip appears on the main timeline it calls a random string/piece of text.

I have an animation with a repeating movieclip and I'd really like randomized pieces of text from a list (maybe an xml file) to be present every time the movieclip loops.

Random Text In Movieclip
Hi,

i have created 3 movieclips, which each hold a rectangle.
Here is what i need to be done:

Everytime the movie loads, i need to have a random text in each of the rectangles. Lets say i have 20 different text pieces. And everytime the movie loads, Flash has to pick 3 text pieces which will be placed in the 3 rectangles.

How is this done?

I hope you understand... Otherwise let me know and i will do my best to explain it furthermore.

thanks in advance!

Random Text From List
Hello all. I'm trying to make text in a box fade in with text from a list and at random sizes. The words are different every time you reload the page. This site has exactly what I want to do.

http://www.feeldesigned.com

Please help. I'm a newbie. Thanks

Random Text Fade On
Hello all. I'm trying to write a script that will choose a rondom word from a list of words and place it in a random location at random sizes. I also want the words to fade in. I know it's a lot to ask but im a newbie and don't know where to start. Thanks

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