rhythmofrain
12-20-2004, 05:15 AM
I am displaying images in flash file retrieving the image path from asp files.
There is a form on asp page with three select boxes, in these three select boxes there are options to change the modelno, color and size of the image, the name of the image changes according to the option.
The problem is the variable(image) name changes on changing the option but the
loadMovie("http://192.168.0.6:2016/img/productImages/"+myVar);
is not refreshed everytime and the image remains the same.
In flash i have written
-----------------------
data_lv = new LoadVars();
_root.createEmptyMovieClip("empty_mc", 1);
data_lv.load("http://192.168.0.6:2016/product.asp");
data_lv.onLoad = function() {
empty_mc.loadMovie("http://192.168.0.6:2016/img/productImages/"+myVar);
}
-------------------------
and on asp page i have written
-------------------------
function doPassVar(){
mn=document.getElementById("group7").value
cn=document.getElementById("group6").value
sn=document.getElementById("group1").value
if(mn!="" && cn !=""){
img= new String("<%=image1Large%>")
p=img.lastIndexOf(".")
img=img.substring(0,p)
img=img+"_"+mn+"_"+cn+".jpg"
}
else{
img="<%=image1Large%>"
}
window.document.prodDisplay.SetVariable("myVar", img);
-------------------------
this doPassVar() function is called on onChange event of all three select boxes
I am able to load movie(dynamically) if i submit the form, but i want to do it without submitting the form.
There is a form on asp page with three select boxes, in these three select boxes there are options to change the modelno, color and size of the image, the name of the image changes according to the option.
The problem is the variable(image) name changes on changing the option but the
loadMovie("http://192.168.0.6:2016/img/productImages/"+myVar);
is not refreshed everytime and the image remains the same.
In flash i have written
-----------------------
data_lv = new LoadVars();
_root.createEmptyMovieClip("empty_mc", 1);
data_lv.load("http://192.168.0.6:2016/product.asp");
data_lv.onLoad = function() {
empty_mc.loadMovie("http://192.168.0.6:2016/img/productImages/"+myVar);
}
-------------------------
and on asp page i have written
-------------------------
function doPassVar(){
mn=document.getElementById("group7").value
cn=document.getElementById("group6").value
sn=document.getElementById("group1").value
if(mn!="" && cn !=""){
img= new String("<%=image1Large%>")
p=img.lastIndexOf(".")
img=img.substring(0,p)
img=img+"_"+mn+"_"+cn+".jpg"
}
else{
img="<%=image1Large%>"
}
window.document.prodDisplay.SetVariable("myVar", img);
-------------------------
this doPassVar() function is called on onChange event of all three select boxes
I am able to load movie(dynamically) if i submit the form, but i want to do it without submitting the form.