the .swf and .html files does not work while the .fla file works great

Hi I'm new to actionscript, and I have a question. The fla file works perfectly and runs the timer function and reads the xml file to create an RSS feed, but when I publish and choose HTML wrapper and then choose 14 Flash swf and html file load the photos and the text field but isn't something else please help.

Thanks in advance.

import flash.net.URLLoader;

import flash.net.URLRequest;

import flash.events.Event;

import flash.text.TextField;

import flash.text. *;

import flash.utils.Timer;

import flash.events.TimerEvent;

var RSSLoader:URLLoader = new URLLoader();

var RSSURL:URLRequest = new URLRequest ("http://sports.yahoo.com/soccer//rss.xml");

RSSLoader.addEventListener (Event.COMPLETE, RSSLoaded);

RSSLoader.load (RSSURL);

var RSSXML:XML = new XML();

RSSXML.ignoreWhitespace = true;

var title: TextField;

var desc:TextField;

var allText:TextField;

title = new TextField();

allText = new TextField();

var i: int;

function RSSLoaded(e:Event):void {}

trace ("xml load file here");

RSSXML = XML (RSSLoader.data);

for {(var selectedItems:String in RSSXML.channel.item)

title. Text = (RSSXML.channel.item [selectedItems] .title + "/");

title.wordWrap = true;

tfLog.text += title.text;

tfLog.wordWrap = true;

trace (title. (Text);

}

}

var t:Timer = new Timer (200);

t.addEventListener)

TimerEvent.TIMER,

function(EV:TimerEvent): void

{

tfLog.text tfLog.text.substr = (1) + tfLog.text.charAt (0);

}

);

t.Start ();

var picTimer:Timer = new Timer (2000);

picTimer.start ();

picTimer.addEventListener (TimerEvent.TIMER, timehandler);

function timehandler(event:TimerEvent):void {}

setChildIndex (getChildAt (7), 0);

}

A way around that is to have a PHP file on your server that reads the XML feed and your swf reads the data from the PHP file rather than directly from the external domain.

Tags: Adobe Animate

Similar Questions

Maybe you are looking for