# Made changes without refresh page in flash if XML updated

**URL:** <https://forum.kirupa.com/t/made-changes-without-refresh-page-in-flash-if-xml-updated/275214>\
**Category:** flash\
**Created:** [November 11, 2008, 10:42am UTC](https://forum.kirupa.com/t/made-changes-without-refresh-page-in-flash-if-xml-updated/275214 "2008-11-11T10:42:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashwini6](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@ashwini6](https://forum.kirupa.com/u/ashwini6)\
**Post date:** [November 11, 2008, 10:42am UTC](https://forum.kirupa.com/t/made-changes-without-refresh-page-in-flash-if-xml-updated/275214/1 "2008-11-11T10:42:03Z")

</div>

I am playing 4 video in video component at a time using XML. And if XML is updated then without refreshing page I want updated result. I am using Flash 8 and Actionscript 2.0

XML file code is:

```auto
<?xml version="1.0"?>
<root>
  <video name="video1.flv"></video> 
  <video name="video2.flv"></video> 
  <video name="video3.flv"></video> 
  <video name="video4.flv"></video> 
  
  </root>

```

Actionscript code is:

> stop();  
> import mx.alert;  
> import mx.video._;  
> importXML = new XML();  
> importXML.ignoreWhite = true;  
> importXML.onLoad = function(success) {  
> if (success) {  
> var depth = 100;  
> var nextY = 10;  
> var root = this.firstChild;  
> // The root node  
> var attr = root.attributes;  
> var cnt123 = 0;  
> var video:Array = new Array();  
> var cname:Array = new Array();  
> for (var i = root.firstChild; i != null; i=i.nextSibling) {  
> var j = i.attributes.name;  
> video[cnt123] = i.attributes.name;  
> my\_btn_ = i.attributes.name;  
> cname[cnt123] = i.attributes.cname;  
> cnt123++;  
> }  
> for (var l = 0; l\<4; l++) {  
> var stt:String;  
> stt = video[l];  
> //trace(stt+“-----”);  
> if (!(stt.indexOf(“.flv”, 0))) {  
> video[l] = “novideo.flv”;  
> }  
> trace(video[l]+“\***“);  
> //trace(l+”**”+video[l]);  
> }  
> if (video[0]) {  
> my\_btn0.contentPath = video[0];  
> my\_btn0.volume = 100;  
> }  
> }  
> if (video[1]) {  
> my\_btn1.contentPath = video[1];  
> my\_btn1.volume = 100;  
> }  
> if (video[2]) {  
> my\_btn2.contentPath = video[2];  
> my\_btn2.volume = 100;  
> }  
> if (video[3]) {  
> my\_btn3.contentPath = video[3];  
> my\_btn3.volume = 100;  
> }  
> };  
> importXML.load(“video.xml”);

Can anyone help me!!!
