Click to URL on RSS text not working on node variable.

Hi.
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 rollOverHandler 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()
     at flash.events::EventDispatcher/dispatchEvent()
     at flash.net::URLLoader/onComplete()
Here is the code....
var cssLoader:URLLoader;
//load the fake preloader
var preLoader = new loading_mc();
preLoader.x = 170;
preLoader.y = 50;
preLoader.scaleX = .7;
preLoader.scaleY = .7;
addChild(preLoader);
//This code loads and Parses the RSS feed
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onLoaded);
var dotExtension:String = "...";
var maxLength:Number = 0;
var xml:XML;
function onLoaded(e:Event):void {
     removeChild(preLoader);
     xml = new XML(e.target.data);
     var firstheadtext = xml.channel.item[0].title;
     var firstbodytext = xml.channel.item[0].description;
     var secondheadtext = xml.channel.item[1].title;
     trace(firstheadtext);
     trace(firstbodytext);
     trace(secondheadtext);
     //dtfa.htmlText = "<p align='left'>"+firstheadtext+"</p>"+"</br>"+ "<p align='left'>"+firstbodytext+"</p>";
     var myText:String = "<p>"+firstheadtext+"</p>"
     +"<span class='myTextStyle1'>"+firstbodytext+"</span><br/>"
     +"<br/>"
     +"______________________________________________________________________________<br/>"
     +"<br/>"
     +"<span class='myTextStyle2'>"+secondheadtext+"</span><br/>";
     function cssLoadComplete(event:Event):void {
          var sheet:StyleSheet = new StyleSheet();
          sheet.parseCSS(cssLoader.data);
          myTextField.styleSheet=sheet;
          myTextField.htmlText=myText;
     var myTextField:TextField = new TextField();
     myTextField.width = 500;
     myTextField.height = 240;
     myTextField.multiline = true;
     myTextField.wordWrap = true;
     addChild(myTextField);
     var req:URLRequest = new URLRequest("myStyleSheet.css");
     cssLoader = new URLLoader();
     cssLoader.addEventListener(Event.COMPLETE, cssLoadComplete);
     cssLoader.load(req);
     //This code handels the click through
     firstheadtext.addEventListener(MouseEvent.CLICK, handleFHTClicked);
     function handleFHTClicked(e:MouseEvent):void {
          navigateToURL(new URLRequest(xml.channel.item[0].link));
       firstheadtext.addEventListener(MouseEvent.MOUSE_OVER , rollOverHandler);
       firstheadtext.addEventListener(MouseEvent.MOUSE_OUT, rollOutHandler);
       import flash.text.TextFormat;
          // create the text format objects
          var overTextFormat:TextFormat = new TextFormat();
          overTextFormat.underline = true;
          var defaultTextFormat:TextFormat = new TextFormat();
          defaultTextFormat.underline = false;
     // add the event handlers
          function rollOverHandler(e:MouseEvent):void
           TextField(e.target).setTextFormat(overTextFormat);
          function rollOutHandler(e:MouseEvent):void
          TextField(e.target).setTextFormat(defaultTextFormat);
loader.load(new URLRequest("http://www.calgaryheraldonline.com/rss_echo.php"));
Any assistance would be appreciated.
Cheers
Forrest

If I un-nest the functions from the RSS loader, I get many more errors.
Here is my un-nested code;
import flash.text.TextFormat;
var cssLoader:URLLoader;
//load the fake preloader
var preLoader = new loading_mc();
preLoader.x = 170;
preLoader.y = 50;
preLoader.scaleX = .7;
preLoader.scaleY = .7;
addChild(preLoader);
//This code loads and Parses the RSS feed
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onLoaded);
var xml:XML;
function onLoaded(e:Event):void {
     removeChild(preLoader);
     xml = new XML(e.target.data);
     var firstheadtext = xml.channel.item[0].title;
     var firstbodytext = xml.channel.item[0].description;
     var secondheadtext = xml.channel.item[1].title;
     trace(firstheadtext);
     trace(firstbodytext);
     trace(secondheadtext);
     //dtfa.htmlText = "<p align='left'>"+firstheadtext+"</p>"+"</br>"+ "<p align='left'>"+firstbodytext+"</p>";
     var myText:String = "<p>"+firstheadtext+"</p>"
     +"<span class='myTextStyle1'>"+firstbodytext+"</span><br/>"
     +"<br/>"
     +"______________________________________________________________________________<br/>"
     +"<br/>"
     +"<span class='myTextStyle2'>"+secondheadtext+"</span><br/>";
function handleFHTClicked(e:MouseEvent):void {
     navigateToURL(new URLRequest(xml.channel.item[0].link));
firstheadtext.addEventListener(MouseEvent.MOUSE_OVER , rollOverHandler);
firstheadtext.addEventListener(MouseEvent.MOUSE_OUT, rollOutHandler);
// create the text format objects
var overTextFormat:TextFormat = new TextFormat();
overTextFormat.underline = true;
var defaultTextFormat:TextFormat = new TextFormat();
defaultTextFormat.underline = false;
//This code handels the click through
firstheadtext.addEventListener(MouseEvent.CLICK, handleFHTClicked);
// add the event handlers
// you only need these two functions
function rollOverHandler(e:MouseEvent):void {
     TextField(e.target).setTextFormat(overTextFormat);
function rollOutHandler(e:MouseEvent):void {
     TextField(e.target).setTextFormat(defaultTextFormat);
function cssLoadComplete(event:Event):void {
     var sheet:StyleSheet = new StyleSheet();
     sheet.parseCSS(cssLoader.data);
     myTextField.styleSheet=sheet;
     myTextField.htmlText=myText;
var myTextField:TextField = new TextField();
myTextField.width = 500;
myTextField.height = 240;
myTextField.multiline = true;
myTextField.wordWrap = true;
addChild(myTextField);
var req:URLRequest = new URLRequest("myStyleSheet.css");
cssLoader = new URLLoader();
cssLoader.addEventListener(Event.COMPLETE, cssLoadComplete);
cssLoader.load(req);
loader.load(new URLRequest("http://www.calgaryheraldonline.com/rss_echo.php"));
And now the errors are telling me it cannot access the undefined property of myText and firstheadtext.
I just don't understand what needs to be inside the onLoaded function and what has to be outside.

Similar Messages

  • Why RSS does not work with my OS X 10.8.2?

    Why RSS does not work with my OS X 10.8.2? There was no problem before the upgrade to the Mountain Lion.

    By clicking on the RSS icon I'm getting a message:
    "No RSS reader is installed. Safari can't open the feed because Safari can't display RSS feeds"
    In Chrome I get xml file of the RSS site.
    Should I buy something what I didn't need with the Snow Leopard?
    Thanks for your help.
    Message was edited by: PZA22

  • IPod model A1059, freezes, unresponsive to all click wheel entries.  Reset does not work.  Does not show up in ITunes or on windows explorer.  What is the problem and how do I fix it?

    IPOD model A1059 appears frozen and is unresponsive to all click wheel entries. Reset does not work.  Does not show up in ITunes or in Windows Explorer.  What is the problem and is there a fix?

    If you are unable to reset the iPod (assuming the hold switch is not in the On position either), then you'll have to let the iPod's battery fully drain. Then connect it to a charger and leave it to charge for a couple of hours.
    B-rock

  • Variable Text not working as dynamic header in Crystal report

    Dear Experts,
    I'm working Crystal report that connected to Query BEX SAP BW trough SAP integration kit,
    currently i have case that need report dynamic header using variable text from BEX query, but seem the variable text not working in Crystal reports. the header in Crystal report shown as Desription\technical name, not result from the variable text in Query BEX in SAP.
    In https://wiki.sdn.sap.com/wiki/display/BOBJ/Crystal%20Reports%20and%20BW%20query%20elements stated that the "Text variable" with "replacement path" is supported, but i don't know in my query is not working.
    i already set in Database -> options->  table and fields -> Show Both, but the text variable still not working.
    can you help me
    Crystal Reports 2008 12.2.0.290
    SAP Integration KIT 12.1.0.890
    Thanks
    Luqman

    Post your question BEX and B1 and classic SAP data source issues to the Integration Kit forum

  • Why is predictive text not working on my iPhone 5s anymore

    Why is predictive text not working on my iphone anymore

    Actually, I just found the answer to my issue in this thread: The type correct/predict function for mail and text in iOS 8.0.2 was working fine then suddenly disappeared and reverted to the old style. I've checked all settings that seemed appropriate. How do I restore? I actually liked the new version. 
    Which says "a thin gray bar with a white dash in the middle of it immediately above the keyboard, you can reopen the suggestions by sliding up with one finger on the white dash." 
    That did it.
    I too have noticed a change, it seems with the new IOS update. My Predictive setting is on, but it seems before it would come up more often in predicting words and also give me a few choices. Now, it's not coming up as much and only providing one 'predictive' word which is not always right. This change is not very useful.

  • HT201406 i'm having to double click everything & the slide feature is not working.  What's the problem?

    i'm having to double click everything & the slide feature is not working.  What's the problem?  Resetting fixes it for a couple seconds then it goes right back. 
    i.e. If I go to open my mailbox, i have to 1st select the icon. then double tap it to open.  same thing once I get to an email.

    At a guess, turn off VoiceOver:   Settings > General > Accessibility > VoiceOver.  Use three fingers to scroll.

  • RSS button not working!

    Hi,
    I have just added an RSS subscribe button to my site and it is not working.
    When i click on it it says that the URL (www.corekinetics.co.uk/corekinetics/welcome/rss.xml) is not available. I think i know why.......
    I want the url to point to www.corekinetics.co.uk/welcome/rss.xml NOT www.corekinetics.co.uk/corekinetics/welcome/rss.xml
    When i export my iWeb site to a folder (to upload to my domain name) it creates a root folder of CoreKinetics. When i upload the site to my server i have to upload the contents of this folder separately for it to work. To that end there is no CoreKinetics folder on the server just all the files that were in it.
    I'm pretty sure this is the problem, but dont know how to rectify it?
    Maybe i can configure the RSS button to point to the directory i want?
    or
    Perhaps i can change the configuration of the directories on my server so that i CAN upload the Corekinetics folder in it's entirety, and hopefully the original location the RSS button points to will work?
    Cedric if you are out there i could use your help agian?
    Can anyone help at all?
    Jonathan

    Looks like I finally figured it out.
    For future reference:
    I publish my site to the "Sites" folder. After publishing site "x" to a folder, the "Sites" folder should now have:
    - index.html
    - x (folder)
    You have to upload these to your server.

  • Texting not working correctly

    Last week I was working with Customer Service to get texting working on one of my lines, (removed) .  In doing so Customer Service added Text Feature to this line for $10 a month.  Text feature still does not work and I now want to remove that feature on that line.
    Subject was edited for brevity by: Verizon Moderator <<>>

    rbrylawski wrote:
    Do you by any chance have the Emoji Free app on your iPhone? Other's reported this some time ago and the common thread (and solution) was to get rid of that app. Here's a link you can click on to read that thread: http://discussions.apple.com/thread.jspa?messageID=12296289&#12296289
    That isn't the problem. I have the same problem with it typing a B or M sometimes when I double tap the space bar for a period. I have never installed that app and have no reason to.

  • RSS feeds not working in Mail

    Hello Everyone,
    My RSS feeds stopped working on April 12th. Two of them have given me feeds today but nothing from yesterday or the day before or the day before that. Very strange. I've tried quitting Mail, restarting my computer, control clicking on the individual feeds and folders and clicking update all feeds and the specific feeds. Any other tips?
    Thank you very much!

    Not sure if this counts as 'fixing' the problem; but here's what I did:
    * Moved ~Library/Mail to someplace else (I picked my desktop)
    * Open mail.
    * Watch as .Mac pulls in the configuration that was synced to .Mac.
    * Wait to download new mail (IMAP headers)
    I did have to manually copy the mail rules .plist, but other than that, things seem to be working as I want them to.
    Somehow, RSS started working.

  • IMOVIE Text Not working?

    I have Imovie and my text does not work. Every time i hit the text, IMOVIE starts to perform slowly and freeze up to the point i have to force quit. All the other buttons work (like the transitions, music, pictures) but not the text. I have no idea how to fix the problem. IMOVIE works other than that and i need text. Can someone give me a suggestion of what to do?

    Nvm >.>
    Fixed it last week.
    Turns out all I had to do was remove a Quartz Composer plug in that was effing up the graphics~

  • Double Click on Graphic in Map is not Working

    Hi,
    I had created an application where the user can click on map and a marker will be created and it stores x y values and stored in database and user can also drag the marker and place it to appropriate position and after the user drag and drop the marker we have a confirm button to send the x y values to database. I need to remove that confirm button and replace that with the double click where user double clicks the marker parameters should pass.
    For dragging marker i use mousedown event, but when i add doubleclick event its not working
    gr.doubleClickEnabled = true;
    gr.addEventListener(MouseEvent.DOUBLE_CLICK,registerComplaint);
    gr.addEventListener(MouseEvent.MOUSE_DOWN,mousedownGraphic);
    even when i comment the mouse down event double click on graphic marker is not working.
    Help me out in this task as i need to do urgently.
    Regards
    Arun Mohan

    While I can't possibly guess the cause your problem, there is an easy workaround for this.
    // record the time for the last mouse down
    private var _lastMouseDownTime:uint = new Date().time;
    // how fast the second mouse down needs to be to qualify for double click
    private var _doubleClickThreshold:uint = 500;
    // traces mouse down and double click
    private function mouseDown(e:MouseEvent):void {
                trace("mousedown");
                var mouseDownTime:uint = new Date().time;
                if(mouseDownTime - _lastMouseDownTime <= _doubleClickThreshold){
                    trace("doubleclick");
                _lastMouseDownTime = mouseDownTime;

  • Droid Mini notifications for email and text not working

    I am having a problem with notification sounds not working for email and text messages with my Droid Mini. I took my original phone to the Verizon shop. They did a factory reset. Sound worked for two days. Went back to Verizon and they reset it again. But they did tell me if it happened again to call Verizon and they would send me a new phone. Well it happened again. Got my new phone just last week. Well yesterday and today the sound notifications for text messages and email is not working on the new phone.  Last night I powered the phone off and back on and all was working well until this morning.
    This is very upsetting as I really do like this phone. Would like to know what is going on with it. Have checked all the volumes and they are all up.
    Is there a fix for this.
    Thank you.
    Barbara
    Edited to start new discussion and private info removed as required by the Verizon Wireless Terms of Service
    Message was edited by: Admin Moderator

    For Gmail it is: open Gmail > menu > settings > your gmail address > notifications check box is unchecked.
    There are some additional notification options for labels too.

  • OAM 11g "Failure URL" in Authoriztion policy not working?

    Hi,
    Per the subject, I am running OAM server 11g (11.1.1.3), with an OAM 10g Apache webgate.
    In the OAM Authorization policy (protected), I have specified a full URL for the "Failure URL", to get the browser to redirect when an authorization failure occurs.
    However, when I test with a user that does not have access (user authenticates ok, but doesn't have right to access the protected resource), instead of the browser being redirected, I am getting an "Oracle Access Manager Operations Error" page.
    I've been trying to figure this out, and have found several threads about this, e.g.:
    OAM 11g authz redirect URL not working?
    But, as I said, I am using OAM 11g server, and there is no "Inconclusive URL" in the policy settings (I guess there was in 10g, but not in 11g).
    I have trace logging enabled on the OAM server, and I can clearly see that the request is getting "results DENY", but there's no indication in the logs that OAM server is aware of any failure redirection URL.
    I've also got a header trace, and I can see that the browser is simply being re-directed to the "/oberr.cgi...." URL, so it' not going "somewhere else".
    So, does anyone know why the "Failure URL" is not working in OAM 11g in Authorization policies?
    Thanks,
    Jim
    P.S. The URL that it's suppose to be re-directing the browser to is in the Public resources under Authorization, and as I said, I don't see the browser even attempting to go to the failure URL, either via header traces or the OAM server logs.
    Edited by: jimcpl on Nov 5, 2011 8:53 PM

    Hi,
    Per the subject, I am running OAM server 11g (11.1.1.3), with an OAM 10g Apache webgate.
    In the OAM Authorization policy (protected), I have specified a full URL for the "Failure URL", to get the browser to redirect when an authorization failure occurs.
    However, when I test with a user that does not have access (user authenticates ok, but doesn't have right to access the protected resource), instead of the browser being redirected, I am getting an "Oracle Access Manager Operations Error" page.
    I've been trying to figure this out, and have found several threads about this, e.g.:
    OAM 11g authz redirect URL not working?
    But, as I said, I am using OAM 11g server, and there is no "Inconclusive URL" in the policy settings (I guess there was in 10g, but not in 11g).
    I have trace logging enabled on the OAM server, and I can clearly see that the request is getting "results DENY", but there's no indication in the logs that OAM server is aware of any failure redirection URL.
    I've also got a header trace, and I can see that the browser is simply being re-directed to the "/oberr.cgi...." URL, so it' not going "somewhere else".
    So, does anyone know why the "Failure URL" is not working in OAM 11g in Authorization policies?
    Thanks,
    Jim
    P.S. The URL that it's suppose to be re-directing the browser to is in the Public resources under Authorization, and as I said, I don't see the browser even attempting to go to the failure URL, either via header traces or the OAM server logs.
    Edited by: jimcpl on Nov 5, 2011 8:53 PM

  • Click on obiee dashboard tabs is not working

    Hi,
    One remote user using cisco vpn to access OBIEE dashboards. everything is all right but when he click on dashboard tabs is not working. I tried with firefox 3.6.0 and IE 8 both have same problem. we dont have this problem within the network. I dont think it's a firewall issue because everything else is working fine. we dont have any custom java script in obiee dashboards. Is it a browser problem? does any one else got this problem before?
    Thanks
    Jay.

    Hi Jay
    Yes Its browser issue. Please make sure the patch updates of IE are updated and i do have the same problem with IE 6 when user remotes (or) use citrix
    One more important point is we have made the dashboards available directly instead of residing in group folder. If you have Dashboards under group folder, give access to that Dashboard directly instead of Group folder
    Eg: Groupfolder A contains A1,A2,A3....A10 dashboards. Give acceess to A1,A2 instead of groupfolder A
    Please mark it Helpful or correct if this solved

  • Inline with text not working in pages 5

    I just upgraded to Pages 5.0. A lot of functionality has been removed, but also at least one feature that is there is not working for me. Inserting an image onto a document and setting up the image to "move with text" and "inline with text" is not working, as the image is staying fixed, and there is text wrapping around it. The interesting thing is that old images inserted and setup the same way using Pages 4.3 are moving with the text correctly, and there is no wrapping. Help!

    You will have to use File > Revert to or File > Export to > Pages '09.

Maybe you are looking for

  • Moving Part of iTunes to an External Drive

    Hi there, I was wondering if there was any way I could transfer only part of my iTunes libary to an external drive.  Specifically, I want to move the 16GB mobile applications folder for my iPod Touch to clear space on my drive on my MacBook Air, beca

  • Read-only AND Encrypted

    I am using Acrobat XI Pro: is there a way to make a file read-only AND encrypted?

  • Designer 6i (6.5)

    Message CDR-21207: Executable File Not Found. Cause The RAU was making an a call to another executable which it was unable to invoke. Action The two main causes are: 1. Check the RAU Parameters screen to see if any of the Registry variables for EXECU

  • Firewall on Solaris 10

    After reading docs.sun.com and searching avidly, can anyone point me in the right direction of how to setup the firewall Solaris 10 which is shipped. Any pointers would be greatly appeciated, not usually stumped bu this time I am regards, Paul.

  • Solaris Environment Manager maxs out memory.

    We have a forte system in production, running on two Solaris 2.6 boxes. Each has its own environment and they are connected. Our environments are called "Data Center" and "Call Center". Our Forte memory settings are fairly standard. We start at 20Mb