ActionScript 2.0 :: HTML Textfield Spacing Between Bullet And Text
Nov 25, 2008
Is there any way to control the space between the bullet and the text in an HTML text field? When I use the <li></li> tags it causes the text to be about 40px from the bullet like:
�____bullet 1
�____bullet 2
but I want it to look like:
�_bullet 1
�_bullet 2
(ignore the underscorE)
I tried messing with indent, leftMargin and others but with no luck. I'm publishing for Flash 8.
I'm currently making my own shoot'em up game where the player can switch between two player types which will fire their own bullet type in this case, squares and circles. I've setup the player switch function via pressing "space" button (switching between the two player types) and the default bullet type is "squares" and I'm not sure to approach the coding with changing the bullet type to "circles".I've written 2 classes for the bullet and player setup:Player Class: Creates instance of bullet on screen and enables the switch player type function
Bullet Class: Enables bullet properies and bullet types Player Class: Code:function onKeyDown(event:KeyboardEvent):void {if (event.keyCode == 32) //// pressing/holding "space bar" to function
I'm trying to make my platform game character shoot a gun, my character and gun are one movieclip and the bullet is another. The bullet mc starts on a blank frame with a stop() function, when I press the space bar the bullet mc plays from frame 2 which is a motion tween of the bullet quickly moving across the page. I've set the bullet's y and x values relative to the character mc so that the bullet always comes from the gun.
My issue is that if I press the space bar a bullet will fly out of the gun (great!) but if I press the space bar again, the first bullet disappears and the bullet animation starts again. I want to be able to shoot a new bullet every time I press the space bar without effecting the bullets that have already been shot.
I am trying to apply letter spacing to a dynamic textfieldI set it in the properties panel.I know that this does not work for newly added text.I searched the web and nothing I found works.when I try setNewTextFormat I get the errorWarning Migration issue The method setNewTextFormat is no longer supported. Use the TextField.defaultTextFormat property insteadhow do I use that defaultTextFormat, I tried this
PHP Code: import typewriter; var fmt:TextFormat = outputTextBox.getTextFormat()
Letter spacing doesn't seen to work for dynamic text fields in Flash. I use CS4 on Mac, player version 10.0.2. Does it also depend on the font that's used?
How can I control the spacing between paragraphs when there is no support for margin-top or margin-bottom? I don't want to add empty <p> or <br /> elements to my text since they don't allow exact control and insert too much space.
I can't seem to control my letter spacing (kerning) in my dynamic text field. I gave the field an instance name of about_txt and I loaded the text from a text document. The text shows up fine but it is all bunched together. Here is my code:
Code: var about_req:URLRequest = new URLRequest("about_txt.txt"); var about_1dr:URLLoader = new URLLoader(about_req); about_1dr.addEventListener(Event.COMPLETE, onComplete); function onComplete(event:Event):void{ about_txt.text = event.target.data; }var fmt:TextFormat = new TextFormat(); fmt.letterSpacing = 10 about_txt.setTextFormat(fmt);
No matter what value I put in for letterSpacing nothing seems to happen.
When i use html in my xml it seems that as3 add the html text hidden to the textfieldcausing an y moving because of the html. How can i do to use html in xml without adding it to the textfield?
i have 2 classes, one for ship one for bullet.i was trying to set the bullet.x to ship.x in the bullet class but it keeps telling me undefined. but clearly it is in my ship class.
I have a file with html text and html code. I load this (test.txt) into a dynamic textfield. Then I want to do this with String functions: String Str1 contains the value I want to search for in the textfield. Str1 = "<script language="javascript">AC_FL_RunContent = 0;</script> <script src="AC_RunActiveContent.js" language="javascript"></script>" Search textfield after Str1 remove Str1 value from textfield My goal is to clean my html-file/textfield after all script java tags. The tags that Flash CS3 automatic puts into HTML file to activate AC_RunActiveContent.js
I need to get the position (x,y) of the last char in a textField with html text inside. I try with numlines and getLineMetrics, but that only work for non-html text. If I have a text like
Code: <p>text one</p><p>This is the other text</p><br><br>
I need to have the position on the stage of the last "t".
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);
I'm loading a textField with addChild in a movieClip and want the external text file I am loading into this textField to render in the textField as HTML. I have attached the code I am using.
I'm trying to enclose an html site with a flash header and footer, the only way I know to do this is with an iframe. The issue I'm experiencing is a MASSIVE amount of excess space. look at [URL] to see what I'm talking about? This mega space was there before I put the iframe in however....how do I get that bottom menu to appear without having to scroll down to see it, whether there's an iframe there or not? Meaning, MUCH closer to the top of the screen. Here's my code so far:
I have a web page which has a SWF file embeded. I have an issue with the focus.
Steps to reproduce:
1)Click on a HTML Text Field which is inside a Iframe
2)Click on a Flex Field.
3)Begin to type some text.
Expected Result is the entered text should go in the Flex TextInput field but the actual Result is it goes into HTML text field.
This is the bug which was filed but closed without any resolution. The workaround suggested there doesnt work. ( bugs.adobe.com/jira/browse/SDK-12377 )
This is happening only in IE 6.0 and IE 7.0. Below is the live example. [URL]
I am looking for some sample fla files in AS2 where i can see a running example of dynamic text curve (bend) and spacing in between the text through their respective sliders.
I just upgraded to flash player 10.1 and there's an issue with a program that I've been working on. I'm copying text from a mysql table that is formatted with spaces and newlines (including spaces and newlines at the beginning of the text) into a textArea in Flex 3.5. Before the update,it worked fine. Now when AS retrieves the text from the table, it does not include the spaces and newlines at the beginning of the text.I'm using xml to retrieve the text.
I have added some bullet points in dynamic text but the gap between each one is massive, how can I get it so they are directly under each other.I am using the tag <li>
I am currently designing a countdown clock and I would like to add some spacing between the text. But every time I add the spacing it does not work. I just want the days to show and I need them to go over boxes that require the numbers to be spaced out.
how can I make the text to have 150% line space when it is HTML enabled? Currently I'm having <br><br> but that's a bit too much. I want it to be 150%.
I am trying to fix an interesting issue with a site. I have xml docs loading text into a site however the text is double spaced and not single. I believe i have all the settings correct in the doc to be single spaced but i cant upload the doc at the moment.
Im still relativly new to bringing in xml to flash, but i have read some tutorials and other pages on it. Everything is working fine except for the fact that all the text that isnt an attribute as lots of extra spacing infront of it. I made sure my i set ignoreWhite to true but it still is cuaseing those spaces.
I am new to the forum, I have used Flash MX 2004 for quite a while and had never had this problem, recently I gave my site a "facelift" in CS4 and I got it exactly how I wanted it, I exported the swf file and saved the flash file. That was a few days ago, Today I wanted to add a new piece to my portfolio so I opened the same exact file today and everything had shifted! SOOOO FRUSTRATING as I felt I had finally achieved what I wanted to. This is the one I was really happy with: