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




Dynamic Textbox Name



Ive got this problem, with setting the text, of some textboxes made in a for loop. This is the code:

ActionScript Code:
for (i = 0; i<lengthXML; i++){    createTextField("textbox"+i, i, 100, 100, 100, 20);    textbox.text = question;}

Now the problem is, how do i get "textbox", to be called the same as the one created? Ive tried "'textbox'+i.text = question", but it just gives me an error.



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 09-30-2005, 03:34 AM


View Complete Forum Thread with Replies

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

How Do U Make A Dynamic Textbox With A Variable Textbox
well im really noob at this like i got flash mx 2004 professional a couple of days ago and well u know im still not getting how to use actionscript i sorta understand most of the drawing i know how to use motion tween real well lol anyways if someone could help me it would be great.

Dynamic Textbox _y Per Dynamic Line Breaks
I would like to feed variable character lengthed text data to text boxes in my dynamically placed buttons (touch screen kiosk). In my movies i am reading from either xml or db via FSP. I want the text in the text boxes (which label the buttons) to aways be centered in the button graphic, no matter how many lines. I imagine i would set up a conditional and set the _y of the text field per the amount of new line breaks that were dymically created by means of which are still a mystery to me..

Is there a way to achive this without manually adding "
" or whatever your prefered linebreaker is? I've done very similar things, but i've aways had to manually build and associate an array in flash to assure appropriate line breaking. Now i'm dealing with many hundreds of buttons and existing data (such as the strings i would like to label the buttons with)

this is one of, if not the last hurtle for me as far as how dynamic i want my projects to be...! please help!

btw, im using FlashMX

Scrolling A Non-dynamic-dynamic Textbox ;P
Hi!!

I want to scroll really crisp looking text. Static text is automatically anti-aliased by Flash.

Initially I thought I could convert the textbox from static to dynamic but the typical scroller I'm using uses a mask. It seems one cannot mask a dynamic textbox.

I know one can scroll a dynamic textbox if you populate the text dynamically but I dont want to do that.

Any other suggestions?

Thanks

What Is A Dynamic Textbox And How Can I Use One?
What r these text boxes and how would I use one to make a scoring thing for my game(its horrible dont ask) which is where a target is shot and falls. how would I make it add a point everytime a target was hit?
Thanx ion advance.

Dynamic Textbox
This may sound like a stupid question, but can you change the background in a dynamic textbox? If you can, I can't figure it out.

Dynamic Textbox
Does anyone know if it is possible to center text vertically in a dynamic textbox?

For example I have several dynamic text fields and they could be either 1 or 2 lines in length. I need these to be centered vertically with an image that sits to the left of them.

Thanks

Can't See Ï In Dynamic Textbox
I have a dynamic textfield and an external xml file. But when I load the text, some characters cannot be shown, for example ï. The characters look like a sqaure. I have this problem with every font. The problem appears with device and embedded fonts.
I am using flash mx, windows 2000.

Dynamic Textbox Help
I have a dynamic textbox. When the textbox's score is ,for example, 2, how do you make it so it the actual flash goes to the next frame
something like "if "dynamictext" == 2, _root.gotoAndPlay(2)" or something like that. Please give me the working code! Thanks in advance?

Dynamic Textbox
hello people.

this is what i want to do..

couple of links, when clicked display info in dynamic txtbox.
a dynamic text box which is scrollable.
the text box will display text and image.
there will be a movieclip animation behind the textbox execute whenever a link is clicked.

questions..

1,how do i add image to a dynamic text box?
2,how do i set the movieclip background to play when a link is clicked(txtbox info changed)?

thanks

Dynamic Textbox
can anyone explain to me how to create a dynamictext box or point me in the right direction? i am tring to create a user defined body of a website. i.e. the visitor inserts what he thinks the opening should be.

Dynamic Textbox
im using dynamic textboxes inside MC's in my swf's (coz the text appears more crisp). script of MC looks something like this:

Dynamic Textbox
I was wondering if there was a way to have a single variable that can contain text given to it depending on actionscript. i.e. _root.Text="abc" ((I'm not sure about the scripting... I tried everything from Text=abc to Text=String(abc).))

As in, there is a variable Text, and I can create a Dynamic Textbox that recieves data from that variable.

So far, I have figured out that the textbox works, since I made an input textbox and it worked, so I'm hoping this is only a scripting problem.

x-x;; I'm trying not to have a bajillion movieclips for each of the cinematics... If there is a better way to make textboxes for FMV, ignore this question and share.
---
x-x Unfortunately, Text is in Variable, and All Characters is set. What should my scripting be? And will it work if the scene is stopped?

Dynamic Textbox
Is it possible to dynamically set the text alignment of a dynamic text box. I want to make a roulette scoreboard and want the numbers to be aligned left, right or centre depending on the colour.

Xml And Dynamic Textbox
hello
i'm loading some data from an xml file and placing it in dynamic textboxes, but there is a problem with chars like á é í etc. they are displayed as a square char, when i set the text from the actionscript source (hardcoded) they are displayed fine

what can i do to have á é ó etc. chars displayed as they are when pulling them from an xml file?
thank you

URL In Dynamic Textbox
Hello, I am populating text boxes in Flash using PHP and MySQL. I have a url entered into the database, for example <a href="http://www.mypage.com" target="_blank". But the textbox, even though it is dynamic and I have the HTML button selected, shows the HTML code. How can I post a url from SQL to PHP to a Flash duynamic, HTML enabled textbox?

This might be a PHP question.

thanks

XML In Dynamic Textbox Help
Hi,

i have an xml file which loads itself into a dynamic textbox. Everything works but i only get the last value, in this case: Mathijs Delva Fliz

As code:


Code:
package
{
import flash.display.Sprite;
import flash.net.*;
import flash.events.*;
import flash.text.TextField;


public class GDMXMLReader extends Sprite
{
public function GDMXMLReader()
{
init();

}
private function init():void
{
try
{
var req:URLRequest= new URLRequest("persons.xml");
var urlLoader:URLLoader = new URLLoader();
urlLoader.addEventListener(Event.COMPLETE, completeHandler);
urlLoader.load(req);
}
catch(e:Error)
{

}
}
private function completeHandler(eventObject:Event):void
{
var urlLoader:URLLoader = URLLoader(eventObject.target);
var xml:XML = new XML(urlLoader.data);
xml.ignoreWhitespace = true;
xml.ignoreComments = true;
xml.ignoreProcessingInstructions = true;

var txt:TextField = TextField(xml_text);
txt.multiline = true;
txt.condenseWhite = true;
txt.wordWrap = true;
txt.embedFonts = false;

for each(var xmlNode:XML in xml.person)
{
trace(xmlNode.@firstname + " " + xmlNode.@surname);
txt.text = xmlNode.@firstname + " " + xmlNode.@surname + " " + xmlNode.@nickname;
}

}
}
}
XML file:


Code:
<?xml version="1.0" encoding="UTF-8"?>
<persons>
<person firstname="steven" surname ="dobbelaere" />
<person firstname="lien" surname ="gvd" />
<person firstname="katrien" surname ="alli" />
<person firstname="luc" surname ="tjah" />
<person firstname="mathijs" surname="delva" nickname="fliz" />
</persons>
I'm using the for each line, so i don't really see why it only shows the last value! My trace shows all values..

Thanks!

HELP With Dynamic Textbox
please help!!!! I have a form on my flash website that grabs info from input textboxes and one dynamic texbox. I can grab the input data without any problems however I cant seem to grab the dynamic data using a php doc. What am i doing wrong.

Dynamic Textbox
hi

Im using a dynamic textbox using the global parameter. Inside a movie clip on a button i am using the the following code to update the dynamic text box

on (release) {
global.score = Number(score)+200;
gotoAndStop(1);
}

for some reason it is not updating the textbox, is this because it is in a movieclip?

thanks in advance

Dynamic Textbox
I am trying to write a paragraph ( its for school project ) and i am using dynamic textbox and variables. I linked a button with

on(release){
textbox = " .... "
}

to target my textbox, changing its text. The only problem is, I am trying to write an essay type format, which has several paragraphs within it, and if i have enters within the code, it screws up, like the example below.

on(release){
textbox = " first paragraph.
new paragraph goes here."
}

Could anyone tell me how i write in the dynamic textbox to allow it to have paragraph indents and spacing. thx!

Help With Dynamic Textbox
i want to create a textbox on my flash file that allows the users (UI) to key in the input such as setting the interval. can anyone be so kind as to help me with it.. THANK YOU

Dynamic Textbox
Hi,

I am working on flash editor using actionscript where user can drag the textbox control from left side menu and place in the screen,i am able to place that textbox and user is able to type the text in textbox.

Now my problem is once user type text into textbox and then select another control from left side menu and again he has to change some text in the textbox whcih he has placed in the screen , i am unable to activate that textbox again, he can edit the text in textbox and can rotate clockwise, anti-closewise etc... its just like a greeting card editor

Can any one help me on this

Thanks in advance

Vamc

Dynamic Textbox
I am trying to write a paragraph ( its for school project ) and i am using dynamic textbox and variables. I linked a button with

on(release){
textbox = " .... "
}

to target my textbox, changing its text. The only problem is, I am trying to write an essay type format, which has several paragraphs within it, and if i have enters within the code, it screws up, like the example below.

on(release){
textbox = " first paragraph.
new paragraph goes here."
}

Could anyone tell me how i write in the dynamic textbox to allow it to have paragraph indents and spacing. thx!

Dynamic TextBox
I have created a dynamic textbox in the authoring environment by clicking the text tool in the tools panel and dragging to form the textbox. I have set to dynamic textbox in properties.  I would like to set some text using actionscript
The textbox is called mybox_txt

I have tried using

CODEmybox_txt.text = "someText";

Help Me On Dynamic Textbox
Hi!

I just want to ask anyone if it is possible for a dynamic textbox to ouput an image. Ex: like the yahoo messenger, when u type " " then send it, an equivalent image of emoticon will be shown. Can this be also possible in flash using dynamic textbox? Please help...

R-Saint

Dynamic Scrolling Textbox
Hello,

Since you guys were so helpful last time, I'm hoping you can help me again. I have a scrolling text box that pulls up different text in every frame. The scrolling buttons and the up and down buttons work fine. Let's say I have frame 1 and some text. I scroll to the end to read all the text. I then click next to go to frame 2 which has different text. The different text shows up fine but the scroll handle does not go back up to the top. The handle stays at the bottom. How do I force it to go back to the top in every frame?

Thanks
[Edited by riazuddin on 09-10-2001 at 02:51 PM]

Dynamic Height Of Textbox
I've got a dynamic textbox, but I need the size (height) to change depending on the amount of text pulled inside of it (So I can scroll it correctly).

Any of you geniuses have ideas?

Thanks in advance!!!

Skewing A Dynamic Textbox
I have created a dynamic texboks, and skewed it using the transform panel, but when I opened the .swf file, nothing appeared.
I even tried to make a similar textbox inside a movieclip, and then skewed it, but when i opened this the text was still missing.
Is it possible to skew a dynamic textbox and keep the text visible????


->:::sviig:::<-

Masked Dynamic Textbox
take it easy for all hardcoders,
when i mask the movie clip that contains dynamic texts that not embedded i cant see them...
but i have to mask this movie clip and i dont want to embed fonts...
is ther anyway to do it?

Links In Dynamic Textbox
Hi,
I did a scrolling textbox in Flash 5 and can't figure out how to integrate a link in the dynamic text in the actionscript window. Any suggestions?

Help Dynamic Textbox With Scrollbar...
Hi!

I've got some problem with a dynamic textbox to which I added a standard scrollbar from flashMX. I tried to load the content from a txt-file with
"loadvariablenum("text.txt",0)"
but the text is not loaded whereas if I skip the scrollbar, there's no problem with loading the text.
I should tell that I have to use loadvariablenum because the loadvar-object seems not to be compatible with swish...

Thanx for your help!

Help Dynamic Textbox With Scrollbar...
Hi!

I've got some problem with a dynamic textbox to which I added a standard scrollbar from flashMX. I tried to load the content from a txt-file with
"loadvariablenum("text.txt",0)"
but the text is not loaded whereas if I skip the scrollbar, there's no problem with loading the text.
I should tell that I have to use loadvariablenum because the loadvar-object seems not to be compatible with swish...

Thanx for your help!

Dynamic Textbox Text
I was wondering if there was anyway to autosize the text in a dynamic textbox to fill the textbox. Or on the other had if the text is too big is there anyway to autosize it to shrink to fit in the textbox.

Im trying to change the text not the box.

Thanks

Tweening A Dynamic Textbox
How do I tween a dynamic textbox?
I have a character cycler, and I want to move the clip as it's cycling, and I want to fade it after it gets all the characters.
I can't move the movie clip because it gets duplicated, and it just turns into a big mess.

This is the code for the cycler:

onClipEvent (load) {
if (_name == "main") {
name = "thoriphes";
for (x=0; x<name.length; ++x) {
this.duplicateMovieClip("let"+x, x);
_parent["let"+x]._x += x*15;
_parent["let"+x].endLetter = name.charAt(x);
}
_root.alphabet = "abcdefghijklmnopqrstuvwxyz";
_alpha = 0;
} else {
cycle = true;
}
}
onClipEvent (enterFrame) {
if (cycle) {
if (this.letter == endLetter) {
++_root.count;
cycle = false;
} else {
this.letter = _root.alphabet.charAt(random(_root.alphabet.length ));
}
}
}

Can't Reference Dynamic Textbox?
This is how my project is set up:

I have a "Navigation.swf" that contains a MovieClip (MC) called "content". I load all of the individual .swfs inside of "content". We'Il call the imported .swf "Imported.swf".

I am trying to have it set up so that when the user drags one object onto another object it will display a message in a dynamic textbox. All of these items are located on the main timeline of the "Imported.swf". I have no problem referencing the movie clips (_root.content.<MCname> ), but I have tried several combinations and could not figure out how to path to the variable name of the dynamic text boxes. I know it works because i set it up to run by itself (not loaded into "content") and it works fine.

Any suggestions would be VERY appreciated.

Thanks!

Dynamic Textbox Not Scrolling Xml
I'm getting the text for my textbox via an XML document (XML.load), and then I have a loop setup where I pull out all the HTML text.

I cannot get the scrollbar component to work with this.

I've even put the parsed XML into a string var and tried to get it to display that way, but to no avail.

I've seen the link on how to create scrolling dynamic textboxes via the LoadVariables, but that will not work because i have to parse the XML before displaying it.

Any ideas?

Drag A Dynamic Textbox?
HI, I'm stuck.

I have a white rectangle (MC), which I will "card" here. The viewer will drag and drop that card.

Now, the viewer will come back to that same frame over and over, and each time there will be a different textlabel on top af that card, taken from an array, so there is a dynamic textbox on that card.

Ok, so far, so good. Now, when I drag the card, the textlabel has to move with the card offcourse.

I tried two options:
Put the dynamic textbox inside the card-MC. Then I can't get the text loaded dynamically from an array.
Drag the dynamic textbox together with the card-MC. I can't make it draggable, I tried to work with an box._x=card._x but that didn't work either.

Any solutions? I know I am missing something simple here :-)

Thanks,

Papermouse

Need To Get A Dynamic Textbox To Get A Certain Date
Hi all,

I need a bit of help with getting a dynamic text box to show me how long it is to a certain time.

What it is I'm going to have a text box saying how long it is to the start of the weekend, Friday 5pm to be exact. Ideally hours, minutes and seconds. I know it'll be getting it from the users computer.

The problem I have is that when it gets to Friday 5.01pm I don't want it to automatically reset to from zero until Sunday at midnight.

I appreciate all your help and hopefully you can sort me out with this one.

Cheers

gecko2

Dynamic Textbox And An Array
I have several Arrays populated with data from a RSS feed. I would like the dynamic text boxes I have embedded in a MC to filled by data from the arrays and change to the next node in the array every minute.

I am a complete newbie to flash and actionscript and have had a lot of help to get this far.

Any help would be greatly appreciated!

Unicode In A (dynamic) Textbox
Who can help me with a unicode - problem?

My Flash movie calls an asp routine which reads data from a msAccess database table. The data contains all kinds of characters (Chinese, Greek, Spanish, Slovenien, Russian, etc.).
Quit a lot of the characters don't show up in the (dynamic) textfield of the Flash movie. Most of them are transfered into questionmarks (?).

Is there someone who can give me a hint?

Thank you very much.

Theo.

Specifing A Dynamic Textbox?
hello!

So I have a text box that gets duplicated a number of times, where the names are mainButtonText1, mainButtonText2, etc... but what I can't figure out is how to specify them using a counting variable.. (so as to change the text in them from an external file) like I've tried a few things like;

("mainButtonText"+i).text=m1b+i;

and like with a '.toString,' type function but I am unable to come up with anything that works.. so anyway, if you know of how I might go about doing this i'd sure appreaciate the help;

thanks;
Neoteric

Dynamic Textbox To Array
Hi,

I'm trying to populate an array with numbers entered in a textbox by the user.

For example, the user enters numbers seperated by commas into the textbox and clicks a submit button. Each number then becomes an element of an array.

I know how to create and populate an array normally but have no idea how to do this.

Has anyone any ideas please?

Dynamic Textbox Formatting?
I'm trying to have something so that after you put into a box "buy a drink", the textbox above it will say "you spent 10 gold."however, I would like the "you spent 10 gold" to be in bold. Does anyone know if this is possible, and if it is, how?

Dynamic Text/Textbox
Ok, I have run into another issue with text fields. I have a button that when clicked should change the text in a dynamically created text field, by calling the function news(). However, it just goes blank. This tells me that the news function is being run, yet not with the expected results?

Button:

Code:
newsBtn1.onRollOver = function(){
newsBtn1.gotoAndStop(2);
}
newsBtn1.onRollOut = function(){
newsBtn1.gotoAndStop(1);
}
newsBtn1.onRelease = function(){
news(1);
newsBtn1.gotoAndStop(1);
}

News function:

Code:
function news(i){
test="this is a test";
this.eventdescription.text = test; //eval("_root.editor2Vars.description_". i);
}

Textfield:

Code:
this.createTextField("eventdescription", 9, 355, 184, 318, 180);
this.eventdescription.text = _root.editor2Vars.description_1;
this.eventdescription.type = "dynamic";
this.eventdescription.selectable = false;
this.eventdescription.embedFonts = true;
this.eventdescription.setTextFormat(_root.matrix);
this.eventdescription.multiline = true;
this.eventdescription.wordWrap = true;

Text In Dynamic Textbox.
Hi!

Strange problem on a client PC. In a dynmaic textbox the text in displayed with 3!!! different fonts. Any ideas? Flashplayer 7 is installed.

Any ideas?
regards

Dynamic Textbox Not Appearing
I have a dynamic textbox in branch.swf file. I intend to load branch.swf into main.swf. However, the dynamic textbox in branch.swf will not appear when loaded into main.swf. It appear when not loaded into main.swf though. How do I let the dynamic textbox in branch.swf to show even when loaded into the main.swf?
thanks

Html In Dynamic Textbox
i have an <img> image tag for my dynamic textbox html content and some words after the image. i notice that the image doesnt work like usual html files. when i put <br> after the <img> tags for some text, it doesnt break off a line and continued to be at the side of the image. i ignored that but when i upload the movie into the net to test, the text overlaps the image! is this how html works in flash? or i had done something wrong?
i have something like this in my html txt file...
<textformat><img src="myimage.jpg"><br><font size="15"><b>my text here</b></font></textformat>
whats going on?
thanks

Resize Dynamic Textbox
How can I get a dynamic text box to resize itself to fit the text I'm putting in it?

Thanks.

Dynamic Textbox Won't Stay
i am trying to create a scroll box.. but flash isn't letting me resize the dynamic text box so that not all the words fit in the box. After I fiddle with some of the multiline/no wrap and size options, i am finally able to change the size of the box. However, when i save the file, close it, then reopen it, the textbox has changed size so that all the text fits. Has anyone else experienced this? Is this one of those annoying flash bugs that i have to just live with?

Loading .txt Into My Dynamic Textbox
I'm trying to load my resume into my flash website
I'm loading it from a txt file that reads "resume=" followed by the html code for my resume. Nothing shows up in the textbox. So I gave up and tried just putting the html code inside the flash file as textbox="<html><title>..." and it still didn't work.
Can someone tell me what I'm doing wrong? Cause I'm about to stab my monitor...

http://www22.brinkster.com/bluekronos/homeredo.html to test what happens (click on resume in the menu)

http://www22.brinkster.com/bluekronos/resume.fla to download the flash file. I have actionscript at the beginning that loads the variables into level 6; this is because the whole resume.swf is being loaded into level 6, on top of homeredo.swf.

http://www22.brinkster.com/bluekronos/homeredo.fla
if you need the homepage to test it.

http://www22.brinkster.com/bluekronos/resume.zip for the html if you need it
please let me know if you need any of the other files.

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