The .swf/.fla file already executes the php and diplays image from remote xml but the only thing it has old data if you do not refresh it. I guess i can't explain what i want. I wanted fresh data every few seconds by calling php automatically from within flash.
I tested your code by doing the follwoing:
-open a new flash document
-select the first keyfram of the defaul layr of the main timeline
-open action panel and past your code
-test your code by ctrl + Enter
when testing i did not see any thing in output panel !!
Actually i asked for help on how to modify current .fla and
still do not know where to use your code!! The current .fla reads data from remote xml with help of php but only does not update itself evry few seconds!!
Note: i have action script bible and it is myfirst day to work in flash
Here is part of the code i could view using .swf decompiler.Unfortunetenly i could not find it using flsh 8!!
Code:
// Action script...
// [Initial MovieClip Action of sprite 85]
#initclip 1
class com.jeroenwijering.players.AbstractPlayer
{
var controller, fileArray, fileTypes, fileParser, parseArray;
function AbstractPlayer(tgt, fil)
{
configArray.playerclip = tgt;
configArray.playerclip._visible = false;
fil == undefined ? (null) : (configArray.file = fil);
this.loadConfig();
} // End of the function
function loadConfig()
{
configArray.width == "undefined" ? (configArray.width = Stage.width) : (null);
configArray.height == "undefined" ? (configArray.height = Stage.height) : (null);
for (var _loc3 in configArray)
{
_root[_loc3] == undefined ? (null) : (configArray[_loc3] = unescape(_root[_loc3]));
} // end of for...in
configArray.displayheight == "undefined" ? (configArray.displayheight = configArray.height - 20) : (null);
if (configArray.fullscreenmode == "true")
{
var _loc4 = SharedObject.getLocal("com.jeroenwijering.players", "/");
configArray.file = _loc4.data.file;
configArray.captions = _loc4.data.captions;
configArray.fsreturnpage = _loc4.data.fsreturnpage;
} // end if
configArray.enablejs == "true" ? (this.enableLoadFile()) : (null);
this.loadFile(configArray.file);
} // End of the function
function loadFile(fil, tit, lnk, img, fid) {
if (controller != undefined)
{
controller.getEvent("stop");
delete this.controller;
} // end if
configArray.file = fil;
tit == undefined ? (null) : (_root.title = tit);
lnk == undefined ? (null) : (_root.link = lnk);
img == undefined ? (null) : (_root.image = img);
fid == undefined ? (null) : (_root.id = fid);
fileArray = new Array();
var _loc4 = false;
for (var _loc6 in fileTypes)
{
if (fil.toLowerCase().indexOf(fileTypes[_loc6].toLowerCase()) > -1)
{
_loc4 = true;
} // end if
} // end of for...in
if (_loc4 == true)
{
fileArray[0] = new Object();
fileArray[0].file = fil;
for (var _loc5 in fileElements)
{
_root[_loc5] == undefined ? (null) : (fileArray[0][_loc5] = unescape(_root[_loc5]));
} // end of for...in
if (configArray.fullscreenmode == "true")
{
var _loc7 = SharedObject.getLocal("com.jeroenwijering.players", "/");
fileArray[0].id = _loc7.data.id;
} // end if
configArray.playerclip._visible = true;
_root.activity._visible = false;
this.setupMCV();
}
else
{
var ref = this;
fileParser = new com.jeroenwijering.utils.FeedParser();
fileParser.onParseComplete = function ()
{
ref.fileArray = parseArray;
ref.configArray.playerclip._visible = true;
_root.activity._visible = false;
ref.setupMCV();
};
fileParser.parse(fil);
} // end else if
} // End of the function
function setupMCV()
{
controller = new com.jeroenwijering.players.AbstractController(configArray, fileArray);
var _loc5 = new com.jeroenwijering.players.AbstractView(controller, configArray, fileArray);
var _loc2 = new Array(_loc5);
var _loc3 = new com.jeroenwijering.players.AbstractModel(_loc2, controller, configArray, fileArray);
var _loc4 = new Array(_loc3);
controller.startMCV(_loc4);
} // End of the function
function enableLoadFile()
{
if (flash.external.ExternalInterface.available)
{
var _loc2 = flash.external.ExternalInterface.addCallback("loadFile", this, loadFile);
} // end if
} // End of the function
var configArray = {autoscroll: "", autostart: "", backcolor: "", bufferlength: "", callback: "", captions: "", displayheight: "", enablejs: "", file: "", frontcolor: "", fsreturnpage: "", fullscreenmode: "", fullscreenpage: "", height: "", lightcolor: "", linkfromdisplay: "", linktarget: "", logo: "", overstretch: "", playerclip: "", repeat: "", rotatetime: "", showdigits: "", showeq: "", showfsbutton: "", showicons: "", shownavigation: "", shuffle: "", streamscript: "", thumbsinplaylist: "", transition: "", volume: "", width: ""};
var fileElements = {title: "", author: "", link: "", image: "", id: "", category: "", start: ""};
} // End of Class
#endinitclip