ActionScript 3.0 :: Get All The Menu Elements Formatted?
May 26, 2009
I have an XML menu. The text is nested inside a movieclip in order to activate the hand cursor. Each menu element has two listeners that activate the following functions
When I use the following code I get all the menu elements formatted (the proper way is only the one choosen - should be formated!)
Code:
function buttonModeTrue(event: Event):void {
trace(event.target);
for (var i:uint=0; i < MC_text.numChildren; i++)
[Code]....
I get no error in the output panel- but it doesnt work the way I want to Probably is something simple for someone that is used to "loop thing"...
View 11 Replies
Similar Posts:
Nov 14, 2009
I'm trying to develop a simple elastic menu in AS3. I have a class named "menu" to create a vertical menu with n elements using a MovieClip from the library. It is linked properly as "base_primaria" and with MovieClip class as base class. Every element in the menu is in button mode and when is clicked calls a method (crearsub) to create a submenu. I have another class named "submenu" that creates a submenu with n elements using a MovieClip from the library. It is linked properly as "base_secundaria" and with MovieClip class as base class.
All the elements in the main menu must be relocated depending on the .y position and their .height. For that I'm using a method inside "menu" class named "posicionar". To animate the elements I use TweenLite. The first problem is I want to relocate all the elements through TweenLite and it is not working. Probably the "posicionar" function is wrong. The second problem is I want to click in one element from the main menu and it creates its own submenu. If there is one element with a submenu created, it must to disappear. All the elements must to relocate in real time in every click.
Here the "menu" class code:
Code:
package classes.menu{
/** * ... * @Roman Perona */
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.display.MovieClip;
import flash.events.Event;
[Code] .....
View 7 Replies
Jan 26, 2010
Is it generally to position elements relative to other elements or in absolute values?
View 2 Replies
Oct 1, 2009
does anyone know how to shift all the array elements by one or more without deleting the array itself?
Something like rotating the array:
1,2,3,4,5,6,7,8,9,10
10,1,2,3,4,5,6,7,8,9
9,10,1,2,3,4,5,6,7,8
8,9,10,1,2,3,4,5,6,7
7,8,9,10,1,2,3,4,5,6
View 4 Replies
Jun 9, 2010
When i create a menu, the dropdowns go behind the flash element. But in some sites, like Digg, it is shown above. z-index is of no use
View 2 Replies
Jul 10, 2009
I made a .as Class where some graphical elements are spawned into the stage. However, the Flash (.fla) have some internal graphics that are supposed to be over the graphical elements spawned from the custom class.I tried to make another layer over the layer where the as3 Class is being called, but unfortunately it doesn't do anything, the graphic from the .as still appearing over the internal .fla graphics.
View 2 Replies
Jan 31, 2010
It is simple to format text with setTextFormat. But is there any affective method for retrieving all the styling that has been made on the text? getTextFormat is known but it doesn't work on text that varies in formatting.
View 2 Replies
Jun 3, 2011
I am getting the following error:
#1088: The markup in the document following the root element must be well-formed
I am calling a php script from AS3 that grabs some XML data from a website and echos it to a page.
myLoader.load(new URLRequest("http://www.mywebsite.com/my_test/my_Weather.php"));
to get around a cross domain issue.The XML when viewing source in browser:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="latest_ob.xsl" type="text/xsl"?>
<current_observation version="1.0"
[code].....
View 1 Replies
Feb 2, 2010
I need to have a text input box which allows/forces the entry to be formatted as a time code (00:00:00)...
View 4 Replies
Jul 20, 2009
I need to load data from an xml file.The data i'm loading has basic formatting like italic, bold. The formatting is applied in the xml file and the other formatting is in a css file.I have used code from a tutorial which loads both xml and the css file. The code works fine, if I load the entire xml in my text field.If I want to load data from one of the xml node which has Italic tag then it returns a null value.
View 1 Replies
Dec 8, 2010
I have XML files formatted with XSL. They look great on IE.
Now how do I do the same with Flex (not AIR)? I would like to use something like TextArea and not data grid.
View 2 Replies
Jun 10, 2011
Is it possible to formatted text or a formatted text document (. doc) to bring into flash to TextField
View 3 Replies
Oct 29, 2009
I have some text fields which have to be displayed with a style I have previously loaded from a CSS document. There are two choices to choose from, but both have some hitch I cannot resolve by myself:
- If I decide to embed a font and use it along with the other CSS properties, I don't know how to associate this font to the text field, because if I do this: myTextField.embedFonts = true, no text is displayed.
- If I decide not to embed fonts, so that I use the CSS font-family property, I've checked that the text is not displayed the same way in different monitors: while in my PC it is displayed smooth and sharp, in another appears kind of jagged. Moreover the animations of non-embedded fonts are not the best option (the text must have an animation which includes a mix of fading and scale).
View 2 Replies
Aug 30, 2010
People have asked how to make a text editor with css formatting before and the answer has always been with reference to the manual - "it can't be done".But what if you didn't accept that something can't be done?I'm thinking some sort of translation class to convert between textformat and css.Or bin the css for the moment of editing and then reapply when the user has finished.
View 3 Replies
Jun 17, 2006
Ok, So I made a text box and named it info. Then the AS
[Code]...
so...nothing happens..."Not" doesn't even show up. Something simmilar happend to me when I followed a flash guestbook tutorial somewhere, the guestbook tried to inset and such so the guestbook would seem formatted, but nothing happend "Instead of this" "I got this" I've embedded uppercase, lowercase, num, and punc Arial 11 pt bitmap
View 5 Replies
Jul 28, 2010
So this code works fine in terms of rendering and formatting text:
PHP Code:
var ss:StyleSheet = new StyleSheet();
var H1:Object = new Object();
H1.fontSize = 24;
[Code]....
But the fonts are not embedded. If I want to reduce the textfield's alpha or rotate it or some such operation, I need to embed the fonts.
If I uncomment tf.embedFonts = true; then the text disappears.
So what's the next step? I'm familiar with various ways of embedding fonts --using fontName with a Library font, or embedding using the Flex SDK in FlashDevelop. But I don't know how to approach either of those in the case of text formatted via CSS.
View 9 Replies
Aug 10, 2010
I have an XML with a node formatted as follows:
<headline2 width="500"><![CDATA[<spane class='Headline'><span class='LinkTo'><a href="/us/success/collateral.aspx">your collateral<br /><span class='HeadlineSmall'>get info about it here</span></a></span></span>]]>
How would I retrieve the URL contained in the a href attribute? I have tried a number of ways: @a, @ahref, @href, as well as CDATA.@a, CDATA.@ahref, CDATA.@href and am stumped.
View 5 Replies
Nov 14, 2009
I have a form and everything is components: labels, comboBox button. I have applied a text format to all the elements.I want the user to select a font from the combo box drop down and then all fonts change. However, I can only get this to work when I don't apply any textFormats to my components initially. I know in as2 you had to setNewTextFormat, is it somewhat similar with this setStyle?
Here is my code:
package
{
import flash.display.*;
import flash.events.*;
[Code]....
View 13 Replies
Oct 2, 2010
I know that I can use CSS styles with HTML-formatted text in Actionscript. I have TextField, and there is HTML-text such as b and p tags. I want to change styles of those elements. I know a lot of CSS, but I don't know how to use it with Actionscript 3 and Flash. Here's my code.
[Code]...
View 3 Replies
May 9, 2011
I want to have a text field that accepts only time formatted text. ie HH;MM:SS AMDo I do this with the restrict parameter? If so how?
View 3 Replies
Jan 9, 2011
I am developing an web application in flex which have a feature of recording the runtime by having a snapshot of each frames then encoding it into a ByteArray for video playback. I am currently using NetStream.appendBytes() for playing the ByteArray FLV. It is working, but I just found out about OSMF and thinking bout integrating it in my application. It is it possible to play the flv byteArray in OSMF?
View 1 Replies
Jan 8, 2009
I am trying to create an application that will display dynamic text formatted with CSS using XML, this part is complete.
changing the background of a movieclip using an external file such as xml, css, or txt files.
View 1 Replies
Feb 2, 2010
I have a text field and I want to import text to it and then format that text using an external .css file and it all needs to be done in AS3. I can easily load in the .txt file - but I cannot seem to get it formatted.
View 3 Replies
May 24, 2011
How I can get this html formatted text to display correctly in the body of an email, when I am using mailto:? I am trying to avoid using a PHP aggregate, so I can use the mailto: and have it open the users email program directly. Here is what my code looks like, with the style of string that my client would like to use to populate the body of the email .
Code:
public function handleEmailClick(e) { ......
var emailVar = "mailto:"+""+"?subject="+emailSubject+"&body="+big String;
var request:URLRequest = new URLRequest(emailVar);
navigateToURL(request);
}
View 0 Replies
Feb 13, 2006
I have pre-formatted HTML in a textfile. Let me know if any of this might already be an error-source- I am currently too tired to try out alternatives: The textfile looks something like this:
HTML Code:
<p><img src='biathlon' vspace='2' hspace='4' width='40' height='40'></img>Alot of text</p>
<p><br></p>
<p><img src='biathlon' vspace='2' hspace='4' width='40' height='40'></img>Even MORE Text</p>
<p><br></p>
It's saved as a ".txt"-file... I didn't think that would really make a difference? What I want to do is load the file and dump it directly to an HTML-enabled textfield, using something like
Code:
if (loaded) {
TickerData_txt.htmlText = this;
}
in the function connected to the "onLoad".
If I use "LoadVars" as a handler to load the file, it gives me the raw data, something like "%3Cp%3E%3Cimg%20src=%27biathlon%27%20vspace%3D%27 2%27..." (you get the idea)... If I use an XML handler, it only gives me the first entry when I use "this" to send the file's content to the htmlText-field... probably because each entry in the file is enclosed by "<p>"-tags and the XML-handler considers the file to be over once the first closing "</p>" occurs?
What would need to be added to the file to make it load it all? Or what would I need to change about the function to make sure it sends the whole content of the file? When I use "trace" on the "this" that is loaded, it actually *does* give back only what it also sends to the textfield, even though the text-file contains several rows of that stuff.
View 1 Replies
Dec 10, 2004
I'm trying to load html-formatted text in from a file to put in a text area (which is set to render text as html text). The htmlFile instance is of XML type and it reads in the file correctly (I traced it) but when I assign it to the text area it reads as plain text instead of html-text. I use this code on loading event:[code]
View 1 Replies
Mar 18, 2012
how can I save formatted text in flash and maintain style(ie color, size, bold, italics) example:
in the input field I write something, then i make it bold, and blue. I would like to save this text in the edited form of bold and blue. how do I save that text FORMATED to a variable.
View 3 Replies
Dec 31, 2009
so I have a variable containing a date object. I want to convert it to a string in this format: dd/mm/yyyy. How could this be achieved?
View 2 Replies
Dec 29, 2010
I want to make an XML document from an HTML one so I can use the XML parsing tools. My problem is that my HTML is not guaranteed to be XHTML nor valid. How can I bypass the exceptions? In this string <p> is not terminated, nor is <br> nor <meta>.
var poorHtml:String = "<html><meta content="stuff" name="description"><p>Hello<br></html>";
var html:XML = new XML(poorHtml);
TypeError: Error #1085: The element type "meta" must be terminated by the matching end-tag "</meta>".
View 3 Replies
Feb 20, 2012
I want to display HTML formatted content from various sources inside a Flash Flex application. Flash supports HTML formatting in its text fields, however it is very limited compared to a web browser. Are there any scripts out there that will convert common HTML formatted text into a format that Flash can handle? My particular use cases are:Displaying HTML formatted emails inside FlashDisplaying RTF files inside Flash (after running an RTF2HTML conversion on the server)Displaying random HTML content copied and pasted from other sources into Flash
View 3 Replies