I have made a character in flash, which you can ask questions to...I have created 6 animated responses for the character in flash.
I have a series of 'if' statments for the questions. I would like to link the animations to the 'if' statements in JS.
Ive tried this:
- Code: Select all
if(qi == "hello"){
document.getElementById("fill").innerHTML = "Hello how are you?"; "document.getElementById ('charani').innerHTML = '<object width='550' height='400'> <param name='movie' value='Thumbsup.swf'> <embed src='Thumbsup.swf' width='160' height='200' style='position:absolute; right:0px; bottom: 5%; z-index:3; '> </embed> </object>";
}
if(qi == "hi"){
document.getElementById("fill").innerHTML = "Hello There"; "document.getElementById ('charani').innerHTML = '<object width='550' height='400'> <param name='movie' value='yo.swf'> <embed src='yo.swf' width='160' height='200' style='position:absolute; right:0px; bottom: 5%; z-index:3; '> </embed> </object>";
Robm85 is an unknown quantity at this point
linking flash to javascript
Hello
I have made a character in flash, which you can ask questions to...I have created 6 animated responses for the character in flash.
I have a series of 'if' statments for the questions. I would like to link the animations to the 'if' statements in JS.
Ive tried this:
Code:
if(qi == "hello"){
document.getElementById("fill").innerHTML = "Hello how are you?"; "document.getElementById ('charani').innerHTML = '<object width='550' height='400'> <param name='movie' value='Thumbsup.swf'> <embed src='Thumbsup.swf' width='160' height='200' style='position:absolute; right:0px; bottom: 5%; z-index:3; '> </embed> </object>";
}
if(qi == "hi"){
document.getElementById("fill").innerHTML = "Hello There"; "document.getElementById ('charani').innerHTML = '<object width='550' height='400'> <param name='movie' value='yo.swf'> <embed src='yo.swf' width='160' height='200' style='position:absolute; right:0px; bottom: 5%; z-index:3; '> </embed> </object>";
However it doesnt seem to work. Does anyone know what the problem is?
Any help here would be great! Rob[/code]



