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




Little Textbox Problem



Hello,

Say I have a text box and the user pastes this into it :

textbox1=Hello how are you&textbox2=I am fine

And then they click a button.

How will I get that values to accually take over the variables in flash? Seeing that there is already two textboxes with names : "textbox1, textbox2".

Thank you.



FlashKit > Flash Help > Flash ActionScript
Posted on: 01-13-2004, 09:04 PM


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.

TextBox._height Textbox Size?
Maybe someone can help -
How can I change the height of TextBox_size (MC). Is everything controlled by the movie size?

I put the scrollbarDynamic7.fla at http://www.bitweb.com/test for reference

TextBox._height = TextBox_Height;
function springAction () {
scrollpos = -scroll._y;
ratio = (content._height - TextBox_Height) /(TextBox_Height - scroll._height);
NewPos = Number((scrollpos*ratio));
difY = newPos - content._y;
addY = difY / 5;
overshootY = overshootY + addY;
content._y = content._y + overshootY + addY;
}
function easeOut () {
scrollpos = -scroll._y;
ratio = (content._height - TextBox_Height) /(TextBox_Height - scroll._height);
NewPos = Number((scrollpos*ratio));
difY = newPos - content._y;
content._y = content._y + difY / 3;
}

Cheers

Kobus

Textbox Changes To Input Textbox.
Here my code is working inside a for loop which checks inside the XML files and retireves the content...I am not writing the loop here......because there is lots of code inbetween so you don't get the correct idea.

var textmessage = importXMLtemplate.firstChild.childNodes[j].attributes.message;//message contains the text

var TextBoxName = "TextBox" + j;

template_mc.createTextField(TextBoxName, 10, 100, 100, 165, 30);
template_mc[TextBoxName].styleSheet = myCSS;//stylesheet I called above not writing here.
template_mc[TextBoxName].html = true;
template_mc[TextBoxName].multiline = true;
template_mc[TextBoxName].htmlText = textmessage;



template_mc[TextBoxName].type = "input";


Here the message is showing inside the textbos properly loading form XML. The only problem is that the textbox is not changing to input text box.

I want to change the text box to input text box and change the value inside the text box

please help...

Using .txt In A Textbox
ok im trying to get some text from a .txt file into a dynamic text box. how can this be done?

and im using flash MX

End Of A Textbox
Hello All,

I am having a problem finding a script example to detect if a scrollbar has reached the end of a textbox. If anyone knows or has an example, I would apreciate it if you could post it. Thanks.

Bill Van Pelt

Textbox
I need to be able to display a Microsoft Word doc within a dynamic textbox. I would like to do this without converting the word doc to a txt file. Is this possible.....

Using <img> Tag Into A Textbox
I would like to know if it is possible to use the "<img>" tag when loading html text into a textbox...

The thing is that I'm designning a page where I need load some dynamic text with images according to the text next to it.

Is it possible, or is there another way to do this?

Thanks, Francisco

.jpg In Textbox?
Hello,

Please help! Is it possible to put some .jpg's in a textbox area so the user can scroll them?

Tnx

Add 1 To Textbox
if I have a textbox with a value of 1 and I want to set a command to add 1 to it, so its new value would be 2, what do I do ?

Because if I write text.text += 1; it returns 11

thanks

Textbox
Hello

can you help me. I have a problem?

The problem is I have a textfield with a scrollbar I need the script to refresh te scrollbar every time you click on a different button?

help me?

Textbox ?
Hi,

I have two textbox questions. The first one is. I have a input textbox. I want the textbox to default to zero if it is left blank. How do I do this?

The next question is I have a dynamic text box. The text box displays a calculation like 7.89903872676. I want the text box to only display something like 7.8990. How is the best way to do this? Thank you very much in advance for any help with this problem.

Thanks,
Jon

Textbox's
Hi, im trying to create a order form. in one frame i have 3 input text boxes named houseNo, street, postcode. I want to collect all the data inputted into these in to a dynamic textbox on another frame after clicking a button. Im sure one of u could help me as im very new to flash?cheers

[F8] Textbox
Whenever I test my movies, the text is cut off. Why?

Put A Textbox Above Anything Else
I have some movieclip and one textbox (dynamic text) but my movieclips hide so I can't see the text.

I have put the layer that have the text on top beside timeline but nothing happend.

Is that any way I can put the text above anything else with actionscript??

Textbox
Hey

Im using the following code on a button to take me to a certain scene depending on the number in the dynamic text box

on(release){
if (_global.check.text == 1) {
_level0.gotoAndStop("Pot_Con_Store");
} else if(_global.check.text == 0) {
_level0.gotoAndStop("Con_Store_Quiz");
}

}

The button is in a movieclip, but for some reason it just keep goin to the same scene regardless off the textbox.

Please could someone help im really stuck

Thanks in advance.

Textbox Help
um... how do I make a textbox with many links in it?

Textbox To Textbox
Hello,

I need to pull in a .txt file and parse it using the tutorial for dynamic text with CSS tutorial found here on Kirupa... however, what I need to do is from within textbox1 click on a link and have it load another .txt file (or variable withint the same external .txt file) into textbox2... I've attached a zip with my fla and .txt file!

asfunction, perhpas?

Thank you in advance!

Textbox
hello,

this is the first time i have used form stuff in a flash app.... where can i find a textbox... i looked in the form elements box but there is everything but a textbox...

Textbox Lines
I am creating a text box in my flash and i want to add text in it. I have followd the scroll button tutorial, and i need to add the text in the ation area. Here is the text thing.

onClipEvent (load) {
newstext = "insert text";
scrolling = 0;
frameCounter = 1;
speedFactor = 3;
}

How do i goto the next line in this if I want to have a word a line like this?:

Hello
Yes
No
... But it comes comes out with:

Hello Yes No.

Moving A Textbox With AS
Hello,

my problem:

I want to move a textbox by using the setProperty function!
I`ve made a preloader with a moving percent-bar and the number of current loaded percent shall allways have the same (_x -)position like the edge of the loadbar.

I`ve tried:

setProperty(_root.NAMEofTEXTFIELDvariable, _x, posit_x);

Is somebody out there who can help me?

Thanks.

=hollo=

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.

How To Set Focus To Textbox
Hi, how do I set focus to a textbox and get the prompt to blink? thanks, woktoc

Textbox Coordinates
How do you get to the Textbox Coordinates in flash 4 - is their a box that pops up so you can place the text exactly where you want?

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.

Space In Textbox
Hi Masters

i am facing a problem with the input textbox.
what i want that if i fill a something in textbox then it should not recieve the spacebar. I mean it should return the value only an it should not return the spaces which user fill before and after the value.

Please help me ia m in gr* trouble.

ritesh

Textbox Focusing
hi,

i have two problems,

- I have two textboxes (username and password) in my movie.
In the first frame, i used the code below :

Selection.setFocus("username");

this makes the cursor to the textbox but, users cannot write unless they use mouse to focus on the textbox again. How can i solve it?

- How can i make Selection.setFocus command to work for buttons. it doesn't work....

Thanks.

Efes

Textbox Linking
Is it possible to link two text boxes, by actionscript or otherwise, so that the overflow on one textbox goes into the second box? As I am allowing the user to resize the text, this would be helpful. Basically I want the same usability in this page: http://www.become.co.uk/ian/ian_main.html as in the relavent html page: http://www.become.co.uk/ian/index.shtml . Notice how the text flows around the image in the first page. Also, is it possible to load text files as variables without the "text1=..." ?

Thanks in advance.

Matthew Brown

XML--Or Maybe Just Textbox Problem--Plz Look
I have a map of a school and each room is bounded by a dynamic textbox that has text loaded into it from a database when the user checks a checkbox.

The main problem is that when the text is imported it only loosley follows the properties that I set for it. Some boxes have huge text others extremely small. I can zoom the page so relatively small text isn't a problem.

What I really would like to have happen is for the text to autofit inside the boxes because all of the boxes aren't the same size so no size font would be perfect for the whole document, however just getting all the text the same size would be a great accomplishment.

I have all the properties for the textbox set with the code as follows:

Code:
var thebutton = "txt_"+locid;

eval(thebutton).text = strText;
eval(thebutton).multiline = true;
eval(thebutton).selectable = false;
eval(thebutton).wordWrap = true;
eval(thebutton).border = false;
eval(thebutton).setTextFormat(myText);
eval(thebutton).autoSize = false;

myText = new TextFormat();
with(myText){
font = "Arial";
size = 8;
color = 0x000000;
bold = false;
italic = false;
url = "http://helpdesk/shared/beta/roomview.asp?locid="+locid;
target = "_blank";
selectable = false;
leading = 0;
leftMargin = 0;
rightMargin = 0;

}
This code is part of a function called through a loop for each locid, and strText is defined there as well. Any help with other properties or ideas for this would be greatly appreciated.

Thanks

Textbox Quarrel -- Help = Thx
I have a dynamic textbox with dynamicly imported text.

Is there any way to code: If text doesn't fit, Make text size smaller ( -1)?

Any help would be greatly appreciated.
Thanks

Textbox Content Or HELP
OKOK so i have this text field right?
and it uses an external text file that is loaded on clip event. (as mentioned in this great tutorial by Patrick Mineault -http://www.flashkit.com/tutorials/Interactivity/Actionsc-Patrick_-640/index.shtml )

this is where my problem stars:

Wait let me start over
I need to creat many text boxes for many buttons
so i figuered why creat a seperate text box for each button, why not just have one text box and have it's contents change according to every button

BUT sence my text box only works on clip event - load, the content doesn't change (sence the text box clip is only loaded once...) so basically how do i do this?

*writing this i realized maybe i should unload the clip upon it's completion

could i just change it on a symbol layer ?

HELP!!!

Scroll Textbox Between Y1 And Y2
Hey

I wanna make a textbox which scrolls between y1 and y2.
So u can move a little ball for exp. up and down trough the text.

The code I have now doesn't work;
y1 = 70;
y2 = 209;
_root.scrolltext.scroll = (((_root.scroller._y - y1) * (_root.scrolltekst.maxscroll - 1 )) / (y2 - y1)) + 1;

Can anyone help?

Cursor On A Textbox
Is there a way to have an input textbox have the cursor blinking already in it without having to move the mouse to it? It's for something where people will be adding e-mails over and over and when they fill out the e-mail field and click on a button called ADD I want it to immediately have the cursor on the e-mail text box again ready for the next e-mail address to be added.

Coloring A Textbox
how do I color an input box in MX? do they all have to be white? do I have to put a graphic over it? crazy!

Invisible Textbox
Hi
I've got a simple flash 5 prob

I'm inputing text then displaying it to a dynamic text box

My prob is that the dynamic text box is not appearing
I've set it as _visible but this appears to have no effect
and i'm starting to go bald not good for a girls image
All suggests gratefully accepted

Cheers Ro

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

Textbox Problem?
hi everyone,

i have made a mc counter in flash 5 on the main timeline wich just adds plus 1 to itself when it rolls of the seccond frame.

my problem is is that when i turn the text box that is reading the variable around to 90 deg it doesent appear on the screen at run time.

why is this

TextBox & Scroller
Quick Question just asking can I add html to my TextBox which has a scroller it has, it is "Dynamic Text" and "render text as HTML" is click, now say if i have www.whatever.com I want to make that clickable in the TextBox how should I go about doing that?

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.

Textbox Not Outputing (+,' Etc...)
http://www.swgfreak.com/k/chat.swf

If you check my chat out, and try to send a "+", apostrophes or slashes it outputs wierd. The "+" doesn't even show but I can see it in the chat.txt. When you use an apostrophe it adds a slash beside it. Any know why my flash textbox is doing this?

Textbox Within A Button.
Hello,

I am having trouble accessing an instance of text field I have placed on a button through actionscripting. (Ultimately I am trying to get the textheight). I am duplicating a movie clip that contains this button. I do not have trouble accessing the movie or the button itself, just the textbox within the button. I've had some luck using "btn.instance1" but the instance number continues to change.

I have the instance named "txtBox" so I would think referring to "btn.txtBox" would work. but no luck.

Any ideas?


Thanks
-sugarpig.

Textbox With Images
Call me blink, but i can't find in the tutorials section one that teaches how to do a textbox that i can insert text and images on it.
Does anybody know where i can find one?/

thanks!

Textbox Is Not Instantiated.?
does anyone know what this means??

in the timeline that contains the text box put

trace(this); //where? in aframe, ?

that will give the correct path to your textbox. make sure your textbox has an instance (or variable) name. then in the timeline with your button, put trace(correctpath.instancename or correctpath.variablename) to be sure your textbox is instantiated (if those traces are undefined your textbox is not instantiated) and if it is, use

correctpath.textboxvariablename="pools";

or

correctpath.textboxinstancename.text="pools";

Im still stuck ot this poxy dynamic text box!
I would like to have a dynamic text box that displays the title of a button.
Ie: the button is a photo of a swimming pool so onRollover of said button, i would like the dynamic text box to display ,yup you gussed it "swimming pools".

you can view what im upto here

If you could help me you can get a copy of the scrolling animation (very usefull actionscript)here

I thought i was somewher close with these, but neither of them work?

on (release) {
set(_root.main_nav.tween_menu_mc.scrolling_mc.cont ents_box, "Poole Buildings");
}


on (rollOver) {
_root.main_nav.tween_menu_mc.scrolling_mc.contents _box.text = "Pool Buildings";
}

Can anyone help please? pretty please? xxxxxxxxxxx

Different Colours In A Textbox
Hi,

This is probably really easy.

I have a text box with text in different colours. When I test or export the movie the text is all in one colour (the first used).

Any ideas how to sort this without creating lots of textboxes?

Ta

Scrolling Textbox....please Help
I don't know what to do, and desparately need someone to help me solve this!!

I have a website w/scrolling textbox in a MC (see link below). There is one problem: if a user were to scoll down to the bottom, and then click on a new link to load the next "page," then the scoll would be stuck where they left it (the text does not start at the top).

How would I make it load to the top of the page, regardless of where the user left off??

Thanks for the help!!

Here is the link: http://www.blackhillsvcf.com

Here is the script for the scroll:

onClipEvent (load) {
txtbox = "loading data....";
this.loadVariables("http://www.blackhillsvcf.com/txtbox.txt");
scrolling = 0;
frameCounter = 1;
speedFactor = 3;
needInit = false;
}
onClipEvent (enterFrame) {
if (needInit) {
if (txtbox.maxscroll>1) {
needInit = false;
}
}
if (frameCounter%speedFactor == 0) {
if (scrolling == "up" && txtbox.scroll>1) {
txtbox.scroll--;
} else if (scrolling == "down" && txtbox.scroll<txtbox.maxscroll) {
txtbox.scroll++;
}
frameCounter = 0;
}
frameCounter++;
}
onClipEvent (data) {
needInit = true;
}

Restrict A Textbox
I have a textbox which I want to restrict, so the user can only type in a capital A or B into the textbox.

How can I do this?

Any help would be grand!

Cheers

Jemes

Tips On Textbox
Hello everyone...

Can anyone give me some tips on this.
I need to make a swf that looks like a newspapper,
(or like this)

xxxxxxxxx----------------------
xxxxxxxxx----------------------
xxxxxxxxx----------------------
xxxxxxxxx----------------------
xxxxxxxxx----------------------
-------------------------------
-------------------------------
-------------------------------

where the x's mean a picture and the -'s are text.
The probem is that the the text and and picture are dynamic content, and i can't find a solution to do this.
If someone could give some tips (or even a sample ) i would be very appreciatted..

Thanks in advance

Scrollable Textbox Hep
sry for changin the post, lets put it this way, i have made a text load from a textdocument, now i cant use some swedish signs like åäö. Cause when i publis it these signs becomes squares ?!

How come ? And i am using Arial font witch includes these signs ?


What should i do ?
Thanx

Scrolling Textbox?
In the tutorial for loading variables Here
would someone be able to tell me what he means by scrolling textbox? i havent worked much with this side of flash, i work more with games and im not sure what to do..

Multiline TextBox
I would like to know how to go the last line of a multiline textbox without using the SCROLL

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