Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

am new in flash

here am using a javascript function for views a flash video

the flash files name are a0.swf,a1.swf ...

this is my javascript function

<script>
var count=0;
function mafunct(newSrc){
    alert("hi");
var path="a"+count+".swf";  

 flash+='<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" WIDTH="100%" HEIGHT="100%">';          
    flash+='<PARAM NAME=movie VALUE="'+path+'">';          
    flash+='<PARAM NAME="PLAY" VALUE="false">';  
    flash+='<PARAM NAME="LOOP" VALUE="false">';
    flash+='<PARAM NAME="QUALITY" VALUE="high">';
    flash+='<PARAM NAME="SCALE" VALUE="SHOWALL">';
    flash+='<EMBED NAME="testmovie" SRC="Menu.swf" WIDTH="100%" HEIGHT="100%"PLAY="false" LOOP="false" QUALITY="high" SCALE="SHOWALL"swLiveConnect="true"PLUGINSPAGE="http://www.macromedia.com/go/flashplayer/">';
    flash+='</EMBED>';
    flash+='</OBJECT>';     

count++;
alert(path+"aa");
}
</script>

<button onclick="mafunct()">next</button>

when this button click nothing will happen

Is here any problem with coding...

if you have the same isuue happened before and solve it or you know the answer for this please mention below

with regards ..Prasanth AR

share|improve this question
2  
Is it just a typo in your question that you try to add to flash before declaring it? Line 3 of mafunct – jonhopkins 18 mins ago
1  
In the line below var path="a"+count+".swf" you have flash += '<OBJECT CLASSID...', before the variable flash exists. In the next line, var flash = ... is when you actually declare flash. And since you're assigning it to the same string in those two lines, do you actually need the line flash += '<OBJECT CLASSID...'? – jonhopkins 13 mins ago
1  
Are you getting the alerts? Or is the video just not showing? – jonhopkins 9 mins ago
1  
You want to keep the line that started with var flash = <OBJECT CLASSID..., not the one that started flash += <OBJECT CLASSID... – jonhopkins 8 mins ago
1  
use value="file://"+path – Anna.P 6 mins ago
show 7 more comments

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.