Hi,
Well the title of the thread is the question. I have tried searching for this and after several days of getting nowhere with it I decided I would ask.
So here's the deal. I am using Flash 8, I have a movie that reads information from an XML file. The trick is that depending on a selection on my web page I want the move to read a different XML file. This sounds simple enough right?
I thought so, pass the variables over to the ActionScript then use a Switch statement to determine which XML file to load.
Here's the HTML
-
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
-
WIDTH="600" HEIGHT="450" id="MyMovieName">
-
<PARAM NAME=movie VALUE="carousel6.swf">
-
<PARAM NAME=quality VALUE=high>
-
<PARAM NAME=FlashVars VALUE="schoolID=2">
-
<EMBED src="carousel6.swf" quality=high WIDTH="100%" HEIGHT="100%"
-
NAME="People" ALIGN="" TYPE="application/x-shockwave-flash"
-
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
-
</EMBED>
-
</OBJECT>
-
The in the ActionScript I have the following at the very top of the actionscript
-
import mx.utils.Delegate;
-
import mx.transitions.Tween;
-
import mx.transitions.easing.*;
-
-
var schoolID:Number = Number(schoolID);
-
-
var numOfItems:Number;
-
Then a littel further down I have the following Switch statement:
-
switch(schoolID)
-
{
-
case 1:
-
xml.load("test.xml");
-
break ;
-
case 2:
-
xml.load("icons.xml");
-
break;
-
}
-
When I view my page I get the flash object on the page but is not playing anything which suggests that it has dropped through the switch statement and loaded no XML file.
If I simply load an XML file it will work, using no parameters etc.
If anyone can help me out that would be great, I'll try to answer any questions but I am very new to all this stuff.
Many thanks
nathj