ActionScript 3.0 :: Click To URL On RSS Text Not Working On Node Variable?
Feb 18, 2010
I have a RSS feed parsed into one text box and am using imported CSS to format the text in one Textfield that was created with as3.Problem is my roll over and click handler functions for making each text variable a link to the XML URL link will not work unless I point the function at the entire text field. I just want the individual text variables made from the RSS Title nodes, to be set to react to my handleFHTClicked, rollOutHandler and ollOverHandler functions. The movie runs Ok parsing the nodes and picking up the CSS, but I get this error in the output window when it reaches the aformentioned functions..
TypeError: Error #1006: value is not a function.
at AS3_CSS_external_file2_fla::MainTimeline/onLoaded()
at flash.events::EventDispatcher/dispatchEventFunction()
My prblem is I have a node that doesnt always have something in it. It is used for url's so i put an if statement but it still puts a message even if its blank. here are my codes to explain better:
I'm using ActionScript 2.0 with Flash CS4 Professional, andI'm running into conflicting info on how to do this depending onwhich Flash book I'm looking at (and is that really a surprise?).1) I want the user to type text into a text field and thenFlash places what they've typed into a variable.So I created a text field of the type 'Input Text' andassigned this variable 'myInput'2) When the user presses a button, I want Flash to look atwhat is in the variable. THEN... If they have typed the correctword, they are sent to frame 19. If they type anything else, theyare sent to frame 38.In this example, the correct word is: "move"So, I placed this script on the button:
on (release) { trace(myInput); if (myInput = "move") {
I am working on a line rider/ free rider style game in flash (which is coming along quite nicely ). For the whole night I've been trying to create a way to save and load data simply off text and have finally come up with a basic solution for it! I have my information all stored into an array neatly to be later used with the function lineTo upon load. My problem here is that when I actually input the data into the textbox to be picked up by the load button it does not draw the lines like its supposed to.My load button has the following code:
onClipEvent (enterFrame) { onRelease = function() { var points = new Array(_root.xInput);[code]......
I want to have a menu where you click on a node and lines are drawn to its sub menus, any links to examples or tutorials would be great p.s a mind map is like these: [URL]
I'm trying to access RootNode in the code from anywhere inthe timeline. I assigned a value in the loadFile function but whenI try to access it from outside this function I get "undefined".How can I have this easily accessible from anywhere in the code? Iknow _global.RootNode will not work for XMLnode types.
I want to store the name of an xml node in a static var like so:[code]but when then i go and wrtie for example:myxmlList:XMLList = myXml.NODENAME;it is non working.what kind of variable do I need to use??
I need accessing a value in my arrayCollection in Flex 3. var f:String; I need to access the photoFilePath where series = f. So if f=2, then I need /pics/my2.png So, pseudo code: myAc.(series="f").photoFilePath <mx:ArrayCollection id="myAC"> <mx:Object label="Label 1" series="1" photoFilePath="/pics/my1.png" pageTitle="First"/> <mx:Object label="Label 2" series="2" photoFilePath="/pics/my2.png" pageTitle="Second"/> </mx:ArrayCollection>
i get this error when i retrieve an XML that only has 1 node (no repeating nodes) and i try to store in an ArrayCollection. -When I have MORE than 1 "name" nodes...i do NOT get an error. My test show that XMLListCollection does NOT work either.
TypeError: Error #1034: Type Coercion failed: cannot convert "XXXXXX" to mx.collections.ArrayCollection.
this error occurs as the line of code:
myList= e.result.list.name;
Why can't ArrayCollection work with a single node? I'm using this ArrayCollection as a dataprovider for a Component -is there an alternative I can use that will take BOTH single and repeating nodes as well as work as a dataprovider?
code:
[Bindable] private var myList:ArrayCollection= new ArrayCollection(); private function getList(e:Event):void{ var getStudyLoungesService:HTTPService = new HTTPService();
In a nutshell, I'm trying to create a dynamic text box in which text show up for one XML node but not for another, so I have some XML nodes that have info in them and others that don't. This seems like it would be a realatively easy thing to do, but I've been working on figuring out how to do so for days with no avail. I'm working on a template for my portfolio gallery at: [URL] I've linked pdfs to just some of the images in my modified xml slideshow from the tutorial using the following code from this forum:
I have an AdvancedDataGrid tree with a ArrayCollection as its dataprovider. Now, for instance, i drag a leaf from one node to another node. To catch the event I'm adding a Listener to dragComplete.
[Code]...
My Problem: I want to know the new node where the leaf was dropped. Actually i would have expected that in the event there is a property like dropParent. This is not the case.
I thought this was going to be easy! I would like to search an XML file for a particular data set i.e. set of nodes depending on a passed variable. However, storing a subset of my XML file via Code:var gallery = this.firstChild; and then searching 'gallery' as you would an array-using a for()-doesn't work since this.firstChild isn't returning an array
I have a text properly read in from xml and displaying ok. But I'm trying to implement a link on one word in the text and that doesn't work. the xml node is [code] and should display;visit the website clicktext but displays;url... The code generating the html text field seems to work ok (it creates "arial font"), that specifc part goes;[code]
I am trying to create a text node within a child node: user_xml.firstChild.appendChild( user_xml.createTextNode("<![CDATA[------]]>") ); But when I trace this I get: user_xml = <UserDetails><![CDATA[------]]></UserDetails> Which is not what I need. What I need returning is: user_xml = <UserDetails><![CDATA[------]]></UserDetails>
When I try to get some text from a node into a textfield by using .nodeValue I get 'null'. When I use nodeType on that node the result is "1". I understand that a textnode should result in value "3". But how come this isn't the case here?
I have a Label component in my library list, and have placed an instance of it on stage named lowtemp_label. I've written the following AS3 script in my Main.as file that grabs 3 nodes from an XML web service. I want to send each of the 3 values to 3 separate label components. However, when I run the SWF, my label components do not display the data. How can I remedy this?
I'm querying an XML web service and am parsing 3 nodes per the code below. I want to send the resulting value to a label component. When I place the Label component on stage, and name it lowtemp_label, remove the default text value of Label and play the SWF, nothing shows up. How do I ensure that the lowtemp_label gets the returned low temp value?
Kirupa's tutprial "Using XML in Flash CS3/AS3" when filtering the node values, how can I match a text string say "Stephen" with "Stephen E. Ambrose" var authorList:XMLList = bookInput.Book.(author == "Stephen E. Ambrose"); Using the above code it only searches the node which author value is "Stephen E. Ambrose" but I want to search only "Stephen" and want to get this node returned.
I read Senocular's tutorial on XML and found it really useful. But I still have a problem: When I try to get some text from a node into a textfield by using .nodeValue I get 'null'. When I use nodeType on that node the result is "1". I understand that a textnode should result in value "3". But how come this isn't the case here? My xml looks like:
I have made it this far with much help and all was working well until the xml changed. Sometimes the c_Result node does not exist and my c_points text box returns 'undefined'. I have tried if(c_points != undefined){ etc which works to a degree but I don't know how to make the text box blank if the node doesn't exist and load the c_Result node if it does.
import mx.styles.CSSStyleDeclaration; _global.styles.TextArea = new CSSStyleDeclaration(); _global.styles.TextArea.setStyle("backgroundColor" , "transparent");[code].......