473,387 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

problem with flash player

hi..
i have a flash player embeded in javascript.

it plays the audio well in Mozilla ..

When i run it in the IE..it blinks "loading.." and nothing happens.But some time it runs correctly.. But any time it runs i need to double(twice) click on the play button.



The object whihc i have is

<object type="application/x-shockwave-flash" data="Mp3Player.swf" id="Mp3Player" width="300" height="30">
<param name="movie" value="Mp3Player.swf" />
<embed src="Mp3Player.swf" width="300" height="30" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" id="Mp3Player">
</embed>
</object>

Any solution to this problem.

thanks
vinni
Sep 21 '07 #1
7 2062
xNephilimx
213 Expert 100+
Hi vinniurheart!
Do you have an exaple of the program uploaded somewhere?
Because I don't see a reason for that to be failing.
Also if you can post the actionscript code will be very usefull.

Kind regards,
The_Nephilim

hi..
i have a flash player embeded in javascript.

it plays the audio well in Mozilla ..

When i run it in the IE..it blinks "loading.." and nothing happens.But some time it runs correctly.. But any time it runs i need to double(twice) click on the play button.



The object whihc i have is

<object type="application/x-shockwave-flash" data="Mp3Player.swf" id="Mp3Player" width="300" height="30">
<param name="movie" value="Mp3Player.swf" />
<embed src="Mp3Player.swf" width="300" height="30" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" id="Mp3Player">
</embed>
</object>

Any solution to this problem.

thanks
vinni
Sep 21 '07 #2
thanks so much for the reply buddy..!!!
Here is the code....

<!--html code-->

<object type="application/x-shockwave-flash" data="Mp3Player.swf" id="Mp3Player" width="300" height="30">
<param name="movie" value="Mp3Player.swf" />
<embed src="Mp3Player.swf" width="300" height="30" quality=high pluginspage="http://www.macromedia.com/go/getflashplayer" type='application/x-shockwave-flash' id="Mp3Player">
</embed>
</object>

<!--ends here--------->

<script>


function playsong(song)//called once click on the url
{
detect_browser("Mp3Player").asFunc(song);
}

function detect_browser(song)//for crossbrowser,returns true if it's IE else False
{
alert(navigator.appName);
var isIE = navigator.appName.indexOf("Microsoft") != -1;
return (isIE) ? window[song]:document[song];
}

looking for the help........

cheeeers,
vinni
Sep 25 '07 #3
xNephilimx
213 Expert 100+
Hi! Sorry for the late reply! I've been very bussy.
I think the error might bee here

Expand|Select|Wrap|Line Numbers
  1. var isIE = navigator.appName.indexOf("Microsoft") != -1;
  2.       return (isIE) ? window[song]:document[song];
  3.  
More exactly in the last line, you put window[song], but when using the array object notation (like an associative array), the index must be passed as a string, otherwise the script will look for a song variable and it won't find it. If for some reason it works in firefox I don't know why.
Is the song a variable? If not correct that, pass it as a string (between quotes) like this window["song"]:document["song"];
Another thing I find strage in your code is that your movie's id is "Mp3Player", that's why I need to know if song is a variable containing this value, "Mp3Player", or what.

Please if you didn't post the full code, post it, because I need to see it completely.

Best regards,
The_Nephilim


thanks so much for the reply buddy..!!!
Here is the code....

<!--html code-->

<object type="application/x-shockwave-flash" data="Mp3Player.swf" id="Mp3Player" width="300" height="30">
<param name="movie" value="Mp3Player.swf" />
<embed src="Mp3Player.swf" width="300" height="30" quality=high pluginspage="http://www.macromedia.com/go/getflashplayer" type='application/x-shockwave-flash' id="Mp3Player">
</embed>
</object>

<!--ends here--------->

<script>


function playsong(song)//called once click on the url
{
detect_browser("Mp3Player").asFunc(song);
}

function detect_browser(song)//for crossbrowser,returns true if it's IE else False
{
alert(navigator.appName);
var isIE = navigator.appName.indexOf("Microsoft") != -1;
return (isIE) ? window[song]:document[song];
}

looking for the help........

cheeeers,
vinni
Oct 4 '07 #4
hi..
thanks so much for the reply..

song is the path of the file which i want to play.
and i think i messed it up in the last post..sorry..

its like this.


<!--indus.html-->

<script>
function functin name
{
playsong( 'path of the song')
</script>

<!--ind.html ends here-->


<!-- this is js file-->
<script>
function playsong(song)
{
detect_browser("Mp3Player").asFunc(song);
}
</script>


<script>
function detect_browser(player_id)
{
var isIE = navigator.appName.indexOf("Microsoft") != -1;
return (isIE) ? window[player_id]:document[player_id];
}
</script>
<!-- js file ends here-->



Looking for the solution .........

Thanks again for the reply ...

regads,
vinni
Oct 10 '07 #5
xNephilimx
213 Expert 100+
What version of Flash are you using?
I totally recomend you to use the ExternalInterface class over the asFunc thingy. ExternalInterface lets u communicate ActionScript with Javascript back and forth. asFunc is totally deprecated since ages.
You can find reference of ExternaiInterface here http://www.thescripts.com/forum/thread694359.html

Under the title "Calling ActionScript from JavaScript and vice cersa"

I'm anyway testing your code, to see wher it might be failing.

Best regards
The_Nephilim

hi..
thanks so much for the reply..

song is the path of the file which i want to play.
and i think i messed it up in the last post..sorry..

its like this.


<!--indus.html-->

<script>
function functin name
{
playsong( 'path of the song')
</script>

<!--ind.html ends here-->


<!-- this is js file-->
<script>
function playsong(song)
{
detect_browser("Mp3Player").asFunc(song);
}
</script>


<script>
function detect_browser(player_id)
{
var isIE = navigator.appName.indexOf("Microsoft") != -1;
return (isIE) ? window[player_id]:document[player_id];
}
</script>
<!-- js file ends here-->



Looking for the solution .........

Thanks again for the reply ...

regads,
vinni
Oct 11 '07 #6
hi xNephilimx,

Thanks again.When i set allowScriptAccess="always" ,i found it strange.
i.e., it never plays the file inFireFox and in IE throws an error like "Object does not support this property or method"..

More interestingly in IE, it throws an error and does not play the file and again if i click on the link it starts playing a song..
i am totally confused with this beavior. i am finding it difficult really...

Please guide me on this...

thanks again..

best regards,
vinni
Oct 11 '07 #7
well the error it throws is in the js file.

i.e., exactly in

detect_browser("Player id").asFunc(song to be played)..

gives the error like..Object does not support this property or method

Thanks
vinni
Oct 11 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

115
by: post2google | last post by:
I was thinking about where to go for lunch the other day, so I went to hardees.com to see what the menu looked like these days. What comes up is a big note that my flash version is not new enough...
0
by: kn0ckturnal | last post by:
when i try to view video on youtube or other type video, it wont load and it saids: (from youtube) Hello, you either have JavaScript turned off or an old version of Macromedia's Flash Player....
1
by: pixelmeow | last post by:
Hello all, I have just started work on a website that had some obnoxious flash that the owner wanted removed. I removed the intro page and two flash objects from the index page. The owner then...
3
by: K. | last post by:
Hello! I have a problem with javascript script called: SWFObject. I have a web page which displays on IE 7.0. i Firefox in a good way. All flash objects are displayed on a web page. The problem...
1
by: critchey1 | last post by:
Hey everyone, i've been playing around with trying to get some scripts to work with detecting whether flash player is installed on your computer or not. I found a flash detection kit on the adobe...
3
by: Moo | last post by:
I'm trying to embed a flash mp3 player on my website (http://www.cafepress.com/sfclothing), I did post a previous message regarding a windows media player one but I prefer the flash one and I...
3
by: kettle | last post by:
Hi, I have a simple web page which is composed of a flash audio player (jwmp3player) and a form with a textarea box. I have noticed some very odd behaviour which I cannot puzzle out. If I...
6
by: nagmvs | last post by:
Hai friends, I want one flash player with out seek bar.U can lough after reading this,but my requirement is like that.Can any one tell me how can i acheive this.I am new to flash.I don't...
2
dream party
by: dream party | last post by:
Inserting a Flash (SWF, FLV) file into HTML web page is already an old and familiar thing to all of us. It is a rather non-flexible thing that just to edit some options in the template. However, I...
0
momotaro
by: momotaro | last post by:
I have a flash file that I include in a PHP page, the bottons are visible but not the content of the file (images) all the rest is a white box in both the preview of dreamweaver and the internet...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.