Hi,
We have a web page which loads a Flash flipbook. This flipbook grabs the content of an external XML file which lists the images to be used for each page. I need to be able to send a word or number into the flash file which is then picked up and used as the name of the XML file. This will allow us to use the same flipbook to display different content depending on different the variable we pass in, without having to have multiple versions of the flash.
So, having tried all the different places to add the querystring which I understand you use to pass the variable, I currently have this in the web page (note, "zone" is my variable and I'm trying to set it as 1 here)...
<script type="text/javascript">
AC_FL_RunContent( 'codebase',' ); //end AC code </script><noscript><object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase=" width="697" height="550">
<param name="movie" value="newbook.swf?zone=1" />
<param name="quality" value="high" />
<embed src="newbook.swf?zone=1" quality="high" pluginspage=" type="application/x-shockwave-flash" width="697" height="550"></embed>
</object></noscript>
...and in the actionscript I have replaced...
FFlippingBookCache.prototype.loadExternalXML = function(src) {
if (src != "") {
this.extXML.load("newbook.xml");
} else {
this._baseObject._onXMLComplete(false);
}
};
...with...
FFlippingBookCache.prototype.loadExternalXML = function(src) {
var myQueryStrings=this.loaderInfo.parameters;
xmlfile = myQueryStrings.zone;
if (src != "") {
this.extXML.load(xmlfile + ".xml");
} else {
this._baseObject._onXMLComplete(false);
}
};
Have also tried...
var xmlfile = trace(root.loaderInfo.parameters.zone);
FFlippingBookCache.prototype.loadExternalXML = function(src) {
if (src != "") {
this.extXML.load(xmlfile + ".xml");
} else {
this._baseObject._onXMLComplete(false);
}
};
...with no joy. Both ways it just displays no images.
I really am not an expert in Actionscript! Am I doing something wrong here?
thanks
We have a web page which loads a Flash flipbook. This flipbook grabs the content of an external XML file which lists the images to be used for each page. I need to be able to send a word or number into the flash file which is then picked up and used as the name of the XML file. This will allow us to use the same flipbook to display different content depending on different the variable we pass in, without having to have multiple versions of the flash.
So, having tried all the different places to add the querystring which I understand you use to pass the variable, I currently have this in the web page (note, "zone" is my variable and I'm trying to set it as 1 here)...
<script type="text/javascript">
AC_FL_RunContent( 'codebase',' ); //end AC code </script><noscript><object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase=" width="697" height="550">
<param name="movie" value="newbook.swf?zone=1" />
<param name="quality" value="high" />
<embed src="newbook.swf?zone=1" quality="high" pluginspage=" type="application/x-shockwave-flash" width="697" height="550"></embed>
</object></noscript>
...and in the actionscript I have replaced...
FFlippingBookCache.prototype.loadExternalXML = function(src) {
if (src != "") {
this.extXML.load("newbook.xml");
} else {
this._baseObject._onXMLComplete(false);
}
};
...with...
FFlippingBookCache.prototype.loadExternalXML = function(src) {
var myQueryStrings=this.loaderInfo.parameters;
xmlfile = myQueryStrings.zone;
if (src != "") {
this.extXML.load(xmlfile + ".xml");
} else {
this._baseObject._onXMLComplete(false);
}
};
Have also tried...
var xmlfile = trace(root.loaderInfo.parameters.zone);
FFlippingBookCache.prototype.loadExternalXML = function(src) {
if (src != "") {
this.extXML.load(xmlfile + ".xml");
} else {
this._baseObject._onXMLComplete(false);
}
};
...with no joy. Both ways it just displays no images.
I really am not an expert in Actionscript! Am I doing something wrong here?
thanks