ActionScript 2.0 :: EVAL To Apply Text Variables?

Jul 19, 2003

I have a clip containing 8 MCs, named id1, id2 etc, each of which contain a dynamic text field with the variable thisNo. I want to run a loop that inserts each digit from a randomly generated number into each of these MCsPatID is the random number, IDLength is it's character length.

for (i=1; i<(IDLength+1); i++) {
thisNo = PatID.substr(-i,1);
eval("id"+i).iconNo = thisNo;

[code].....

View 6 Replies


Similar Posts:


ActionScript 2.0 :: Using Set And Eval Functions Setting Variables?

May 12, 2006

I'm having problems in setting three variables using a for loop and then passing these variables to my function. I think it's something to do with the set function I'm using, because my colorFadeTo function claims it's being passed an undefined variable.

Code:
for (var i=0; i<circles.length; i++) {
var current = circles[i];

[code].....

View 1 Replies

ActionScript 2.0 :: Looping Non-array Variables With Eval()

Sep 3, 2003

I want to do a for loop that grabs values from different variables. This function works nicely without the eval() statement (using the commented line below it) but not with it.

function saveData ()
{
saveUrl = "savedata.php?";
for (count=1; count<=numberOfVariables; count++)

[Code].....

View 14 Replies

ActionScript 1/2 :: Eval Or Array Push - Storing Variables And Displaying It?

Mar 9, 2011

I have a variable call php_variable that loads from the php. It echos all the necessary variables. I have 2 array, Tel_start and Tel_area. The messages.text is just a text field I use to test if things are loading properly.

[Code]...

It display the correct string. But when I use Tel_start[0] like above, I got undefined. So here, the actual quesetion, what's the proper way of storing those variables and displaying it?

View 9 Replies

IDE :: Make The Dynamic_text_2 Apply It's Text When The Text Is Been Typed Staying On Frame 1?

Aug 1, 2009

By typeing the text in the input box while staying on frame1, DOSEN'T show on the dymanic_text_box2 on frame 5?? How to make the dymanic_text_2 apply it's text when the text is been typed staying on frame 1?

View 3 Replies

ActionScript 3.0 :: Apply Text Format To Text Yet To Be Added In A Textfield?

May 10, 2011

I have a text field where user can type and few controls to customize the text properties like: font, size, color etc.If a user has typed say "Hello World", the caretindex is next to d of World. I want that if now the user makes some changes to the cusomization properties like: changes font size, then the text appearing next is of the font size set and not that of d. How can I do that?

View 1 Replies

ActionScript 2.0 :: Apply Text Effect (including The Blinking Underscore) To A Text Field That Loads From An External .txt File?

Sep 23, 2004

Does anybody know how to apply this text effect [URL](including the blinking underscore) to a text field that loads from an external .txt file.

View 6 Replies

ActionScript 3.0 :: Apply The Css To The Text?

Mar 18, 2009

I'm working on a number of pages that load external text files with buttons.That part works fine and I had the text marked up with basic html but would rather use css....I'm trying to figure out how to apply the css to the text:

here is the css

Code:
@charset "UTF-8";
/* CSS Document */
VIDEO, P, STRONG, LENGTH {

[code]...

the text loads but isn't formatted by the CSS

a. is the css code valid?

b. what do I need to do to get it to apply to myTxt?

c. when I load new text does the CSS have to be 'reapplied'?

View 6 Replies

IDE :: How To Apply CSS To XML Text Links

May 11, 2005

I want a xml text loaded in a normal textfield. I want to embedd the font to the textfield (so not in the xml file). I also want to add links to the xml text and change the look of the link with css. I just want a text file with links in it in Flash and want it to be possible to change it outside of flash so in a XML or text or html file i dont care. As long as I can make links in the text file without the ugly link stripe under the text (so it should be changeable with CSS).

View 10 Replies

Import Text And Apply Motion?

Sep 16, 2011

i would like to have a dynamic text that loads text from a *.txt file. This i know how is done, but the problem appears when i want the text-field to roll over the screen, as a motion tween. To be more specific it must be used for an infoboard, and people shold be able to change the "guests_today.txt" and then the guest list should roll over the display, over and over again.

View 1 Replies

ActionScript 3.0 :: Apply Two Different Colours To Text?

Sep 22, 2011

I have a text field that reads:"E 1-1"

can I apply two different colours to the text? "E" would be green, "1-1" would be black. Is it possible to do something like that through actionscript without creating two separate text fields?

View 4 Replies

Flash :: Apply Text Embedding To External Swf?

May 25, 2011

I am using Flash Builder 4 to implement embedded text, what I would like to do is apply this embedded text to a text field in an external SWF (.fla file using Flash CS4).

My code is like so:

[Embed(source='//lib//fonts//Tahoma.ttf', fontName='_Tahoma', embedAsCFF="false")]
private var embedString:String; // added for embed font
var format:TextFormat = new TextFormat();

[Code]....

I have set the fontFamily of the dynamic text field inside the .fla to a custom font and have the AnitAlias set for readability. The Custom font is set to 'Tahoma'.

View 1 Replies

ActionScript 3.0 :: Apply Fonts To Text In Other Classes?

Nov 24, 2010

I have a project that is running a lot of classes.

I define the font in the document class and it's working perfectly on textFields inside the document class.

But how do I access and embed this font for textFields in other classes?

View 0 Replies

ActionScript 2.0 :: Apply Single Animation To All Text?

May 21, 2011

i want to apply some animation (like fly from left) to all the character of paragraph text.for this, i have created a movie clip with only one character (suppose "A") and done some animation like first it flies from left then it rotates and gets fade off and on.Now i have a paragraph in another movie clip and of course it contains lots of characters (more than 200) so it is not possible to apply same animation to all the characters individually making layers.

View 3 Replies

ActionScript 2.0 :: Apply Actions To Text In TextArea?

Jun 23, 2009

I found a thread on actionscript.org that showed a way to load functions from text in a dynamic text box. It works using "asfunction". I tried it and it worked.However, load that dynamic text into a TextArea component and it doesn't call the function anymore! Is there a way to do it?

View 3 Replies

ActionScript 2.0 :: Text Resize Function - Apply It To Two Buttons?

Apr 6, 2008

ive got a text resize function and i want to apply it to two buttons so they both execute the function.the function is..

_root.largeTextButton1.onRelease = function() {
resizeText(hometext,14);
}

and

_root.largeTextButton2.onRelease = function() {
resizeText(hometext,14);
}

is there anyway i can do somthing like...

_root.largeTextButton1 & largeTextButton2 .onRelease = function() {
resizeText(hometext,14);
}

View 8 Replies

ActionScript 1/2 :: Apply A Texture To A Text Field's Fill Area?

Jan 25, 2011

I've seen that it's possible to format a specific bit of text in a text field with:setTextFormat(format:TextFormat, beginIndex:int = -1, endIndex:int = -1):void

I need to format a section of text by applying a texture to the rectangular fill space around the letters. (Imagine in Microsoft Word that you've written a short sentence and you highlight it. Then you fill the text background with a colour. Then imagine that that colour is a single repeating texture. That's what I'm trying to achieve.) Note that the text field must be multiline, and I'm not looking to fill the whole rectangular text field area. The applied texture needs to fit to each character. Is this possible in Actionscript? Would I need to use some kind of HTML or CSS formatting? Is it possible at all? If it is possible, is it possible to change the size of the fill area around the text?

View 10 Replies

Flash :: Apply SetTextFormat Function For Dynamic Text Filed In As3

Jul 30, 2011

i am trying to apply setTextFormat function for my dynamic text filed in as 3, but its not taking. look at my code and suggest me where i am going wrong.

[Code]...

View 1 Replies

ActionScript 3.0 :: Apply AutoSize TextFieldAutoSize On Text Located On Stage?

Jan 23, 2009

I have a movieclip, with a dynamic text inside.This movieclip is already on stage.I have found several solutions to this TextFieldAutoResize, however, most of them requires to create a new text before implementing TextFieldAutoResize.LEFT or right or center or .... etcIs there any method to apply auto resize on dynamic text which are already placed on stage?

View 8 Replies

ActionScript 3.0 :: Flash Apply Text Formatting To Select Words?

Jul 14, 2011

How would I go about applying the following text format only to the word 'the' (regardless of caSe) in my textfield?

Code:
my_txt.text = 'The cat jumped over the house.'
/// my format I want to apply
with (_light_S_fmt) {

[Code]....

View 3 Replies

ActionScript 3.0 :: Apply A Tiled Image Fill To Text To Create A Texture?

Feb 7, 2010

if it were possible to apply a tiled image fill to text to create a texture.

View 3 Replies

ActionScript 3.0 :: Apply Basic Text Formatting To TextField / XML Loaded Info?

Mar 8, 2010

I'm workin' on a cool project for school. I'm loading up some text from an external XML doc, and bringing it in to a flash textField.

It's working great, but I want to do a little formatting, first off, apply a bold tag or a bold font to some headings.

Here's the .text field as I have it now:

Actionscript Code:
motorcycleInfo.text = "Make: " + bikeMaker[evt.target.selectedIndex] + "
" + "MSRP: " + bikeCost[evt.target.selectedIndex] + "
" + "Ride Category: " + bikeCategory[evt.target.selectedIndex] + "
" + "Engine Size:

[Code]....

(ps I finally figured out how to wire up my mp3's so they play, and pause, I just haven't loaded that swf up to my server... so if you press the music buttons and they don't play, that's the reason.)

View 5 Replies

ActionScript 3.0 :: Apply Resizable Height/width Text Field To A Movieclip?

Jun 21, 2011

I'm trying to apply the code below to a movieclip, so that any text can be entered and the movieclip's height and width of its text field will resize automatically. Does anyone know how to apply this code to a movieclip? If you could write any sample code or make changes to my code that

[Code]...

View 1 Replies

ActionScript 2.0 :: Use Hittest And Eval?

Jul 24, 2005

when I use hittest and eval?

View 1 Replies

ActionScript 2.0 :: Using Eval For +/- Calculations ?

Apr 29, 2008

Basically I want to eval() a string like _level0.mc._x-=dist; where the "-" or "+" is a variable.You can paste this straight in and it should work.. only the last part (where it's doing the eval) doesn't.

Code:

this.createEmptyMovieClip("mc",this.getNextHighestDepth());
_level0.mc._x=200;
_level0.mc.createTextField("txt",_level0.mc.getNextHighestDepth(),0,0,200,200);[code]......

View 2 Replies

ActionScript 2.0 :: Shuffle Function - Apply Number To The Variable That Get Loaded From The Text File

Sep 23, 2010

I'm currently doing a board game, in which you get asked questions and answer them for points. the questions get loaded from a .txt file. what I'm trying to do is that the questions appear in a random order everytime the game starts. I already have the shuffle function working, it shuffles 51 numbers (the number of questions in the game) between 51 variables, so each variable is assigned a different number and they don't repeat. My problem is that I can't figure out how to apply those numbers to the variable that get loaded from the text file. I could make many IF statements but that would be a lot of code, so I tried doing a function, but it didn't work. this is the function:

[Code]....

View 2 Replies

ActionScript 2.0 :: Any Way To Eval String Into Array?

Dec 9, 2010

I have a response coming in from a server that contains a ton of strings that I need to eval to have them replace arrays already set as globals. So program fetches response, evals string into an array, and then we do stuff with the array. I've played around with little tests and can't get it working.

ActionScript Code:
var superArray= new Array('3','4');
var testArray="superArray=['1','2']";
function testEval() {
eval(testArray);
trace(superArray);
[Code] .....

View 1 Replies

ActionScript 2.0 :: Eval LoadMovieNum Is Not Working?

Aug 16, 2011

i'm new to flash programming. the code below is not working.[code]

View 3 Replies

ActionScript 2.0 :: Using Eval To Check Through All The Objects?

Feb 25, 2003

I was reading another query on this board about NOT using eval, as it had become deprecated, for attaching a name to a new MC. I have been using eval to check through all the objects, and to add ones with a certain name to an array.

for (i in this) {if ((typeof (eval(i))) == "movieclip" && substring(i, 1, 5)== "names") {

would there be another method of doing this using dot notation? sorry if this question seems a little muddled. I am new to flash, some things in it make a lot of sense and others are still confusing me.

View 3 Replies

ActionScript 2.0 :: Instance Name Not Eval'ing Correctly

Apr 28, 2003

I have a global map, when the user selects a continent it loads a seperat swf for that area. The continents grab variables from a database, and bring a bunch of variables into the movie.

One group is for the names of countries. It grabs the country name and it's 2 letter code. Then passes the country name to the local movieclip with that same instance name.

This works well for the most part. A couple countries don't load. Right now I'm looking at Asia. The country od Malaysia with it's code of "MY" produces errors half the time. Well most of the time.[code]...

View 1 Replies







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