Hi all 
I’m a bit of a newbie at ActionScript 3.0, I’m not really a programmer (I’m more used to just using the visual stage, timeline and library), but have found a lot of useful information so hopefully someone can help.
I’m working on a picture and tag displayer through flash, and the server-side programmer has done the PHP, mySQL (for uploading pictures), passed the pictures into XML so I can call these pictures from an array, ready for me to use. I have got so far as to display these images and tags on the interface, but after thirty seconds the pictures should be refreshed (the XML gets rewritten and the objects are ready to be passed) - which is where my problem is.
What I have tried is since I add an instance of the document.class (Main.as) on the first frame, which runs the program to display the dynamic images, I thought I could simply remove this instance after 30 seconds of running it, and then add it again, like so:
import Main;
var main:Main = new Main();
stage.addChild(main);
var refreshTimer:Timer = new Timer(30000);
refreshTimer.addEventListener("refTimer", refreshScreen);
refreshTimer.start();
function refreshScreen(events:TimerEvent) {
stage.removeChild(main);
//main = null;
//main = new Main();
stage.addChild(main);
}
However, the code doesn’t do anything - I know the function is running (I’ve taken out the various traces I had for a counter), and if I only include the stage.removeChild(main) then the screen blanks…which is half way there! But if I include the stage.addChild(main) at the end, then it looks as if nothing is happening. At the very least the positioning of the images would change (as they are randomly placed on the stage) if the program was refreshing, but there is nothing.
There is probably something fundamental I’m missing, but I’ve looked at other similar posts on the forum (http://www.kirupa.com/forum/archive/index.php/t-259120.html, and http://www.kirupa.com/forum/showthread.php?t=265651) but they don’t seem to apply. Even a point in the right direction would be grand. 
Any help, even if just a point in the right direction, is greatly appreciated - I’ve been stuck for a while now!