Input Field Multiline> When Dynamic Multil Field Shows That Data From Mysql But No Wr
Hi,
A form with an input field that is multiline and called "description" send data to a MySql database (PHP).
Another Flash page contains a dynamic field that is also multiline and that displays the content entered in the form.
This dynamic field has a vertical scrollbar.
The problem is that the content displayed in the dynamic field DOESN'T wrap at all (the dynamic field is but on MULTILINE) and so you miss all the text that is larger than the dynamic field.
How can I fix this?
Thanks in advance.
DevShed > Flash Help
Posted on: February 4th, 2004, 06:20 PM
View Complete Forum Thread with Replies
Sponsored Links:
MySQL Data Into Dynamic Text Field Without Escape Sequence
Hi guys,
I got a music portfolio web site running PHP, MySQL and Flash. There's a page showing all the artists my client worked for and when you click on a song title, this title is passed as a variable to a PHP page then to a Flash page. The Flash page contains an actionscript music player which then looks for the right audio file in the database and plays the song. Everything works great except for the dynamic text field which displays the song title. If the song title contains an apostrophe or a single quote, the Flash dynamic text field then shows the apostrophe preceded by a .
Here's an image :
For example, the song Breaking up somebody's home (by Nanette Workman) is written as is into the MySQL database. The display into the HTML page is fine ( no ), The problem is with the Flash dynamic text field.
The problem I think, is that PHP variables are sent to the Flash player and one of these variables contains a string with single quotes in it (the actual song title). Here's the partial code that points the problem :
[code]
<?php
while($arrAudio = mysql_fetch_assoc($resultAudio))
{
$aTitle = $arrAudio["Title"];
$aFile = $arrAudio["File"];
$counter = $counter + 1;
?>
Track <?=$counter?> / <em>Plage <?=$counter?></em> : <a href="<?=$_SERVER['PHP_SELF'].'?audioname='.$aTitle.'&audiofile='.$aFile.'&imagefile='.$flashImage?>" target="_blank"><?= $aTitle ?></a><br />
<?php
[/code]
Where $aTitle is the song title containing a single quote. How can I tell Flash to NOT escape the single quote ?
The actual site is here : http://www.pierrepineault.com/contentFrame.php
Many thanks in advance.
Joshley2
View Replies !
View Related
MySQL Data Into Dynamic Text Field Without Escape Sequence
Hi guys,
I got a music portfolio web site running PHP, MySQL and Flash. There's a page showing all the artists my client worked for and when you click on a song title, this title is passed as a variable to a PHP page then to a Flash page. The Flash page contains an actionscript music player which then looks for the right audio file in the database and plays the song. Everything works great except for the dynamic text field which displays the song title. If the song title contains an apostrophe or a single quote, the Flash dynamic text field then shows the apostrophe preceded by a .
Here's an image :
For example, the song Breaking up somebody's home (by Nanette Workman) is written as is into the MySQL database. The display into the html page is fine ( no ), The problem is with the Flash dynamic text field.
I've spent many many hours searching the web trying to find the cause and the solution with no success.
The actual site is here : http://www.pierrepineault.com/contentFrame.php
Many thanks in advance.
Joshley
View Replies !
View Related
Passing Data From Input Field To Dynamic Text Box
Sorry guys if someone has covered this but I couldn't find the answer in past threads.
Basically I just need information that is entered by the user into a input field to be passed to a dynamic text box.
Ie on a contact form when they submit their request a message is displayed saying "Thankyou{users name}, your request has been recieved.
The rest of the form is working, it's just this bit!!!
Any info would be gratefully received.
View Replies !
View Related
Passing Data From Input Field To Dynamic Text Box
Sorry guys if someone has covered this but I couldn't find the answer in past threads.
Basically I just need information that is entered by the user into a input field to be passed to a dynamic text box.
Ie on a contact form when they submit their request a message is displayed saying "Thankyou{users name}, your request has been recieved.
The rest of the form is working, it's just this bit!!!
Any info would be gratefully received.
View Replies !
View Related
Multiline Input Text Field Problems...
I have a flash movie where the user can input text into multiline text fields and then submit that text to some PHP scripting that creates a text file on my server of the information.
However when you submit the text it create square symbols where the text goes down to the new lines...
It detects the returns in the text field and writes those too.
This then means the text does not import into flash correctly.
thanks,
neb
View Replies !
View Related
Calculating Input Text Field To Dynamic Field (easy Action Script)
hi. i'm trying to learn action script and i need help with this bit. i'm trying to use action script to calculate my brothers ages based on my own.
using flash MX. i have an input field called "my_age" and two dynamic fields called "eli_age" and "jacob_age". eli is 4 years younger and jacob is 6 years younger. i want to be able to enter my age in the "my_age" input field and then click a button that will calculate their respective ages.
here's the fla if i haven't been clear.
thanks for any/all help,
josh
View Replies !
View Related
Erase Default Line Break Multiline Input Field
When I click on an empty multiline input text field, it already starts with a line break so the text to be entered starts at line 2. How can I get rid of this? I can't use anything like
Code:
if (myInputTextField_txt.text !="") {
myInputTextField_txt.text = "";
}
because when the myInputTextField already contains text I don't want it to get deleted.
So I'm looking for a way for Flash to find this whatever flash puts in a textfield upon entering it when empty and only then erase it.
View Replies !
View Related
Dynamic Text Field - Multiline
I have text coming in via remoting. I can see the text, however it will not multiline for some reason. I have checked the height of the text box and set it to 500 which should be sufficient. Anyone got any ideas? Here is the code:
// CREATING HEADLINE TEXT FORMAT /////////////////////////////////////////
headformat = new TextFormat();
headformat.font = "HelveticaNeue Condensed";
headformat.bold = true;
headformat.size = 36;
headformat.multiline = true;
createTextField("headLine",this.uiDepth++,13,17,11 4,500);
// HEADLINE TEXT ////////////////////////////////////////
headLine.text = result.items[0].c_Textline;
headLine.selectable = false;
headLine.multiline = true;
headLine.setTextFormat(headformat);
headLine.embedFonts = true;
View Replies !
View Related
Dynamic Text Field - Multiline
I have text coming in via remoting. I can see the text, however it will not multiline for some reason. I have checked the height of the text box and set it to 500 which should be sufficient. Anyone got any ideas? Here is the code:
// CREATING HEADLINE TEXT FORMAT /////////////////////////////////////////
headformat = new TextFormat();
headformat.font = "HelveticaNeue Condensed";
headformat.bold = true;
headformat.size = 36;
headformat.multiline = true;
createTextField("headLine",this.uiDepth++,13,17,11 4,500);
// HEADLINE TEXT ////////////////////////////////////////
headLine.text = result.items[0].c_Textline;
headLine.selectable = false;
headLine.multiline = true;
headLine.setTextFormat(headformat);
headLine.embedFonts = true;
View Replies !
View Related
Help With Saving An Input Text Field To Mysql
I have several input boxes (they changed dynamically and are created by actionscript at run time).
I'd like to send the text in all these input boxes to a php script for parsing.
I've gotten the text to send and parse, but the line breaks don't parse.
Here's my code:
Code:
var myStr:String;
var myIdx:Number = 0;
for (var tfIdx:String in textFields) {
if (tfIdx.indexOf('field') != -1) {
if (myIdx == 0) {
myStr = textFields[tfIdx].text;
} else {
myStr = textFields[tfIdx].text + '###AAA###' + myStr;
}
myIdx++;
trace("1");
}
trace(tfIdx);
}
trace(myStr);
var variables:URLVariables=new URLVariables();
var saveCard:URLRequest=new URLRequest(siteUrl + 'wp-content/plugins/greeting_cards/save_card.php');
variables.cardDataID=cardID;
variables.gcUID=userToken;
variables.cardDataMsg=myStr;
saveCard.method=URLRequestMethod.POST;
saveCard.data=variables;
var loader:URLLoader=new URLLoader();
loader.dataFormat=URLLoaderDataFormat.VARIABLES;
loader.addEventListener(Event.COMPLETE, saveDone);
loader.load(saveCard);
The file it saves to doesn't have the line breaks intact. Any ideas?
View Replies !
View Related
Multiline Dynamic Text Field - Possible To Dynamically Resize?
Is it possible to have a multiline dynamic text field resize itself based on the amount of content being placed in it?
Lets say I make a multiline text field that is three lines high. If I assign text that fills more than that space, it gets cut off after those three lines are filled. The rest you cant see becuase it extends to the fourth line (and so on).
Is it possible to set the textbox so that it will expand if I assigned it more text than three lines worth of text?
View Replies !
View Related
Dynamically Loading MySQL Data Into Text Field
Ok, I know this has been covered countless times but regardless of the numerous tutorials, posts etc. that I read I cannot get flash to read in my mysql data. I can make it read in a simple variable i.e.
PHP Code:
$x = "abc";print "varname=$x";
... but as soon as I add anything else into it, it fails. Even just addign the mysql connect lines infront of what I have there will cause it to fall over.
What I need is basically how to code the following PHP script and the action script (or even an explanation of how to alter it).
PHP Code:
mysql_connect("$host", "$user", "$password");mysql_select_db("$database");$sql = "SELECT * FROM news order by date DESC LIMIT 10";$result = mysql_query($sql); $anc = 1;while ($newArray = mysql_fetch_array($result)) { $id = $newArray['id'];$news = stripslashes($newArray['news']);$date = $newArray['date'];$head = stripslashes($newArray['head']);$date = date("d/m/Y", strtotime($date));print"***$date and $news should be printed here***"++$anc;}
Honestly try as I might, I cannot get this to display.
Thanks in advance
Graham
View Replies !
View Related
[MX] Form Not Sending Input Field Data
This is the first time I'm using Flash, so this is probably something really dumb I'm doing. I've followed 10 different tutorials I've found on the net, and still can't get this to work.
I have a simple form - 2 fields both set as input text. One is named realname, the other email. Then there's a button (pill button I got from the common library) that is used to submit the form. The info then is sent to my form processor and I get an email with the information.
However - the information typed into the realname and email textboxes aren't being sent to the form processor. I have tried it several different ways, and nothing I do is making that information pass through. (Like I said, I'm probably just missing a simple step or something)
Here's the action that's run when the button is clicked.
Code:
on (release) {
userData = new LoadVars();
userData.realname = realname;
userData.email = email;
userData.recipients = "sherrington";
userData.subject = "RSVP to Open House";
userData.mail_options = "AlwaysList";
userData.send("formmail2.php", "", "post");
}
The three things listed there that aren't part of my form are required by my form processor in order to send the email. Those things are passing through just fine - it's the "realname" and "email" that aren't getting through.
I tried this code (which I found on a different tutorial) but it didn't work either.
Code:
on (release) {
userData = new LoadVars();
userData.realname = realname.getValue();
userData.email = email.getValue();
userData.recipients = "sherrington";
userData.subject = "RSVP to Open House";
userData.mail_options = "AlwaysList";
userData.send("formmail2.php", "", "post");
}
AND I tried a code that used a getURL but it didn't work either (Sorry, don't have that code available anymore to cut and paste)
Does anyone know what I'm doing wrong??
View Replies !
View Related
[F8] Storing Input Text Field Data?
Hi, im creating a form in flash (AS2). But I want it to store the data temporary until all fields are filled and sent to php.
How can I store the data?
normally I'd use
instancename.txt but since its input field I have to use the var.
lets say my input text field var is name
I cant do,
on(release) {
name.txt = name.txt
nextFrame();
}
I want to store, cause I will have a back button in a multiple pages form. I want users to be able to go back and check what they have typed. is this possible?
View Replies !
View Related
PHP/MYSQL/XML - Loading .txt Into Dynamic Txt Field
Hi,
I've just installed mysql/php server on my apache and have sucessfully followed the lee's tutorial on attaching values to a list component using PHP-created XML.
My goal in all of this is to bring multiline, specially formatted text files into a dynamic text field so that I can change the file at will.
I don't really want to store the content of these text files within the XML however (as they will be fairly long and there will be alot of them), and so was hoping there was some way of referencing .txt's through urls stored in the sql db, that can then be loaded into the dynamic text field?
Does anyone have any idea about loading .txt's into dynamic text fields?
I understand how to do it normally, but would like to do so through urls stored in the mysql db, referencing .txts on the server.
If anyone has any ideas or knows of any good info let me know.
Thanks :wink:
View Replies !
View Related
Input Text Field To Dynamic Text Field
Ok, I have an input text field with a variable name of "enter", and a dynamic text field with a variable name of "display". I also have a button on the stage. I want it so that when you press the button, it checks what the user has put into the input text field, and if it is valid it will display a certain message in the dynamic text field.
For example:
If the user types in "hydrogen" and then clicks the button, I want the dynamic text field to display the letter H. Likewise, if the user types in "oxygen" and then clicks the button, I want the dynamic text field to display the letter O. And finally, if the user types in something that is not specified in the code, it will just display "Not Valid".
I tried doing this with an on(release) action and then some if statements, but nomatter what I typed in it would always display H. I'm probably overlooking something simple, but nonetheless, I need help. Thanks
View Replies !
View Related
Input/Dynamic Text Field
How do you have a user enter their name (or anything else for that matter) into an INPUT TEXT FIELD and then have the name that they entered display in a DYNAMIC INPUT FIELD on any pages after that?
I realize that one has to create a variable the references the input field but after that my mind draws a blank and like Homer Simpson, the circus monkeys in my brain start dancing.
Thanks
View Replies !
View Related
[F8] Input And Dynamic Text Field Value
Hi guys.
This is my (probably very simple ) problem:
In scene 1, keyframe 1 I got an input text field (instance name = in1) and a button. The button got this code:
Code:
on(release){
gotoAndStop(2);
}
On keyframe 2 I only got a dynamic textfield (instance name= out1).
I want to write someting into the input text field on frame 1, press the button and when I'm on keyframe 2; I want the dynamical text field to display what I wrote.
On keyframe 2 I have written this code:
Code:
_root.out1.text=_root.in1.text;
(Im betting this is wrong!)
When I try this out I don't get my input data. I only get "undefined" in the dynamic text field.
Now this works perfectly fine if I use the same variable name, entered in the "variable box" in properties. But I would rather access the variables as a property of the textfield.
What am I doing wrong?
Thanks for a fantastic forum,
Ontrop.
View Replies !
View Related
Dynamic Input Text Field ?
Hi all,
This is possible to dynamically create input textfields and then style them with new textFormat something like
ActionScript Code:
this.createTextField("txtBox_txt", 1, 50, 50, 200, 20);
textBox = new TextFormat();
textBox.background = true;
textBox.backgroundColor = 0xffffff;
textBox.bold = true;
txtBox_txt.setNewTextFormat(textBox);
or is it possible to use the new TextFormat object on a input text field that is manually been placed on the stage. So I create a input text field called input_txt and then style it.
ActionScript Code:
textBox = new TextFormat();
textBox.background = true;
textBox.backgroundColor = 0xffffff;
textBox.bold = true;
input_txt.setNewTextFormat(textBox);
View Replies !
View Related
Dynamic Input Text Field ...
Is it possible to create a dynamic text fields at runtime (from code) that can be used as input text fields??? i.e: where the user can enter information ??? or do input text fields need to be created inside the flash application at development time ???
Thanks,
Stephen.
View Replies !
View Related
Dynamic Input Text Field
Dynamic input text field
Hi all,
This is possible to dynamically create input textfields and then style them with new textFormat something like
ActionScript Code:
this.createTextField("txtBox_txt", 1, 50, 50, 200, 20);textBox = new TextFormat();textBox.background = true;textBox.backgroundColor = 0xffffff;textBox.bold = true;txtBox_txt.setNewTextFormat(textBox);
or is it possible to use the new TextFormat object on a input text field that is manually been placed on the stage. So I create a input text field called input_txt and then style it.
ActionScript Code:
textBox = new TextFormat();textBox.background = true;textBox.backgroundColor = 0xffffff;textBox.bold = true;input_txt.setNewTextFormat(textBox);
View Replies !
View Related
Dynamic Input Text Field
Hi:
For some reason I can't figure this out. I am creating an input text field. I want the text that the user inputs to be assigned to a variable. For some reason the user can only input text if I put a text property in. So i set the variable to have a starting value. However when the user input does not change the variable, so it still comes up as the original value.
this.createTextField("pic3Tag", p++, 5, 170, 250, 100);
pic3Tag.type = "input";
pic3Tag.border = true;
pic3Tag.background = true;
pic3Tag.multiline = true;
pic3Tag.text = myTag;
pic3Tag.embedFonts = true;
pic3Tag.variable = myTag;
pic3Tag.setTextFormat(textFormat);
i'm so confused.
View Replies !
View Related
Smiley In Input Dynamic Text Field
Hello, I am wondering if you could put a graphic smiley into a text field by a person simply putting in: ": )" or something else like that. Here is the code I have so far:
Code:
smiley = new Array("_root.happysmiley", _root.winkingsmiley, _root.funnysmiley);
onEnterFrame = function () {
if (test == ":)") {
_root.display += smiley[1];
}
if (test == ";)") {
_root.display += smiley[2];
}
if (test == ":D") {
_root.display += smiley[3];
}
};
This is a simple trial of code, that are among others that I am trying to put in. Is it even possible for Flash MX 2004 to have graphic images or movie clips in a dynamic text field?
View Replies !
View Related
Dynamic Embed Font On Input Field
I posted this in another thread but it's burried and this problem is slightly different so I think it deserves its own
I've read a bunch of threads on embedFonts but most of them have text fields that are placed on stage. I'm creating a bunch of input text fields via a loop and some of the text fields have different fonts, sizes etc... I'm attaching the fonts via shared library.
This code here is within a for loop. It works when I remove the embedFonts=true but when I leave it in I can't see any fonts.
Code:
// text format
var my_fmt:TextFormat = new TextFormat();
my_fmt.font = FieldArray[eObj.target.selectedIndex][i].fontFace;
my_fmt.size = FieldArray[eObj.target.selectedIndex][i].fontSize;
my_fmt.align = FieldArray[eObj.target.selectedIndex][i].align;
my_fmt.color = FieldArray[eObj.target.selectedIndex][i].color;
// text field
fields_mc.createTextField(FieldArray[eObj.target.selectedIndex][i].name,fields_mc.getNextHighestDepth(),xcoord,ycoord,100,25);
//
fields_mc[FieldArray[eObj.target.selectedIndex][i].name].embedFonts = true;
fields_mc[FieldArray[eObj.target.selectedIndex][i].name].type = "input";
fields_mc[FieldArray[eObj.target.selectedIndex][i].name].selectable = true;
fields_mc[FieldArray[eObj.target.selectedIndex][i].name].border = true;
// set text format
fields_mc[FieldArray[eObj.target.selectedIndex][i].name].setNewTextFormat(my_fmt);
// set text
fields_mc[FieldArray[eObj.target.selectedIndex][i].name].text = bcInfo_so.data[FieldArray[templates_lb.selectedIndex][i].name];
Can someone help me out?
Also when I use autoSize=true, I lose my textfield alignment. So if I have a textfield aligned to the right and I use autoSize=true, it gets aligned to the left, even if I reset the text format. Ay ideas on this as well?
Thanks
View Replies !
View Related
Dynamic Bar Graph From Input Text Field
Hello!
I am trying to make a bar graph that tweens to the height, or decrease, according to the number defined in the Dynamic text box. I would like to use the tween class from MX for a nice bounce effect. Here is my code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
ICcost._height = Number(ICC1);
new Tween(ICcost, "_yscale", Elastic.easeOut, 0, ICC1, 2, true);
ICC1 is the dynamic text field that displays a number from a formula through a couple input boxes. ICcost is the name of the MC I want tweened.
As I have it now it doesnt tween, the height just goes to the ICC1 number which is ok for now. Is there a way to set the tween to happen when flash registers a change in the number? I am fairly comfortable with AS2 and I know there is a way I just don't know exactly what I am looking for. Any help or suggestions would be great!
View Replies !
View Related
Dynamic Text Field In My Custom Component Shows No Text In SWF
Flash MX 2004 on MAC platform (not professional version)
------------------------------------------------------------------------
Hi,
I created a custom component in Flash MX 2004, which has two custom text fields defined by variables and one link defined by a variable also (3 variables total).
When I publish my movie, one of the text fields in each instance of my component on the stage is always empty (the same one) ...does anyone have any idea why?
It doesn't make sense to me that i have it working for one text field and not for the other....I don't THINK that I am doing anything differently between them...?
I have uploaded my small FLA here:
http://www.lucid-life.com/my_component.fla.zip
Can anyone help?......
Thanks,
Cheska
View Replies !
View Related
Dynamic Text Field In My Custom Component Shows No Text In SWF
HI,
I created a custom component in Flash MX 2004, which has two custom text fields defined by variables and one link defined by a variable also (3 variables total).
When I publish my movie, one of the text fields in each instance of my component on the stage is always empty (the same one) ...does anyone have any idea why?
It doesn't make sense to me that i have it working for one text field and not for the other....I don't THINK that I am doing anything differently between them...?
I have uploaded my small FLA here:
http://www.lucid-life.com/my_component.fla.zip
thanks in advance of any help..
Cheska
View Replies !
View Related
Display Data Into A Dynamic Text Field
Some characters (ρΡαινσϊ..etc) do not display correctly in flash mx, the dynamic text (html format) displays an square instead of the character when i read from an external file or when i try to display data from my db (php/mysql)...why is this happening in flash mx?? with flash 5 all the characters appear correctly...!!! ???
View Replies !
View Related
Relaying Data From A Dynamic Text Field
Hi everyone
I am just a bit stuck at the moment with this slight problem.
I have this dynamic text field which is displaying my movie's loading information.
What i would like to do is to simply allow this information to be displayed in another dynamic text field which is embeded in a movieclip on another level.
To be honest I just have no idea on how to write this piece of code, any help
or links to how to do this will be most welcomed
kind regards
w9914420
View Replies !
View Related
Append Data To Dynamic Text Field
I am still relatively new to flash so please bear with me.
my question comes from a project i am working on where I read in data entries from a mysql database. in each of these entries, i have several fields which i would like to display. i have been able to succesfully read and output these entries in my text field, events_txt by using
events_txt.text += "whatever i'm adding";
what i am trying to do is display each field with a different format, (i.e. i want to display the "title" of the entry in the same box with the "details" of the entry, but at different font sizes and styles.
i have tried using the event_txt.setNewTextFormat() function at different times during the write process, but as many of you probably already know, this simply sets the text area to whatever format is last written.
do any of you know a way using actionscript to input different sections of text, at different font styles, to the same text area?
View Replies !
View Related
Receiving 'true' In The Dynamic Field Rather Than The Data
Hi I'm having problems getting a dynamic field to display some XML properly, i think it is jut my syntax but not sure, if i make a manual path of Movieclips with instance names it displays fine!!!
Basically I have this load Var statement, which contains the path to the dynamic field when generated:
var description_lv = new LoadVars();
description_lv.onData = function(raw_text){
currentThumb_mc.DJ.VenueN2.description_txt.text = raw_text;
}
in turn i have below creating the dynamic clip
//create DJ: clip
currentThumb_mc.DJ.attachMovie("DJ2","DJ3",2)
currentThumb_mc.DJ.DJ3._x = 56
currentThumb_mc.DJ.DJ3._y = -5
currentThumb_mc.DJ.DJ3.DJN_txt.text = currentPicture.attributes.title; //-- is working
//create Venue: clip
currentThumb_mc.DJ.attachMovie("VenueN","VenueN2",3)
currentThumb_mc.DJ.VenueN2._x = 56
currentThumb_mc.DJ.VenueN2._y = 7
currentThumb_mc.DJ.VenueN2.description_txt.text = description_lv.load(this.description);
the bottom line is one i have modified out of a release statement, I am receiving a error URL not found, in addition the path is correct as the field is displaying true, but i'm not sure how to change the code to get this data appearing correctly, like i said it works manually creating MC and i'm thinking the path is right above, so I cannot work out why else it wouldn't be working can someone pleeeeeeeeeeease help!
Thanks V much
Edited: 11/09/2006 at 05:52:42 AM by elviskat
View Replies !
View Related
Data Typing A Dynamic Text Field
I am seeing the fofllowing error when I load a variable into a dynamic text box.
1067: Implicit coercion of a value of type Number to an unrelated type String.
I know that I need to data type the text box and I thought I could do it like:
Number(score_txt.text) = score;
But that isn't working and I cannot find anything in the documentation on it.
Can someone help please.
Mike
View Replies !
View Related
Relaying Data From A Dynamic Text Field
Hi everyone
I am just a bit stuck at the moment with this slight problem.
I have this dynamic text field which is displaying my movie's loading information.
What i would like to do is to simply allow this information to be displayed in another dynamic text field which is embeded in a movieclip on another level.
To be honest I just have no idea on how to write this piece of code, any help
or links to how to do this will be most welcomed
kind regards
w9914420
View Replies !
View Related
Passing Array Data To A Dynamic Field
This is my code that works perfectly.
function makeBtns(btnNm, xstart) {
for (var n = 1; n<btnNm+1; n++) {
ball.duplicateMovieClip("ball"+n, n);
var thisClip = this["ball"+n];
thisClip._y = xstart+n*25;
thisClip.name.text = names[n-1];
//thisClip.name2.text = names[n-1];
}
}
The line: thisClip.name.text = names[n-1];
puts my array info into the dynamic text field "name" in the mc "ball"
Now I want to put the same array info into a second text field named "name2" in the same mc "ball". This is the code that is commented out.
But it doesn't work. Any thoughts?
View Replies !
View Related
HELP Can INPUT BOX Number Value Change A Dynamic Text Field?
Yeah, I am trying to get my input field to change the value of a dynamic text box, which is accessing a variable from a .txt file.
The input field is called "Quantity1", "Quantity2", etc...
The Dynamic text fields load variables called "Price1", "Price2", etc...
Both go up to 10.
If I input a value, let's say 10, into "quantity4", then "price4" should change accordingly.
HOW CAN I DO THIS?
View Replies !
View Related
Input And Dynamic Text Field Problem (Flash 8)
Hi,
I have 2 text fields in my flash movie (Flash 8, AS 1 or 2). The first is an input text field (level0.body.additional) that on the enter key will add it's value to a dynamic text field (level0.body.totalrequested - please see code below).
A global variable is used to store the total and add it to what the user enters into level0.body.additional. I've tried the following code but all it does is concatenate as if both values were strings (inserting carrage returns inbetween) - not numbers (so say global.total was 50 and the user enters 20 in the input text box, the dynamic text box has 50 then 20 on the next line - I've changed the dynamic text field property to be single line but it doesn't make a difference).
I've tried wrapping "this.text" in the Number() function call but I get "Not a Number" returned.
Any ideas please?
Thanks for any help,
Richard
----------------------
var newTextField:Object = new Object();
newTextField = _level0.body.additional;
newTextField.onKeyDown = function() {
if(Key.isDown(Key.ENTER)) {
_global.total = _global.total + this.text;
_level0.body.totalrequested.text = _global.total;
};
};
newTextField.onSetFocus = function() {
Key.removeListener(this);
Key.addListener(this);
};
newTextField.onKillFocus = function() {
Key.removeListener(this);
};
View Replies !
View Related
[F8] Input And Dynamic Text Field Problem (Flash 8)
Hi,
I have 2 text fields in my flash movie (Flash 8, AS 1 or 2). The first is an input text field (level0.body.additional) that on the enter key will add it's value to a dynamic text field (level0.body.totalrequested - please see code below).
A global variable is used to store the total and add it to what the user enters into level0.body.additional. I've tried the following code but all it does is concatenate as if both values were strings (inserting carrage returns inbetween) - not numbers (so say global.total was 50 and the user enters 20 in the input text box, the dynamic text box has 50 then 20 on the next line - I've changed the dynamic text field property to be single line but it doesn't make a difference).
I've tried wrapping "this.text" in the Number() function call but I get "Not a Number" returned.
Any ideas please?
Thanks for any help,
Richard
----------------------
var newTextField:Object = new Object();
newTextField = _level0.body.additional;
newTextField.onKeyDown = function() {
if(Key.isDown(Key.ENTER)) {
_global.total = _global.total + this.text;
_level0.body.totalrequested.text = _global.total;
};
};
newTextField.onSetFocus = function() {
Key.removeListener(this);
Key.addListener(this);
};
newTextField.onKillFocus = function() {
Key.removeListener(this);
};
View Replies !
View Related
Displaying User Input Into A Dynamic Text Field
Hello everyone. Hope you are all well.
Have a bit or of a problem.
I have imported and XML file and using the code below i am able to store comments against a particular node.
//istener object for tree
var lo:Object = new Object();//a custom object called "lo" is created.
lo.change = function(evtObj:Object):Void{
var itm:Object = mytree.getSelectedItem();
if(itm.savedComment != undefined)
newcomment.text = itm.savedComment;
else
newcomment.text = "";
}
mytree.addEventListener("change",lo);//everytime the tree component generates a change event
//from the user selecting a different node the listener code runs.
//listener object for submit button
var lo2:Object = new Object();
lo2.click = function(evtObj:Object):Void{
var itm:Object = mytree.getSelectedItem();
itm.savedComment = newcomment.text;
}
addCommentbtn.addEventListener("click",lo2);
All i need now is that whenever the user clicks on a button ("viewComment") ALL the comments already submitted are presented in a dynamic text field.
ANy help is much appreciated. Thanks.
View Replies !
View Related
|