Slicing Text Fields
I have an input textfield containing a long string. I want to divide the textfield into two seperate textfields, with the first one containing the beginning of the long string, and the second one containing whatever cannot be fitted into the first textfield.
As far as i can figure, the first step is to identify the index of the last visible character in the first textfield (it contains the whole string but only shows the first part of it) - How can I identify the last visible character in a textfield.
Another approach is using the scroll value - but then the problem is how to slice up the string in the right place.
Any pointers, ideas or downright help will be greatly appreciated.
I am at my wits end.
FlashKit > Flash Help > Flash ActionScript
Posted on: 02-18-2003, 05:25 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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
Slicing?
I have a picture of a man's hands, his lft hand is holding a pen and he is writing something down. I would like to seperate the picture so that I have only the man's writing hand. Just his one hand so that I may animate him writing his name. How do I do this? I suppose after I manage to seperate the hand from the picture I can then make it inot a JPG. Any help? Thank you...
Slicing Image
hi,
i am developing a Modern puzzle game. here i am doing manually slicing the image and kept the images in external folder. during the run time i am loading and placing the images in specified area in shuffled way.
Looking the sample image, rearranging the sliced images into original order. If it is getting final shape the game end.
here i don't want to do image sliced manually and putting into folder.
is it possible to do slicing the image thru action script during run time.
very urgent pls
withluv
Murali.j
Maxem India pvt Ltd.,
Slicing Effect
Hi There,
I would like to know how is this effect being done? For the images when mouse click it sorta gotten sliced and assembles as a whole for the next new image.
Here's the URL, for what I meant: www.256greys.com
www.vizimalompanzio.com (under Gallery button)
PS: Are there any websites providing tutorials on such special transition effects? Coz i've been surfing around quite alot of cooL websites..kinda impressed for the different kinds of effects they have created..mouse rollovers..page to page..etc.
Hopefully I could get some replies! Thanks!! =P
Slicing And Flash
I made a Template on Photoshop, sliced it in Image Ready, now I want to transfer all the gifs into FLASH, but the question is HOW do you do it. I know that I can get all 322 images and put it together like a puzzle, but that'd take way too long, and I might not even know which bar goes where since there were a lot of vertical bars, how can I go about doing this?
SLICING For HTML
hi, im so sorry for posting here, but i don't know where else to get help. i'm sure a lot of you flash users know about html, i met a lot of smart people.
well i need help with my site
if you look at all 3 links you'll see what im having a problem with:
http://www.geocities.com/hayangome/dentistry.html (original, but i need more content space in that gray box.)
http://www.geocities.com/hayangome/dentistryeww.htm (screwed up when i typed beyond)
http://www.geocities.com/hayangome/help.jpg (screenshot of image ready, don't know what im doing wrong)
i can't seem to figure out, why everytime i type beyond the contact us link, everything gets distorted. what im trying to do is to be able to type a lot of text like 1000s of text without that thing being distorted, can anyone help? thanks
[F8] Slicing A Png Dynamically
Hi all,
I'm creating an app that needs to allow the user to select an area of a picture (png) that they have previously uploaded to the server. I then need the ability to animate this selected area seperately from the png. I'm hoping to define the area in a similar way to paint packages, ie a "bounding box" type affair which joins points to points creating an irregularly shaped polygon.
I'm not after all the nuts & bolts of how to do this, but I do need suggestions on best approaches & the areas/classes that I need to look into.
Many thanks,
Slicing Images
Any ideas on how to take an externally loaded JPG, and using Pure actionscript, slicing it into a variable number of peices (all seperate movieclips in an array of course). Im thinking the Bitmapdata class might help.. Any thoughts?
Chris
Slicing Numbers Up
Good Morning All!!
Basically I have been making a game, and as you may expect there is a scoring system at the end. At present the scoring system works by adding and subtracting things...and eventually generates a number in a dynamic text box. Now what it is that I would like to work out, is to animate the score in a "gambling machine reel" kind of way, which I think will be easy enough... just using if's. But I need to know how to split a 4 digit number, for example
if (first_digit == 1){
so some funky stuff}
else of (first_digit ==2){
do some other funky stuff}
There is a slice function, not sure how to implement that into the generator. If anyone knows of anything like this could you please let me know.
Thanks
Slicing Vs What In Flash?
Hey all,
I have been making web designs for a while now, and didn't really touch flash until now. For some reason I am very bored with XHTML and CSS. Don't get me wrong, I just don't have the patience anymore to take the time to properly slice a layout and use CSS technique to design a web page
I am thinking of using flash to build web sites now, and have some questions.
Basically what in flash that is equivalent to CSS/XHTML coding?
AS3 - Slicing A String
Hi everyone!!
I am building a simple calendar/diary app. that gets the data from a database and displays it in Flash.
The data is sent by a PHP script that outputs XML. The Flash app. process the XML and with a for loop I create a string with HTML tags. That string is used by the "print" button to create a sprite with a textfield (which displays that string), if I have more than 10 rows of events I want to create an extra sprite to show records from 10 to 20 etc...
The way I am trying to do it is (this is an untested experiment):
ActionScript Code:
var myString:String="A long string with html tags...";//This is the string to be displayed
//First I check that there are entries to be displayed
if (myString.indexOf("<li>")!==-1) {
var index:int=myString.indexOf("<li>");
//I store the number of occurrences of the <li> html tag
//In this array I store the position (in the string) of each occurrence
var arrayOfIndexes:Array=new Array();
arrayOfIndexes[0]=index;
var i:int=1;
trace(index);
while (index!==-1) {//Loop to store the <li> positions
var newIndex:Number=myString.indexOf("<li>",index+3);
index=newIndex;
if(newIndex!==-1){
arrayOfIndexes[i]=index;
}
i++;
}
}
var numberOfEntries:Number=arrayOfIndexes.length;
if(numberOfEntries<11){
var myTextField:TextField=new TextField();
myTextField.htmlText="<ol>"+myString+"</ol>";
myTextField.x=myTextField.y=10;
addChild(myTextField);
}else if((numberOfEntries>=11)&&(numberOfEntries<=20)){
var myTextField1:TextField=new TextField();
myTextField1.htmlText="<ol>"+myString.slice(arrayOfIndexes[0],arrayOfIndexes[09])+"</ol>";
var myTextField2:TextField=new TextField();
myTextField2.htmlText="<ol>"+myString.slice(arrayOfIndexes[10],arrayOfIndexes[19])+"</ol>";
myTextField1.x=myTextField1.y=10;
myTextField2.x=myTextField2.y=110;
myTextField1.autoSize=TextFieldAutoSize.LEFT;
myTextField2.autoSize=TextFieldAutoSize.LEFT;
addChild(myTextField1);
addChild(myTextField2);
};
Is there a better way of doing this?
Slicing Stuff Out Of An Array
hi. i have an array that i want to strip things out of. i'm just unsure how to do it as i haven't worked much with the array object. here's what my array contains, it's a series of dates:
code:
xAxis = (2005-02-13, 2005-02-14, 2005-02-15, etc...)
what i want is a new array that strips out the year values, so i get s/thing like this:
code:
xAxis = (02-13, 02-14, 02-15, etc...)
i assume i need to use array.slice() but i'm unsure how. i read about it and it says you use starting and ending points but i don't want that, i just want this stripped out
code:
2005-
at every point it finds it in the array. anyone have any ideas?
thanks. -- fumeng.
Slicing And Dicing (or Maybe Splitting) ...
Hello,
Here is my code:
Code:
sectionTitle = topSection.title;
My problem is that sectionTitle = topSection.title which is exactly 1 Intro (thats the numeral '1' followed by 4 spaces, then the text 'Intro'). I just need sectionTitle to be Intro (no numeral and no spaces).
So I think my code needs to be something like
Code:
sectionTitle - topSection.title.splice(?, ?);
or
Code:
sectionTitle - topSection.title.split(?, ?);
or maybe even use lastIndexOf, or substr, or something else ...
HOWEVER, sometimes topSection.title will be 12 Course assessment (which is the numerals '1', '2' then 3 spaces then the text 'Course assessment') - so there is an extra numeral here but one less space before the text starts.
NOTE: there is always 5 chars (which are either numerals or spaces) before the course title text.
Any help is greatly appreciated.
Thanks,
Stephen.
Server Side SWF Slicing?
Hello All,
Maybe what im trying to do is far out on another planet but hey why not try. Does anyone know of a way to have a very large detailed SWF file on the server and with some type of script that selects the layers and the portion of the swf file that you want to send to the client?
Here is what i'm getting at, lets say you had a maze game, that lets say got more detailed the further you got you would want to have the ability to send only a slice that fits their screen and the detail level required for the area they are viewing.
I know this is VERY simple to do with PNG or JPG on the server with GD or anything else that could work with images. What i'm asking for here is a script compatible with PHP / Linux that would slice a SWF with vector graphics on it.
Regards,
Nick
String Splitting/Slicing
Ugh... I can't believe I'm having trouble with such a simple thing. I'm totally blanked out for some reason. Haven't coded in a year.
I've made an input textbox on the stage and made its variable "command." The user is going to type in 3 words total, each separated by a space. I'm trying to assign each of these words to a variable, so I'll have 3 variables total. (Wow).
I've tried using arrays and string splitting based on every time they hit the spacebar, but to no prevail. There's a very easy way to do this and I completely forgot how. Does it have anything to do with arrays?
As a sidenote, I later plan on making an if statement that will execute a function based on the users 1st, 2nd, or 3rd word, for example:
if (2nd_word == "circle")
{
drawCircle();
}
Help is, of course, appreciated! Thanks!
Image Slicing/masking
Hi All, can anyone pls point me to tutorial/example on how to do this http://www.winstarfarm.com?
I am trying to achieve the same "moving slices" effect as at the end of this intro.
Thanks
- J.
Slicing A Flash Movie Possible?
Hey all,
I was wondering whether it is possible to slice up a flash file into frames so that when i click a button, it can redirect a frame of the template to show information.
If yes, then how?
Cutting And Slicing, Array MindGame
Let me start with the script:
// Next triangle
N = arrAvv.length;
i = Math.round(Math.random()*N);
i--;
NT = arrAvv[i];
// Set triangles
eval("_root.lock.T"+NT+".st")="Y";
// Adjust array
arrFront = arrAvv.slice(0,i);
arrBack = arrAvv.slice(i+1,N-1);
arrAvv = arrFront.concat(arrBack);
// Loop
gotoAndPlay(3);
The array consists of the available numbers:
("1","2","3",...)
As I figured it, NT can't be the same number twice, right?
So a clip should be named every pass, and the array (arrAvv) gradualy emptied, right?
Well, no. Can you see what's wrong?
ThanX, cYa.
Image Slicing And Tile Replacement
Hello all.
I'm a bit of a weekend warrior when it comes to flash, so bear with me.
Basically, I'm writing an application to be used for Dungeons and Dragons. The idea is to replace traditional battle-mats and markers with a laptop and projector. Now, to the problem.
I'm using Filippo Lughi's method of slicing up a tileset image (http://www.flepstudio.org/forum/tuto...ipt-3-0-a.html -- great tutorial), placing individual tiles into an array, reading an array from a text file, then placing tiles from the tiles array on the stage corresponding the text file. Here's the troublesome bit of code.
Code:
var tilenum:int=0;
for (var k=0;k<currentMapArray.length;k++) {
for (var l=0;l<currentMapArray[k].length;l++) {
tilenum=currentMapArray[k][l];
var tileToAdd:MovieClip = new MovieClip();
tileToAdd = clips_array[tilenum];
addChild(tileToAdd);
tileToAdd.name = "tile-"+l+"-"+k;
tileToAdd.width=gridSize;
tileToAdd.height=gridSize;
tileToAdd.x = gridSize*l;
tileToAdd.y = gridSize*k;
trace(tileToAdd.name);
}
}
When the code is run, all of the tile names are traced, but only two tiles end up on the stage. The two that make it onto the stage are the last instances of each type of tile (image attached). It seems like each run through the loop replaces the previously placed tile if it's the same type. Does anyone have an idea why this is happening? No errors are thrown during compiling. When I check Objects, there are only two tile clips listed-- the two on the stage.
Any insight would be greatly appreciated. I can post the rest of the code if necessary. Thanks!
-Hero
"slicing Off' Part Of A Flash Movie
this is where the movie is (its the menu on the left)
http://mrsako.gotdns.com/newest.php
i lost the fla file for the movie so i cant correct this the way i should, what needs to happen is the very top of the video has that light blue line in it that shouldnt be there i want to just crop the video or something so that little part doesnt show up. is it possible to do this?
this is the code im using to put it in the page
Code:
<object type="application/x-shockwave-flash" data="menu.swf" width="158" height="262">
<param name="movie" value="menu.swf" />
</object>
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
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!
CSS In Dynamic Text Fields - Font-family Causes Text To Disappear
Hi,
I've set up my dynamic text field, and I can apply other CSS properties
successfully, but when it comes to the font-family property, the text
within the class just disapears.
Does anyone have any idea why this is happening? The problem occurs
even when selecting standard fonts such as arial.
Thanks,
Dylan James
Is It Possible To Rotate Dynamic Text Fields? Text Blanks Out
Im doing some xml-integration, calling in xml data into dynamic text fields. the text imports correctly, but i need to change the _rotation property. Whenever i do this, the text blanks out...is it not possible to apply rotation to a dynamic text field?
Mixing Vars And Text In Dynamic Text Fields..
Hi,
My preloader has a little percentage feature/dynamic textfield so it will show say 10%, 25% etc.
My code:
_root.loadedpercentage.text = Math.round((sofar/total)*100)+"%";
does not work. Doh!
It just shows the value of the percentage eg 10, 25 but the % character does not appear.
I really dont like dynamic textfields cos they dont like me. Can someone tell me whats wrong?
Cheers.
Steven.
Highlighting Text In Input Text Fields Automatically...
hi
i've searched the forums on this topic and attempted the solutions that i found but i can't get them to work the way i need to.. so here's what i need help with..
i have created a study planner that allows students to input the amount of hours they spend on particular activities during a day.. the total hours of the day remaining updates dynamically as does the amount of time remaining in a week.. to keep it all working nicely (and avoid a 'NaN' error) i force the value of the input box to always be 0..
what i would like to have happen is when the students click in the input box the 0 is automatically highlighted so they can just type over the top of it.. at the moment i just have an instruction telling them they need to highlight the 0 before they type but this just seems clumsy..
i got automatic highlighting working with textfield.onChanged but that only highlighted the text that the user has put in, ie after the textbox changed!.. i would like to avoid having to use a button as well.. any ideas would be greatly appreciated!.. i'm going round in circles.. i have attached the .fla
i'm using flash MX2004 professional...
thanks in advance,
sars
Modifying Text In Dynamically Created Text Fields
Is it possible to modifying text in dynamically created text fields? I've been searching on Google for hours and nothing came up. What I'm try to do is have an empty dynamic textfield (which would get a variable from an external file) duplicated serveral times (depending on the number needed). Though I'm pretty sure I can duplicate the dynamic textfield without a problem, it's the part where I'm trying to pass different variables into those duplicated textfields that I'm not sure how to do properly. Does anyone have any ideas?
Load External Text Into Multiple Text Fields
Can you load one (1) external .txt file into multiple text fields ?
I'm trying to create seperate variable names for the seperate text fields and reference them from one .txt file - - Is this possible ?
[F8] Dynamic Text, Text Fields And <a Href> Tags.
I have been trying to figure this out for a very long time. My company's web designer went MIA and left us with a Flash site that is very hard to update (and no original FLA's).I have resorted to decompiling his SWF's with pretty impressive success. Only thing I can't figure out how to do is get dynamic text displayed in a text field to accurately display funtional links. If I select the text field and click the "render text as HTML" button and export the SWF, no text appears at all. If I select use device fonts, the links work, but the text looks funny. I am using Flash 8, but saving as a flash MX 2004 document because I think that's what the designer used and... I guess I don't have a very good reason, it just seemed like the right thing to do... Also I'm exporting it as a Flash 6 movie because our web stats say that almost 10% of visitors have that installed. If it helps the code looks like this:
loadVariables("blahblahblah.txt", "_root.mcData");
stop ();
Any help would be hugely appreciated.
Text Input Fields, Under Masking, Text Not Visible
I'm not sure if this is true..
but that's what I've come to the conclusion.?
when I use a text input field, for an email submit form..
if I put a masking layer on top of the text input layer..
the input field is visible, but when you type in it, the text is not..
Is there any way to prevent this from happening?
Comparing Dynamic Text And Input Text Fields
I am hoping this is simple but I need some help on checking to see if a users input text in to a Input Text matches the text in a Dynamic Text that has be input from a text file.
I have the attached the fla and a single .txt file for evaluation.
I believe it is on the submitt button code where the if statement occurs I am stuck in seeing the actual problem.
Any help is appreciated.
Thanks
Modifying Text In Dynamically Created Text Fields
Is it possible to modifying text in dynamically created text fields? I've been searching on Google for hours and nothing came up. What I'm try to do is have an empty dynamic textfield (which would get a variable from an external file) duplicated serveral times (depending on the number needed). Though I'm pretty sure I can duplicate the dynamic textfield without a problem, it's the part where I'm trying to pass different variables into those duplicated textfields that I'm not sure how to do properly. Does anyone have any ideas?
Loading Text Into Text Fields From An External File…
I have a file supplied to me with a couple of text boxes in it.
My friends would like to easily update the content of these boxes by using an external text file.
I have tryed tests with the "loadVariables" property, but can't seem to get any text to load at all. I have a text file called "Content.txt" and the dynamic text box has an instance name of text1 (original I know) and a variable name of myText.
The beginning of my text document starts of with "myText = "…
The line of code I was using was
loadVariables("Content.txt", text1);
this produced no result… does anyone have any suggestions for this problem?
Cheers.
Joel
How To Stop Text Stretching In Dynamic Text Fields
Hi,
I have many dynamic text fields in my application, wih strings of various lengths in them. All the text boxes are the same size but the boxes with les characters in are stretching the text, is there a way to stop this?
Thanks for your advice
Changing Text Spacing On Input Text Fields
It appears to me that the text spacing tool ( AV ) in the properties inspector does not work on input text fields. All other tools do seem to work though.
I'm creating a form to be used by a classroom instructor to show students how each of the 200+ input text fields should be filled in. The months, days and years are individual cells. Currently, for the date cells, you must click on each cell, type in the number, click on the next cell, type in the number, etc. It would be nice to avoud the mouse click between theses inputs.
What I would like to do is spread out an input text field that will accept 4 characters (for the year). The character spacing is needed to align the characters up with the graphical input blocks.
Any ideas?
Thanks for helping.
Loading Text Files Info Text Fields On AS3
Hey guys, I am following some examples from Flash CS3 Help files and some portions of the ActionScript 3.0 Cookbook on TextFields. Here's the code I currently have on my first frame of the timeline. When I test the file, I get "TypeError: Error #2007: Parameter text must be non-null. at flash.text::TextField/set htmlText() at textFields_fla::MainTimeline/textFields_fla::frame1()"
What's wrong?
Attach Code
import flash.display.Sprite;
import flash.events.*;
import flash.net.*;
var source:String = "html.txt";
var dataFormat:String = URLLoaderDataFormat.TEXT;
var loader:URLLoader = new URLLoader();
loader.dataFormat = dataFormat;
var request:URLRequest = new URLRequest(source);
loader.load(request);
var myT:TextField = new TextField();
myT.autoSize = TextFieldAutoSize.LEFT;
myT.width = 300;
myT.wordWrap = true;
myT.htmlText = loader.data;
addChild(myT);
HTML Text In Dynamically Created Text Fields?
Hi,
I am creating a series of text fields to display data from an xml file.
eventClips[i].createTextField("url_txt",9,0,0,250,30);
eventClips[i].url_txt.htmlText = "<a href=""+child.attributes.url+""></a>";
I can't get the text fields that I am creating dynamically to accept html, why????
I have tried .html = true;
Am I really going to have to create my own button and use getURL?
what's the secret?
I am using flash 8, as2.
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
Text Fields - Distorting Dynamic Text
Hi there,
Can anyone tell me why text almost always deforms (shrinks or streches etc...) when it is dynamic?
I have a text field that is ARIAL BOLD, 18pt, black.
It looks fine, but when I make the text field dynamic and I do EMBED the font, the text looks terrible. The problems that occurr are never consistent.
Sometimes the text looks like it's 12pt, sometimes it is stretched out horizontaly, sometimes it's squished verticaly.....
The most common problem is that the text appears STRETCHED out horizontaly. if I make the text box an appropriate height for 18pt type, and say... 300 px long (wide) the text sometimes stretches (each letter looks very wide).
What can I do to solve this? I tried everything, and it seems like such a rediculous problem!!!!
I know several people who have the same issue, an no one has solved it yet.
Anh ideas?
Thanks in adnvance!!!!!!
Loading Text In Dynamic Text Fields
Using Flash MX.
In FlashMX I created a dynamic text box and typed my variable name in the variable field.
I created a text document...tried in Word and SimpleText...and in the first line typed the variable name followed by an = sign. It looked like this
about =
I guess after that I should type the text I want to be displayed.
On the first frame of the movie I added an action. LoadVariables and I typed the name of the text document in the URL field. It is living in the same place as my flash file.
I guess this is supposed to load the text document which loads a value for a variable which I have used to label my dynamic text element.
I did this following steps in a book called FlashMX Action Script for Designers by Doug Sahlin.
It's not working and I've tried it several times.
Anybody know of an easy way to load a text document into a dynamic text box?
<
-643
|