Hello --
I have some actionscript in my flash5 movie as follows:
I'm trying to set the 'point' variables with the following javascript on the html page:
If I set the variables inside the movie, then it works perfectly, but I can't seem to get the variables to send into Flash.
I had figured out a solution to this type of problem in Flash4 a while back, but I'm guessing the method has changed from 4 --> 5??
Any help greatly appreciated.
paul
I have some actionscript in my flash5 movie as follows:
Code:
var inputArray = new Array(2, 5);
var xArray = new Array(5);
var yArray = new Array(5);
var point0, point1, point2, point3, point4;
yArray[0] = 200-point0;
yArray[1] = 200-point1;
yArray[2] = 200-point2;
yArray[3] = 200-point3;
yArray[4] = 200-point4;
xArray[0] = 73;
xArray[1] = 110;
xArray[2] = 148;
xArray[3] = 185;
xArray[4] = 223;
setProperty ("point0", _y, yArray[0]);
setProperty ("point1", _y, yArray[1]);
setProperty ("point2", _y, yArray[2]);
setProperty ("point3", _y, yArray[3]);
setProperty ("point4", _y, yArray[4]);
for (i=0; i<4; i++) {
drawLine(xArray[i], yArray[i], xArray[i+1], yArray[i+1], i);
}
function drawLine (x1, y1, x2, y2, index) {
eval("line"+index)._x = x1;
eval("line"+index)._y = y1;
eval("line"+index)._xscale = x2-x1;
eval("line"+index)._yscale = y2-y1;
}
I'm trying to set the 'point' variables with the following javascript on the html page:
Code:
function loadIt(){
document.theGraph.SetVariable("point0", 25);
document.theGraph.SetVariable("point1", 50);
document.theGraph.SetVariable("point2", 75);
document.theGraph.SetVariable("point3", 100);
document.theGraph.SetVariable("point4", 75);
}
If I set the variables inside the movie, then it works perfectly, but I can't seem to get the variables to send into Flash.
I had figured out a solution to this type of problem in Flash4 a while back, but I'm guessing the method has changed from 4 --> 5??
Any help greatly appreciated.
paul