ActionScript 3.0 :: Set Distances Between Text And Textfield Border?
Sep 15, 2009I've used this property a lot of times before, but now i can't remember/find it on livedoc.
View 1 RepliesI've used this property a lot of times before, but now i can't remember/find it on livedoc.
View 1 RepliesWould it be possible to make it so that e.g. a textField is visible outside of the swf boundary in some way? I have random dots in a banner that on MouseOver shows a text in a textfield by the mouse pointer, the textField however is too large due to the amount of text and gets cut off by the boundaries of the swf.
View 2 RepliesIf you take a look at my flash movie you will see that I have draggable movie clips, which contain dynamic text fields. These text fields contain text drawn in from a simple xml document. The problem I have is that the text in the text fields is hedged right next to the border of the autosized text box. This makes them look untidy and in the worst case difficult to read. I wonder how I can add some margin to the left and right of the text to fill in some space.The code which formats the text boxes is:
with (main["dragAct"+i].dragActText) {
text = actText[i+1];
background = true;
[code]....
I know that I should use pythagore to calculate the distance, but I need to calculate distance between 2 objectfs that are contained within 2 different movie clips. Something in the line of :
xdist = Math.round(follow.p1._x - photo1_mc.p1._x);
ydist = Math.round(follow.p1._y - photo1_mc.p1._y);
distancefromthis = Math.round(Math.sqrt((xdist*xdist) + (ydist*ydist)));
But distancefromthis contains always the same value, maybe it's because _x is calculated within the movie clip, so I need to find the photo1.p1._x in the stage.
I have a series of variables created that store the distances between two points. I need to find the shortest distance between the two points so I'm storing the results in an array, then sorting the array to show me the smallest number which is the shortest distance. But the problem I have is that I don't need the number I need the variable in the calculation that relates to that number. Make any sense? So if the equation (herexPos - column3Begin) produces the smallest number I need to be able to reference column3Begin after I've sorted the array.
[Code]...
How do I center text in within the border of a multiline Dynamic text field?
View 3 RepliesSo I've set myself a little project to build a bowman game. Everythings working smashing until the math at the point where the computer needs to figure out the power and angle to shoot the arrow back at you. What I've been working off is my knowledge from applied-math classes in school. I've been using the following formula where g is gravity, t is time (this would be in frames for flash), sx is the distance between the players, u is the initial force of the arrow and a is the angle we need to find. With a bit of moving around to seperate the angle, this becomes For my AS3 this translates to:
[Code]...
What happens is that it always fires the projectile at a very low angle that doesnt change to match the correct circumstances and I can't figure out how to get around this. Changing the force doesnt make any difference and the program will need to get around changing distances between the player so this math is pretty necessary (I think). Any math heads out there know what I should change?
I've been doing some simple text fades by keyframing the alpha values. Everything is fine on the stage, but when I publish it I can see a slightly translucent bounding box around the text. It's even visible on text I haven't animated. I've done fades before, but never ran into this problem. [URL]
View 14 Replieshow can i make a movieclip and a textfield to resize to the content of the text in the textfield? I mean, if I have a textfield with 3 letters font name XXX and then the content of the field change, how can i resize te textfield so the text dont autoadjust to the 3 letter space?
View 3 RepliesDoes anyone know, why a textfield may become white when loading text + JPGs into it? Sometimes it happens to me, sometimes not. I haven't figured out why. If you have any clues... The AS I'm using:
[Code]...
in as3 how do i get the text of a textfield to know when to line break according to the width of the textfield.
View 4 RepliesI have MovieClip with TextField in, how can I dispatch when change text in TextField or remove TextField or add something else.
View 3 Replies"be all end all" list of setStyle syntax for as2?
Specifically, I'm trying to change the border size of a text box.
Is it possible to change the border color of a text area in as3?Also, in what ways is a textarea different from a multiline text field?
View 2 RepliesI'm using evt.target.borderColor = 0xff00000 to successfully change the color of a dynamic text filed that is the target Now I'm trying to change the border size. borderSize isn't being accepted, so I was wondering if there is an attribute to change the border size of a text field? My internet searches are coming up with nothing that works.
View 1 RepliesHow would I make a dynamic text boxes border a certain color, along with background color.
View 1 Repliesi've created this class:[code]..........
but qhen i instence an HTMLText it says tom me:
TypeError: Error #2007: Parameter text must be non-null. at flash.text::TextField/set htmlText()at classi::HTMLText() at intro_sito_fla::MainTimeline/frame117()0
1) How can i set this parameter?
2) How can i get request.data value? It's not a string, so...?
When applying text formatting to a comboBox, the text formatting appears perfectly on the dropdown menu items but the textField text disappears.Removing the text formatting from the textField makes the textField text reappear but of course there is no text formatting.
Is there a trick to this.
how to tell the cursor(vertical text flasher) to jump to the end of the text in a input textfield - so that you can continue typing from the end of existing text?
View 5 RepliesI have a text field where user can type and few controls to customize the text properties like: font, size, color etc.If a user has typed say "Hello World", the caretindex is next to d of World. I want that if now the user makes some changes to the cusomization properties like: changes font size, then the text appearing next is of the font size set and not that of d. How can I do that?
View 1 RepliesI have a dynamic textfield that loads text from a txt file. The content of the txt file will be modified daily by the client.What i need is that if there is too much text in the txt file, the dynamic textfield resizes (and not only with autosize because the text can be really long).[code]it doesnt look very good but it works. The only problem is that if I have a really long text the maxsizeY doesnt work fine.
View 1 RepliesI have an application that combines words introduced by the user to create new words. I would like to be able to save the resulting combinations into an external txt file.
View 2 RepliesThe code I'm building creates two MovieClips on the stage, in one it instantiates several text boxes and in the other some buttons.
What I can't do is access data from the text boxes (e.g. textField.text) for use in the functions called by the eventListeners attached the buttons. I had the system all working nicely before I placed the text boxes and the buttons on separate movie clips.but this structure makes it much tidier to refresh the text I'm using.The button functions are fine with variables created prior to the building of the text boxes.
Am I failing to address the text boxes correctly (because they're on another movie clip) or is there a stage / movie clip property I need to set so they can see each other ... or is this something else altogether?Could it be that the buttons are created before the text boxes?
How would I make a dynamic text boxes border a certain color, along with background color.
View 1 RepliesI'm trying to build an RSS feed reader to display inside a swf on a webpage. I need to figure out how to create the RSS feed reader as it's the last bit I need to create for this website.
Here's the code I'm using:
var rssLoader:URLLoader = new URLLoader();
var rssURL:URLRequest = new URLRequest("http://teachercenter.scps.k12.fl.us/education/rss.php?sectiondetailid=69411");
rssLoader.addEventListener(Event.COMPLETE, rssLoaded);
rssLoader.load(rssURL);
[code]....
I keep getting an error message that reads:
1061: call to a possibly undefined method addItem through a reference with a static text type flash.text.Textfield.
found that code to display html format text to dynamic textfield in as3:
var url:String = "http://edeejay.dyndns.org:8000/currentsong?sid=1";
var loadit:URLLoader = new URLLoader();
loadit.addEventListener(Event.COMPLETE, completeHandler);
[code].....
Actionscript Code:
function createNames(){var counter:Number = 1; for each(var ca:Categorie in arrCategories) if(ca.Name == currentMonster.name) for each(var ch:Channel in ca.Children)
[code].....
I'm trying to set an onstage TextField instance's "text" property, while maintaining embedded fonts and its onstage appearance.Problem Encountered: Text doesn't show up when setting text via ActionScript on an on-stage TextField w/ embedded text.Workaround: Create and assign a TextFormat object:defaultTextFormat = new TextFormat('Arial', 100, 0x000000, true, true);Annoyance: This defeats the purpose of styling text with the IDE.
View 3 RepliesI load texts from xml files into one textfield. I use myTxt.text = ""; before loading each text to see it at the top of the textfield. It works fine in Opera an FF.In IE (all versions) the position of the previously loaded text is "remembered" and next text is displayed at previous text position.
View 9 RepliesI have a textfield in which I have to write data on load.I am passing value from embed tag which is working fine , but it does not change the value of text in textfield
View 1 Replies