How To Cach Text Fields In Flash
I built a form with name, variable name = name, email, variable name =email and I want to cache these text fields in flash so when the user goes back to the form, their name and email address is already in those text fields. How do you do that?
-mike
FlashKit > Flash Help > Flash ActionScript
Posted on: 01-12-2004, 04:56 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Cach
if i make changes to swf , its not loaded .. the old one still in cach ... how can i change it with out the HTML code ..
? dose flash has this option NOCACH ?
Thanks
Clearing Cach
Is there any code to clear cache on unloading a movie or on browser unload?
I know how to clear cache via browser proerties etc, but i need to know how to do it without allowing all my site browsers doing it manually all the time.
By simply refeshing the browser, does not refresh the swf.
Please Help!!!!!
Assigning Text In Dynamically Created Text Fields; Flash 8
I'm having trouble with dynamically assigning text to a dynamically created text field.
This works:
ActionScript Code:
//set font with TextFormat
myFormat=new TextFormat();
myFormat.align="left";
myFormat.color="0xFF3300";
myFormat.font="MyriadProBoldCon";
myFormat.size=25;
//create text field
this.createTextField("timText", 1, 10, 10, Stage.width,40);
timText.text="I declare a truce for robot juice";
timText.embedFonts=true;
timText.setTextFormat(myFormat);
but this doesn't:
ActionScript Code:
//set font with TextFormat
myFormat = new TextFormat();
myFormat.align = "center";
myFormat.color = "0xFF3300";
myFormat.font = "MyriadProBoldCon";
myFormat.size = 25;
//create text field; text shows up right now
this.createTextField("timText", 1, 0, 10, Stage.width, 40);
timText.text = "I declare a truce for robot juice.";
timText.embedFonts = true;
timText.setTextFormat(myFormat);
//but click a button, and the text disappears and is not replaced!!!
btn1.onRelease = function() {
timText.text="Breakfast is served all day in Hell!"
};
btn2.onRelease = function() {
timText.text="We prefer to be called Buccaneer-Americans."
};
btn3.onRelease = function() {
timText.text="It's fun to use learning for evil!"
};
I've tried setting up the TextFormat and createTextField as a function that's called on the onRelease handler. I've tried dropping the whole frackin' code in the onRelease function for each button. Neither approach works.
I've been digging around on the web, looking for answers, and nothing seems to solve my problem. Does anyone have any ideas?
thanks in advance!
Dividing Number X (30, 25, 13, Etc..) Amongst Text Fields (1-100 Fields)
Sorry about the title of this post, but I didn't find it easy to make a descriptive title.
What I'm trying to do, isn't a huge project, and I don't believe it's infinitely complicated. I just can't seem to wrap my head around it at the moment.
Hard enough to explain what I want...
Try to picture this:
Flash file opens up.
There are 6 text fields on the screen.
You enter the number 30 into a text field located near the top and press a button.
The 5 remaining text fields suddenly have numbers in them:Field 1: 30
Field 2:8
Field 3:9
Field 4:3
Field 5:5
Field 6:5
The idea is that I need a piece of code that will divide a variable amount of 'points' between a variable number of text fields. But not only does it have to be divided it has to be randomly and often unevenly divided.
So X = Number of text fields X / 30
Won't bring about the desired results.
I think I can (but haven't tried) divide 30 evenly easy enough, but since thats not what I'm after...
Any suggestions?
Seems to me that the final code will be one of those 'Wonder why I didn't see that' sort of things. But I can't get it.
Thanks for your help.
-Lem
How Do I Pass Text From Flash Text Fields To A PHP Script
Hello,
Can anyone PLEASE either steer me to a tutorial or perhaps explain how to do this. I'm working on a flash page that I need to assign values to 2 text fields and a button. The fields are for username and password and a go button. It will pass the information to a php script.
I know how to do this and have it working with html but I need to make it work with the flash page. I made the 2 fields and the button. How do I assign the values.
The html code I have is . . .
<form action="http://mydomain.com/phpgdv2/index.php" method=POST name=theform>
<table border=0>
<tr><td colspan=2> Please log in below.
</td></tr>
<tr>
<td class=sectiondesc>
Username
</td>
<td>
<input type=text name=username size=20 class=inputfield>
</td>
</tr>
<tr>
<td class=sectiondesc>
Password
</td>
<td>
<input type=password name=passwd size=20 class=inputfield>
</td>
</tr>
<tr>
<td> </td>
<td>
<input type=submit name=_phpguarddoglogbut value=Submit>
</td>
</tr>
</table>
<script language=JAVASCRIPT>
document.theform.username.focus();
</script>
<input type=hidden name=_phpguarddogaction value=login>
</form>
============================
I am in hopes that someone will take a look and tell me if I am even on the right track. I need the form to send the data from the fields tht I posted in the html example and I don't know what I am doing wrong.
I have a feeling that I have turned a simple thing into something complicated and really am very new to flash.
In advance I thank you for a response and this wonderful forum.
B -
I uploaded my .fla file to http://mymediabin.com/login.fla
Dynamix Text Fields In Flash Mx
Im not sure if im doing it wrong or what but i've been trying to get the dynamic text fields in flash mx to work and they dont. im using the
loadvariablesnum("textfile.txt",0) code and it doesnt seem to be applying the text. I have set the data in the text file and the text field to have the same name. can anyone tell me what im doing wrong? thanks in advance.
Flash Mx And Dynamic (ish) Text Fields
I have the following code in my flash movie
Code:
this.createTextField("myField_txt", 10, 5, 5, 130, 200);
myField_txt.html = true;
myField_txt.wordWrap = true;
myField_txt.htmlText = "[font face='Arial' size='2' color='#000000'][a href='myPage.html']Click here[/a] to continue[/font]";
This all works fine and produces the look I want, however, is it possible to make this text change color when it's moused over (like can be done in regular HTML). Can this be done in Flash MX ? Maybe using Flash MX CSS styles or something ?
(note: I've replaced '<' with '[' in the above piece of code for the .htmlText part because HTML is turned on)
Thanks in advance for any help or links,
Stephen.
Flash Mx And Dynamic (ish) Text Fields
I have the following code in my flash movie
Code:
this.createTextField("myField_txt", 10, 5, 5, 130, 200);
myField_txt.html = true;
myField_txt.wordWrap = true;
myField_txt.htmlText = "<font face='Arial' size='12' color='#000000'><u><b><a href='myPage.html'>Click here</a></b></u> to continue</font>";
This all works fine and produces the look I want, however, is it possible to make this text change color when it's moused over (like can be done in regular HTML). Can this be done in Flash MX ? Maybe using Flash MX CSS styles or something ?
Thanks in advance for any help or links,
Stephen.
Flash Showing ? In Text Fields
I have made a flash slide show with captions describing the images. All works fine on my computer but when I upload the files onto the web I see a diamond shape with a "?" in it where the text should show the apostrophe ( ') character such as the word "it's" or "Karen's". I get "It?s" or "Karen?s".
A test file can be seen here:
http://www.marinethemes.com/SWFtest.html
I assume this is a problem related to the Mac as I sometimes see text "weirdness" when switching text documents between platforms. Details are:
Mac OSX 10.4.10
Flash MX 2004
The flash file at the above link uses an xml file to find an image in a folder then display the caption associated with that file. The xml file is in this form:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<pic>
<image>FlashImages/M07B02 61464.jpg</image>
<caption>Fin Whale (Balaenoptera physalus) lunge feeding at the surface showing throat pleats as it rolls on it’s side.</caption>
</pic>
Flash Loading Xml Into Text Fields
Hey yall trying to get an xml with only text reading into some text fields. I have the following for code:
My AS
Code:
var x:XML = new XML();
x.ignoreWhite = true;
var text1:Array = new Array();
var text2:Array = new Array();
var text3:Array = new Array();
x.onLoad = function() {
var contentText:Array = this.firstChild.childNodes;
for(i=0;i<contentText.length;i++) {
text1.push(contentText[i].attributes.textCon1);
text2.push(contentText[i].attributes.textCon2);
text3.push(contentText[i].attributes.textCon3);
}
t1.textArea.text = textCon1[i];
t2.textArea.text = textCon2[i];
t3.textArea.text = textCon3[i];
}
x.load("words.xml");
My XML
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<phrase>
<contentText>
<textCon1>"1"</textCon1>
<textCon2>"2"</textCon2>
<textCon3>"3"</textCon3>
</contentText>
</phrase>
It doesnt seem to be loading correctly any ideas?
Thanks in advance.
MT
Adding Text Fields In Flash
I'm creating a form that does some basic math, I need to add the values of one field to the calculated of other field.
I must be brain dead...cause here's the funtion and it's not working?
any help
jef
function compute(form) {
_root.formMC.BV = (_root.formMC.personalPV*2);
_root.formMC.BV2 = (_root.formMC.personalPV2*2);
_root.formMC.BV3 = (_root.formMC.personalPV3*2);
_root.formMC.BV4 = (_root.formMC.personalPV4*2);
_root.formMC.BV5 = (_root.formMC.personalPV5*2);
_root.formMC.BV6 = (_root.formMC.personalPV6*2);
_root.formMC.BV7 = (_root.formMC.personalPV7*2);
_root.formMC.BV8 = (_root.formMC.personalPV8*2);
_root.formMC.totalPV = (_root.formMC.personalPV);
_root.formMC.totalPV2 = (_root.formMC.personalPV2*_root.formMC.DL2);
_root.formMC.totalPV3 = (_root.formMC.personalPV3*_root.formMC.DL3);
_root.formMC.totalPV4 = (_root.formMC.personalPV4*_root.formMC.DL4);
_root.formMC.totalPV5 = (_root.formMC.personalPV5*_root.formMC.DL5);
_root.formMC.totalPV6 = (_root.formMC.personalPV6*_root.formMC.DL6);
_root.formMC.totalPV7 = (_root.formMC.personalPV7*_root.formMC.DL7);
_root.formMC.totalPV8 = (_root.formMC.personalPV8*_root.formMC.DL8);
//_root.formMC.plusYourPV2 = (_root.formMC.totalPV2.Value) +( _root.formMC.personalPV.value);
_root.formMC.plusYourPV2 = (eval(_root.formMC.totalPV2) + eval( _root.formMC.personalPV));
_root.formMC.plusYourPV4 = (eval(_root.formMC.totalPV4) + eval( _root.formMC.personalPV));
_root.formMC.plusYourPV5 = (eval(_root.formMC.totalPV5) + eval( _root.formMC.personalPV));
_root.formMC.plusYourPV6 = (eval(_root.formMC.totalPV6) + eval( _root.formMC.personalPV));
_root.formMC.plusYourPV7 = (eval(_root.formMC.totalPV7) + eval( _root.formMC.personalPV));
_root.formMC.plusYourPV8 = (eval(_root.formMC.totalPV8) + eval( _root.formMC.personalPV));
_root.formMC.totalBV = (_root.formMC.totalPV*2)
_root.formMC.totalBV2 = (_root.formMC.plusYourPV2*2);
_root.formMC.totalBV3 = (_root.formMC.totalPV3*2);
_root.formMC.totalBV4 = (_root.formMC.totalPV4*2);
_root.formMC.totalBV5 = (_root.formMC.totalPV5*2);
_root.formMC.totalBV6 = (_root.formMC.totalPV6*2);
_root.formMC.totalBV7 = (_root.formMC.totalPV7*2);
_root.formMC.totalBV8 = (_root.formMC.totalPV8*2);
jef
Flash MX Bug: Input Text Fields
I want to report a Flash MX bug. When you create a form using input text fields in the main timeline or inside a MovieClip, this works perfectly; but once you design your form in a layer below a mask layer, either in the main timeline or a movieclip timeline, your text field dissapears, you can not write anything in the field.
If you want to see your text field below the mask layer, you have to do the following:
1. Select the text field.
2. Open the Properties panel, and in the Character Options (you'll find it beside the Var text field) you have to choose Embed Font Outlines for: All Characters.
3. Test your movie, (Ctrl+Enter) and finally you'll see your text field.
For me, this shouldn't be necessary because I'm using fonts like Arial and Verdana in my form which don't require this option.
But I haven't finished yet. There's one more bug coming up. Now, select you text field and enter any Instance name (i.e: email) and also give it a Variable name, let's say "email", too. Alright, now test your movie and you will see this horrible expresion in your text field: _level0.email.
I hope you follow this report step by step and you will see that what i'm saying is true. If I'm wrong, please tell me why I have to Embed all the characters to see the text field when I apply a mask to the layer. Remember that the text field is not located in the Mask layer but below.
Flash Mx And Dynamic (ish) Text Fields
I have the following code in my flash movie
Code:
this.createTextField("myField_txt", 10, 5, 5, 130, 200);
myField_txt.html = true;
myField_txt.wordWrap = true;
myField_txt.htmlText = "<font face='Arial' size='12' color='#000000'><u><b><a href='myPage.html'>Click here</a></b></u> to continue</font>";
This all works fine and produces the look I want, however, is it possible to make this text change color when it's moused over (like can be done in regular HTML). Can this be done in Flash MX ? Maybe using Flash MX CSS styles or something ?
Thanks in advance for any help or links,
Stephen.
Flash Text Fields With Images
HI buddies,
i m new to flash scripting, i made a chat in flash/php, i have flash input field in which i need to insert images. can anybody tell me is it possible to embed(load) images in flash input field?, plz give me any idea or reeference.
thanx in advance
Dyanmiclly Generated Text Fields In Flash 5
I'm not sure if this is possible but...
you know how in a ASP pages you can have new fields generated as the user requests.
say I want the user to enter a number and based on that number entered I then want that number of textfields made available for them to enter data into.
can you do this in flash somehow?
thanks
Jason
Flash 5 In DIrector 8.5 - Paste In Text Fields
Another quicky!
I have just found out that (at least by default) you cant paste into F5 input text fields when the swf is embedded in D8.5.
Copy works OK< as you can copy from an F5 text field and past into, say textpad, or the Director message window, but you cant paste (or cut - cut only works as copy i.e it copies the hilighted section to the clipboard, but it does not modify the field and remove the selection.
Anyone else come across this, have and ideas, got a solution???
Cheers.
Olz.
Flash MX And HTML In Dynamic Text Fields
I've created an interface for an application that was written in VB. The VB app outputs data to a txt file and is formatted in HTML with rows and columns.
I'm having trouble getting my dynamic text feild to read data in the txt file that is formatted in HTML.
The txt does load, however, the tags are all displayed.
Anyone have any ideas on how to solve this problem?
Flash HTML Text Fields And The A HREF Tag ?
OK, I am having a curious problem with a flash html text field and a link
within that field. To see the exact problem I am having, all you have to
do is create a new flash movie, and paste the following code into the
first frame:
Code:
this.createTextField("myField_txt", 1, 10, 10, 400, 50);
myField_txt.html = true;
var myLink = 'http://today.reuters.com/news/newsarticle.aspx?type=topNews&storyid=2005-07-03T015629Z_01_N02673880_RTRIDST_0_NEWS-GROUP-LIVE8-SUNDAY-DC.XML';
trace(myLink);
myField_txt.htmlText = "<A HREF='"+myLink+"' target='_blank'><U>click me</U></A>";
Now all this code does is create a new text field in the flash movie, make
it an html text field and then create a link within the text field.
...so my question, is why doesn't this link in the flash movie work ???
It takes you to the reuters website, which is correct, but it just leaves
you on a blank reuters page that says We're sorry... this story is
not currently available
HOWEVER, if you copy just the link from the above code (or copy it from
the trace window once you run the flash movie - I made it trace for
good measure) and then paste that exact same link into your browser,
you will be taken to the correct reuters page displaying the article in
question.
So my question is why isn't the flash html text field linking correctly ???
Can it only accept links of a certain length or something ?
Thanks for any help, pointers or advice on this one - it really has me stumped.
Stephen.
[Flash 8] Clear Input Text Fields
Hello,
i want to clear my input text fields when i click on them but this doesn't seem to work and i don't know where the problem is.
I instance named the textfields and as script i use:
textfield.onSetFocus = function(){
textfield.text = "";
}
can somebody help me please ?
i'll add the fla where you can find the textfield. i only put the actionscript on "naam"
Why Does Handling Text Fields Suck So Bad In Flash?
Anybody have any good tips on working with text in Flash & AS3?
I have a dynamic text field that shows up on screen with default value, but then when I change the value with AS it no longer appears? I've tried using TextFieldAutoSize.LEFT, I have my classes imported for working w/ text, I have my instance name set properly, I have the fonts embedded!!!! what's the deal?
text in Flash seems to always be an issue, but why, it seems so basic?
plz help, thx!
Input Text Fields Error In Flash 8
After creating a inputtextfield and assigning a variable name, try to retrieve the content and you will get the html tags... Don't move anything and change to flash 7 the problem disappears... go back to 8 and the problems reappears...
The only way to avoid this is by making all fields dynamic the moment before retrieving the data. After retrieving you change it back to input...
Anyone getting this problem?
Flash HTML Text Fields And The A HREF Tag ?
OK, I am having a curious problem with a flash html text field and a link
within that field. To see the exact problem I am having, all you have to
do is create a new flash movie, and paste the following code into the
first frame:
Code:
this.createTextField("myField_txt", 1, 10, 10, 400, 50);
myField_txt.html = true;
var myLink = 'http://today.reuters.com/news/newsarticle.aspx?type=topNews&storyid=2005-07-03T015629Z_01_N02673880_RTRIDST_0_NEWS-GROUP-LIVE8-SUNDAY-DC.XML';
trace(myLink);
myField_txt.htmlText = "<A HREF='"+myLink+"' target='_blank'><U>click me</U></A>";
Now all this code does is create a new text field in the flash movie, make
it an html text field and then create a link within the text field.
...so my question, is why doesn't this link in the flash movie work ???
It takes you to the reuters website, which is correct, but it just leaves
you on a blank reuters page that says We're sorry... this story is
not currently available
HOWEVER, if you copy just the link from the above code (or copy it from
the trace window once you run the flash movie - I made it trace for
good measure) and then paste that exact same link into your browser,
you will be taken to the correct reuters page displaying the article in
question.
So my question is why isn't the flash html text field linking correctly ???
Can it only accept links of a certain length or something ?
Thanks for any help, pointers or advice on this one - it really has me stumped.
Stephen.
Clearing Dynamic Flash Text Fields
Hello,
What I'm Attempting To Do::
I'm trying to make textfield1_txt & textfield2_txt Clear, once the submit button is released.
---
A description of my Flash File is as follows:
I have 2 text fields on my Flash stage:
- textfield1_txt
- textfield2_txt
I also have a movie clip that Im using for the submit button:
- submit_mc
Please note that currently, once the submit_mc is released, my ActionScript has a function which checks to ensure that some type of data is present in the boxes, and the the form submits. If there are any errors, currently an error message displays:
Please enter information in textfield1_txt
Please enter information in textfield2_txt
Can someone please point me in the right direction for clearing the text fields on release of the submit_mc?
Thanks!
Sending Multiple Text Fields Out Of Flash
Sorry to bother everyone. I have a rudimentary question, but I am new to this are of Flash. I have a form in an SWF with two input text fields. In my Actionscript, based on the Flash Tutorial under help, I've got my submit button going out of the SWF to an external page, in my case a Cold Fusion page. my getURL looks something like this "
Flash/PHP Form With Text Fields And Checkboxes
where to start! - i'm new to this! - and i'm running out of time!
ok. i am trying to create a form in flash that will post results to a nominated email address. the form contains some text fields - 'firstname' 'phone' 'email' 'address' .... blah, blah..... and some checkboxes. Thus far i have got the checkboxes working, but my text field entries come thru blank. Also i am trying to make some text fields mandatory. at the moment if i hit submit it sends it anyway!
Any help would be greatly appreciated
Attach Code
stop();
_root.clear_butt.onPress = function() {
firstname="";
phone="";
mobile="";
email="";
address="";
time="";
}
var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();
_root.sender.onRelease = function() {
if (!email.length || email.indexOf("@") == -1 || email.indexOf(".") == -1) {
status_txt.text = "Invalid Email.";
} else if (!firstname.length) {
status_txt.text = "Missing Name";
} else if (!address.length) {
status_txt.text = "Missing Address";
} else if (!phone.length) {
status_txt.text = "Missing Phone";
} else {
senderLoad.email = email.text;
senderLoad.address = address.text;
senderLoad.phone = phone.text;
sender.firstname = firstname.text;
}
if (_root.check_email.selected == true) {
senderLoad.check_email = "Yes";
} else {
senderLoad.check_email = "No";
}
if (_root.check_mail.selected == true) {
senderLoad.check_mail = "Yes";
} else {
senderLoad.check_mail = "No";
}
if (_root.check_phone.selected == true) {
senderLoad.check_phone = "Yes";
} else {
senderLoad.check_phone = "No";
}
if (_root.check_newspaper.selected == true) {
senderLoad.check_newspaper = "Yes";
} else {
senderLoad.check_newspaper = "No";
}
if (_root.check_direct_mail.selected == true) {
senderLoad.check_direct_mail = "Yes";
} else {
senderLoad.check_direct_mail = "No";
}
if (_root.check_agent.selected == true) {
senderLoad.check_agent = "Yes";
} else {
senderLoad.check_agent = "No";
}
if (_root.check_referral.selected == true) {
senderLoad.check_referral = "Yes";
} else {
senderLoad.check_referral = "No";
}
if (_root.check_visit.selected == true) {
senderLoad.check_visit = "Yes";
} else {
senderLoad.check_visit = "No";
}
if (_root.check_info_yes.selected == true) {
senderLoad.check_info_yes = "Yes";
} else {
senderLoad.check_info_yes = "No";
}
senderLoad.sendAndLoad("sendit.php", receiveLoad, "POST");
}
receiveLoad.onLoad = function() {
if (this.sentOk) {
_root.gotoAndStop("thank");
} else {
_root.gotoAndStop("again");
}
}
Flash MX NewB Question Re: Text Fields
Hello,
Can anyone PLEASE either steer me to a tutorial or perhaps explain how to do this. I'm working on a flash page that I need to assign values to 2 text fields and a button. The fields are for username and password and a go button. It will pass the information to a php script.
I know how to do this and have it working with html but I need to make it work with the flash page. I made the 2 fields and the button. How do I assign the values.
The html code I have is . . .
<form action="http://mydomain.com/phpgdv2/index.php" method=POST name=theform>
<table border=0>
<tr><td colspan=2> Please log in below.
</td></tr>
<tr>
<td class=sectiondesc>
Username
</td>
<td>
<input type=text name=username size=20 class=inputfield>
</td>
</tr>
<tr>
<td class=sectiondesc>
Password
</td>
<td>
<input type=password name=passwd size=20 class=inputfield>
</td>
</tr>
<tr>
<td> </td>
<td>
<input type=submit name=_phpguarddoglogbut value=Submit>
</td>
</tr>
</table>
<script language=JAVASCRIPT>
document.theform.username.focus();
</script>
<input type=hidden name=_phpguarddogaction value=login>
</form>
In advance I thank you for your assistance.
Best Regards,
BassSolo -
Flash HTML Text Fields And The A HREF Tag ?
OK, I am having a curious problem with a flash html text field and a link
within that field. To see the exact problem I am having, all you have to
do is create a new flash movie, and paste the following code into the
first frame:
Code:
this.createTextField("myField_txt", 1, 10, 10, 400, 50);
myField_txt.html = true;
var myLink = 'http://today.reuters.com/news/newsarticle.aspx?type=topNews&storyid=2005-07-03T015629Z_01_N02673880_RTRIDST_0_NEWS-GROUP-LIVE8-SUNDAY-DC.XML';
trace(myLink);
myField_txt.htmlText = "<A HREF='"+myLink+"' target='_blank'><U>click me</U></A>";
Now all this code does is create a new text field in the flash movie, make
it an html text field and then create a link within the text field.
...so my question, is why doesn't this link in the flash movie work ???
It takes you to the reuters website, which is correct, but it just leaves
you on a blank reuters page that says We're sorry... this story is
not currently available
HOWEVER, if you copy just the link from the above code (or copy it from
the trace window once you run the flash movie - I made it trace for
good measure) and then paste that exact same link into your browser,
you will be taken to the correct reuters page displaying the article in
question.
So my question is why isn't the flash html text field linking correctly ???
Can it only accept links of a certain length or something ?
Thanks for any help, pointers or advice on this one - it really has me stumped.
Stephen.
Flash Slow When Text Loaded In Dynamic Fields
Everything runs pretty smoothly until my text is loaded. Processor usage jumps to 100%. What causes that? Should I have cleared the values of my dynamic text variables after loading?
Flash MX 2004: Changing Input Text Fields
Hi, I was wondering if anyone knows how to change the text in an input text field when you click on it? Without the cursor changing from its default cursor (the cursor you get when you highlight any text field). Basically I have a input text field and its default text is "Name Here". When they click on that text field I am trying to get it so it'll change from "Name Here" to a blank text field. I can do this by converting it to an Movie Clip and adding Name = "". But then this causes my cursor to change to a finger. I tried myMovieClip.useHandCursor = false but this just changes it to the default pointer. Which isn't what I am looking for. I'm looking for the default cursor when you highlight over a input text field. Thanks for everyones help.
Trouble With Flash Mx2004 And Dynamic Text Fields>>someone Must Have Come Across This
There must be someone out there who can help me, im not new to flash or to actionscript but ive tried about three different ways to load text into a dymanic text box and none of them work, need someone with more experience than me to tell me what the hell is goin on!?
Basically i have a single flash file which is the main body of the website im building, in the center of this i have a movie clip with a black border that loads all the different sub sections (small flash files themselves) of the site when user clicks on relevant buttons eg. 'about me', 'showreel' and so on. everything works fine so far.
However, I have a dynamic text field set up within these mini flash files which wont load when the whole thing is played. Thing is when i preview each sub flash file eg 'aboutme.swf' the text loads fine but when that whole flash file is loaded into the bigger parent site the animation still works but text doesnt! so frustrating! ive seen people on here with similar problems but no one seems able to give answer? think it may have something to do with referencing but i need code if this is case.
ive currently got main site file of untitled7c.swf which has a movie clip with instance name "main" within it, this movie clip is coded to load all the different flash mini sections. within the flash mini sites i have code like this that loads the text>>
loadVariablesNum('intro.txt', 0); the dynamic text box has instance name of showreel and variable name showreel, and text file has the appropriate variable to match so i know thats right (plus it works on its own) should the code be more like this? >>
loadVariablesNum('intro.txt', _root.level0.Main.scrollwindow);
therefore drilling down to where the dynamic box is located? by the way that peice of code doesnt work so it must be wrong somehow. and if that peice of code is more like what it should be then should it be in the script pane of the sub flash section ie. aboutme.swf or on the root timeline script pane?
PLEASE SOMEONE HELP IM GOING INSANE WITH THIS!!!!!
thanks to anyone who takes the time to help,
ade30004@port.ac.uk
www.dink.org.uk/index5.htm (site in question)
Input Text Fields (flash Form) QUESTION
Ok i'm just lost here. I guess I could be considered a newbe although i'v been working in flash along time I have seemed to get around this for a while but it's time to figure it out because My client want a flash form. Basicly a very simple form with just 2 or three input text fields and a submit button that sends the info to a certain email address. I have done a search and found some fla's but they require further asp config. and i'm defintly not experienced in asp or java. If anyone has a really simple way for me to go about this or even if you have a fla that I could work from i would really be greatful. Basicly just two or three text fields and a submit button that it's configured to send the info to a email address. Can someone point me in the right direction.
thanks in advance
“
” Syntax In Flash Text Fields > Email Forms
So, here’s the code:
this.sendButton.onRelease = function() {
var subject:String = "Appointment Request";
var cr:String = "
" +" "; // “cr” = “Carriage Return” plus “tab”.
var body:String = "Appointment Details" + cr + cr +
"Client Name: " + _root.textFields.userName.text + cr +
"Client Email Address: " + _root.textFields.userEmail.text + cr +
"Client Contact Phone: " + _root.textFields.userPhone.text + cr +
"Preferred Date: " + _root.textFields.userDate.text + cr +
"Preferred Time: " + _root.textFields.userTime.text;
var s:String = "mailto:appointments@sorepoint.com.au?subject= " + subject + "&body=" + body;
getURL(s, "_self", "GET");
}
Now, here’s the problem: The resulting email form will not recognize the “
” syntax. It simply puts the contents of all the text fields on one line.
Tested on Mac OSX 10.4.5, Mail 2.0.7 as well as Windows machines. Same result for both. I’m using Flash8Pro and AS 2.
I have already tried using <br> and
and all the other options I can find with Google. No difference.
Others I have asked have had the same problem, but no-one has an answer. There must be someone who has found the solution somewhere on planet Earth!
Here’s the link to see the problem in situ: http://www.sorepoint.com.au
Appreciate wisdom (and wit) from any sagacious and perspicacious souls.
Coding In Two Html Dyamic Text Fields In Flash
How do I have two html text files I created to appear in flash CS3 using actionscript 2.0. I was able to make one work. But when I tried to add another one, I entered the same code in frame 1 of my .fla file, just changing the symbol names and text name in the coding and niether of them show up. When I take out the other coding that I added the other one works. Do I change the name of the LoadVars function? What do I do?
Here is what my actioncode looks like in frame 1. I added the actioncode to the text box also for both dynamic text fiels symbols. Just in case you were wondering.
Attach Code
stop();
// create a variable for a LoadVars function and name the variable myLoadVars
var myLoadVars:LoadVars = new LoadVars();
// when myLoadVars is called from Frame 1 of symbol webcontentInfo execute this function
myLoadVars.onLoad = function (success) {
// if the external text file was loaded into memory successfully load the text into
// the dynamic text box webNewsinfo
if (success) {
_root.webcontentInfo.webNewsinfo.htmlText = myLoadVars.webNewsinfo;
// if the text file did not load successfully display an error message in webNewsinfo
} else {
_root.webcontentInfo.webNewsinfo.text = "An error occurred loading the requested content.";
}
}
// create another variable for another LoadVars function and name the variable myLoadVars
var myLoadVars:LoadVars = new LoadVars();
// when myLoadVars is called from Frame 1 of symbol mcStudyinfo execute this function
myLoadVars.onLoad = function (success) {
// if the external text file was loaded into memory successfully load the text into
// the dynamic text box caseStudyMC.
if (success) {
_root.mcStudyinfo.caseStudyMC.htmlText = myLoadVars.caseStudyMC;
// if the text file did not load successfully display an error message in caseStudyMC
} else {
_root.mcStudyinfo.caseStudyMC.text = "An error occurred loading the requested content.";
}
}
Loading MySQL Data Into Flash Text Fields
Hey, I'm trying to load two fields from a MySQL database into one dynamic text field in Flash.
I use a PHP script to move the data from MySQL to Flash and Flash uses the PHP to load the data.
Heres the PHP script...
<?PHP
//Connects to the database
$link = connNBT();
//Get the stories from the mysql database
$query = "SELECT story, UNIX_TIMESTAMP(date) FROM newsTable ORDER BY date ASC ";
$result = mysql_query ($query)
or die ("Query failed - $query");
$i = 0;
$returnData = "";
while( $myrow = mysql_fetch_row($result) ) {
$story = $myrow[0];
$date = date("F j, Y", $myrow[1]);
$returnData .= "&story" . $i . "=" . $story . "&date" . $i . "=" . $date . "&";
$i++;
}
mysql_close ($link);
$data = "num=$i&" . $returnData;
echo $data;
//Function to connect to database
function connNBT() {
$link = mysql_connect ("localhost", "username", "password")
or die ("Could not connect");
mysql_select_db ("databasename")
or die ("Could not select database");
return $link;
}
?>
...and heres the actionscript I have in the first frame of my Flash movie...
function getStory() {
var myStories = new LoadVars();
myStories.onLoad= setStories;
myStories.load("storyEngine.php",myStories,"POST");
}
function setStories() {
if( this.num != "" ) {
for(var i=0; i<this.num; i++) {
displayNews.htmlText = this["story"+i];
}
}
}
____
Can somebody tell me why Flash isn't loading the MySQL data??
Positioning Xml Text Fields In Flash With Relative Width
Hello, I have a problem that I can not find the solution about XML and Flash text fields..
Let's say I have the flash where I want to show few text fields next to each other like that:
This is one xml driven text field | another xml text | more xml text from text field
How can I make the widths of the the fields relative to the content i.e not to have fixed widths and how to make each text field come next to the end of the previous.
I've tried
Code:
my_txt.autoSize = "left";
my_txt.multiline = false;
to make the width of the text field as long as the text content, but it doesn't seems to be working.
Thank you in advance.
Google Indexing A Flash Movie -- Reading Text Fields?
Hi folks,
I recently placed an experiment online linked to our homepage to try to determine if Google is really reading text content in a Flash document.
I chose some nonsense words: "flaven" and "gloven" and wrote up a Flash movie that contains two paragraphs of gibberish containing pretty high density of these keywords. I named the html file holding the movie to "flaven_gloven.html" and titled it Flaven Gloven, but added no meta tags or any HTML text to the page containing these keywords.
A week later Google has indexed the page, as it now shows up in a search for "flaven gloven". It appears to me, though, that the Googlebot has not read any of the text that appears in the content and that Google is returning results only because there is a link that points to the page from our homepage which it is already indexing and then the filename and title contain these words. The result listing shows no text at all.
So my question is do you think that indeed the Googlebot has not read anything INSIDE the swf? I had heard that it DID read text in simple swf's now, but this makes me believe that in fact it DOES NOT...
Just search for "flaven gloven" and take a look at the result and lend your opinion.
Thanks!
...I guess in the process of doing this I created my own Googlewhack, but I guess it doesn't count...
Retrieving Info From PHP Database To Go Into Dynamic Text Fields In Flash MX
Hi Everybody!
I have a question about how to retrieve info from a PHP database and inserting that info into dynamic text fields within Flash MX.
I am building a flash file containing a picture of the world and various locations highlighted. When you click on a location, it will bring up details of the contact person at that location.
All fairly straight forward so far...
However I would like to have the contact details retrieved from a database a colleague of mine is building in PHP. I know that the contact details will have to be inserted into dynamic text fields, but neither of us know the code to get Flash to reteieve the details from the PHP file.
Does anybody know of a tutorial on this subject, or has anybody here done this before - I'm gueissing its quite common, but I have never done it.
Hope someone can help!
Thanks very much
Deadhands
Elastic CSS-like Background/containers For Dynamic Text Fields In Flash?
Elastic CSS-like background/containers for dynamic text fields in flash? Anyone ever pondered this one? In CSS it looks like this:
Code:
box {
background: url(img/div-bottom.gif) no-repeat bottom left;
}
.box h3 {
background: url(img/h3-bg.gif) no-repeat top left;
}
I'm trying to create a dynamic text field on top of a nifty rounded button that conforms to fit the amount of text entered short of creating a lengthy function.
Help With Text Fields And Inputting Text From External Text Files
help with text files and paths
i need some help with input text field and text files.
i have a 'presentation' movie that has three buttons. these buttons influence a sliding menu that has three sections to it. the sliding menu is a movie clip made up of 3 separate graphic elements and is placed on the main stage. the code on the movie clip is:
onClipEvent (load) {
var a = 5;
var d = 3;
var newX = _x;
var oXPos = _x;
var myXspeed = 0;
}
onClipEvent (enterFrame) {
myXspeed = ((_x-newX)/a+myXspeed)/d;
_x -= myXspeed;
}
and the code on the frame action is:
fscommand ("allowscale", false);
var xPositions = new Array(0, 205, -190, -580);
function jumpTo (number) {
slider.newX = xPositions[number];
}
stop ();
i now want to be able to have an input text field on each separate element of the sliding menu that pulls text from 3 sepaprate external text files and i can't get it to work. i'm ok if i put the text field on the main stage and can pull the info in from a text file using
loadVariablesNum ("text.txt", 0);
placed on a frame action. how do i adapt this so that it works for a text field put on the sliding menu. and how do i work it if i have three separate text files and three different text fields? i'm not very good at understand the paths needed to reach certain elements within a movie and where to put these actions.
should the load variable be on a frame actions or on a button action and whats the path to my input text field???
any help appreciated - as its driving me mad.
thanks
eskymo
Changing Font And Size Of Text Added To Dynamically Created Text Fields
Whew.. That long-winded subject line pretty much covers it.
Link
In the galleries, I have text I am adding to a movieClip. I have been able to add the description text, change it's colour, but the font and size are not responding. I'm using FlashMX2004. Can anyone show me what I'm doing wrong? Here's the pertinent code:
_parent.Gallery.createTextField(["Txt_" + CVar], _parent.LevelCount + 1000, 175, _parent.EntryY, 325, 110);
_parent.Gallery["Txt_" + CVar].font = "Arial";
_parent.Gallery["Txt_" + CVar].text = _parent.Description[AVar];
_parent.Gallery["Txt_" + CVar].textColor = 0xFFFFFF;
_parent.Gallery["Txt_" + CVar].textSize = 25;
Thanks so much!
Dynamic HTML Text Fields Do Not Display Formatted Text?
Flashkit.com,
In Flash MX I am developing a lot of movies using dynamically populated html text fields. When the user does not have a font I used on their machine swapping happens on all dynamic and input fields. Only static fields display the corrent font. I make sure the text field properties are embedding the fonts. Still all of the dynamic html text fields do not display the formatted text. I have .fla samples I can email to anyone.
I have tried these macromedia solutions with NO success:
http://www.macromedia.com/support/fl...t_outlines.htm
http://www.macromedia.com/support/fl...namic_text.htm
http://www.macromedia.com/support/fl...haredfonts.htm
Does anyone have a working sample .fla they can send me?
-Jimmy
Dynamic HTML Text Fields Do Not Display Formatted Text?
Flashkit.com,
In Flash MX I am developing a lot of movies using dynamically populated html text fields. When the user does not have a font I used on their machine swapping happens on all dynamic and input fields. Only static fields display the corrent font. I make sure the text field properties are embedding the fonts. Still all of the dynamic html text fields do not display the formatted text. I have .fla samples I can email to anyone.
I have tried these macromedia solutions with NO success:
http://www.macromedia.com/support/fl...t_outlines.htm
http://www.macromedia.com/support/fl...namic_text.htm
http://www.macromedia.com/support/fl...haredfonts.htm
Does anyone have a working sample .fla they can send me?
-Jimmy
Input Text Fields Colours To Fade In And Out On Entering Text?
I am uploading a file with input text field that changes colour when you click in it - this is great, but what if i wanted the following:
in the initial state, the text box is grey as you can see, but when i click inside it, it fades to pink instead of suddenly just changing to pink. And likewise, when i click outside the box it fades back to grey.
You will see what i mean if you view the file.
it's mx not mx2004
Thanks.
Loading Text Into Mulitple Fields From A Single Text File
Hi there. I am trying, and failing(so no soucre) to make text load dynamically into multiple fields.
I am trying essentially to load text using only one text document- into several fields. This is so I can run a very primitive cms system in flash. (all the fields need to call different portions of the text.
If anyone understands what I mean and how it could be done, it would be great
|