6/5/2011 10:42:50 AM
Title:
swf not working in browser
Hi Everyone,
I am struggling with one issue on loading the swf file in browsers [IE, Firefox, Chrome]. Somehow the swf is not working as expected.
What I have done so far:
I have a php file with following code:
<object
id="index"
width="250px" height="46px"
codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<param name="movie" value="test.swf" />
<param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" />
<param name="allowScriptAccess" value="sameDomain" />
<embed src="test.swf"
quality="high" bgcolor="#ffffff"
width="250px" height="46px" name="index" align="middle"
play="true"
loop="false"
quality="high"
allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer">
</embed>
</object>
test.swf has few buttons and one progress bar to show microphone level. Basically, this records the sound and plays it back.
What is happening, the swf get downloaded and gets displayed in the browser. But, there micLevel doesnot show any movement and no recording happens.
Now, when I try to load the swf directly (http://www.mywebsite.com/test.swf), everything works like a charm. micLevel is displayed, recording and playback works fine.
One thing I have noticed when loading through php page, I don't get any dialog pops up to grant access to microphone but when loaded directly I do get that dialog popup.
What can be the issue? Any help would be appreciated.
Thanks.
6/5/2011 10:30:26 PM
oops buddy here is your problem width="250px" height="46px"
you have specified too small height to display flash dialogue to grant access. You should have atleast 214 x 137 dimensions of your flash movie to show flash permissions window.
Cheers :)
6/6/2011 4:31:53 AM
And it works!!!
Thanks Friend. Appreciate your help. Would have never figured out that dimension was the problem.
Thanks again.
One more question :P :
Flash by default displays this dialog box. Also if microphone is NULL I am using
Security.showSettings(SecurityPanel.MICROPHONE);
to show the flash dialog box. Is there a way to prevent this prompt for getting displayed everytime.
I have seen a pop up where in I tick a check box and it later doesn't show this prompt. But thats for both camera and microphone. Find below code for that:
Security.showSettings(SecurityPanel.PRIVACY);
There should be a way to remember the permission in case of only microphone. Or can I somehow display the PRIVACY box by default?
6/6/2011 11:29:25 AM
there is no way to remember permission for microphone only .IF you try to access Microphone or camera in flash then the default dialogue appears automatically. But if you want to display the Privacy window then you must show the security panel manually before accessing any device.
6/6/2011 5:30:50 PM
Thanks Ronald. I'll try to display the privacy window and let user save the setting by checking the box so it doesn't prompt again.