Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to auto update rss xml in flash without whole page refresh?

Status
Not open for further replies.

DavidPlus

Programmer
Feb 20, 2007
38
NL
Hi all. I don't have experience working with flash . But i need a help adding auto update rss xml to a flash image rotator which is not made me(The author provided the source .fla file).Now flash pulls image url from a rss feed but if i want view updated rss i have to reload the whole page!!

I appreciate if any one help me modify this flash so it pulls data every 15 seconds automatically without refreshing the whole page. i know you might suggest to use javascript but i want to use this flash where javascript is disabled.I did some search and noticed flash has this auto update power but never found a good tutorial on how to do it!!

Currently flash image rotator pulls rss xml feed like shown below. I appreciate some one help in achieving this task.Thanks

Code:
<object type="application/x-shockwave-flash" data="./imagerotator.swf" height="180" width="448">
  <param name="movie" value="./imagerotator.swf" />
  <param name="allownetworking" value="internal" />
  <param name="allowScriptAccess" value="never" />
  <param name="enableJSURL" value="false" />
  <param name="enableHREF" value="false" />
  <param name="saveEmbedTags" value="true" />
  <param name="bgcolor" value="#FFFFFF" />
 [b] <param name="flashvars" value="file=externalfeed.php&autostart=true&transition=fade&shownavigation=false&rotatetime:4&shuffle=true" />[/b]
  <param name="wmode" value="transparent" />
</object>
</div>

Looking foward for some help.Thanks
 
Thanks it worked now. i think there was catch problem that didn't work before. Is there a way to hardcode externalfeed.php part inside flash itself :

Code:
<param name="flashvars" value="[b]file=externalfeed.php[/b]&autostart=true&transition=fade&shownavigation=false&rotatetime:4&shuffle

There are sites that doesn't allow any .php extention so could you tell me where inside flash i can tell it to look for externalfeed.php instead of passing externalfeed.php via param variables?
 
Yes you can hard code all of your FlashVars inside the SWF.

<param name="flashvars" value="file=externalfeed.php&autostart=true&transition=fade&shownavigation=false&rotatetime=4&shuffle=true" />

The above HTML is the same as having following in the frame 1 of the main timeline:
Code:
var file:String = "externalfeed.php";
var autostart:String = "true";
var transition:String = "fade";
var shownavigation:String = "false";
var rotatetime:String = "4";
var shuffle:String = "true";

Kenneth Kawamoto
 
kennethkawamoto thanks once again. do you mean i paste those varibles just before the following code?:

Code:
// Start the rotator
var irt = new com.jeroenwijering.players.ImageRotator(this.rotator);
function startNewRotator():Void {
    irt.loadConfig();
}
setInterval(this, "startNewRotator", 15*1000);

Furthemore,How to display other image information such as title,creator, info beside using the url from following xml:

Code:
<playlist version="1" xmlns="[URL unfurl="true"]http://xspf.org/ns/0/">[/URL]    
<trackList>       
 <track>           
 <title>Grass by Night</title>            
<creator>Jeroen Wijering</creator>           
 <location>image1.jpg</location>            
<info>[URL unfurl="true"]http://www.jeroenwijering.com</info>[/URL]      
  </track>      

</playlist>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top