PDA

View Full Version : Dynamic Ajax Content doesn't load Flashpreoloader? (swf)



miow
08-26-2010, 12:02 PM
Hi there again!

For this time i have a new problem. (attention: my english is bad!)

I use your script "Dynamic Ajax Content (http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm)" for loading my content without refreshing my website. It's all fine and it works.
But now i see a new "problem".

If i work with php include, the preloader from the flashfile (SWF) runs perfect!!!
(the preloader is a startmovie from a normal flashmovie)

But if i work with my Ajax load command, the preloader is not shown.
I see for a couple of seconds the predefined backgroundcolor of the swf file (i should see the preloader now) and then after finish loading of the swf, i see the content of the flashmovie. The movie runs perfect then.
Is this normal?

For short: If i load a swf movie/animation with php include (or similar), the preloader of the movie works and i can see the preloader.
But if i load with ajax (with your "Dynamic Ajax Content" script), i don't see the preloader of the swf movie/animation. But after complete loading of the swf file, i can see the movie normally.

Now to know:
Is this normal and i have to live with that or is there any solution for showing the preloader?

Thank you very much!


Best Greetings from Germany, miow

jscheuer1
08-26-2010, 03:45 PM
Please post about Dynamic Drive Scripts in the Dynamic Drive Scripts Help section here where I've moved this thread, and:

Warning: Please include a link to the DD script(s) in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

Does the preloader involve javascript? If so, AJAX imported javascript usually will not run unless certain steps are taken. These generally depend to a degree upon the script.

miow
08-27-2010, 09:21 AM
I'm sorry about my mistake yesterday. Threadstart is updated!
I just forget to link. :(

To your Question: No. I guess not. It's just a "loading" movie in the movie.
[...]link removed[...]
The best example is "dog of man". There you can see on my site, there's no preloader.
But here (http://www.fat-pie.com/dogofman.htm) you can see the preloader.
It's incredible. ^^

I just want to know: Is this "phenomen" with Ajax normal and i have to live with that?
Thank you very much!

Best Greetings, miow


PS:
I thought not, that my problem was/is specific/related to this script.(it's just Ajax...because i got the same problem with jQuery/Prototype) Because of that i started this thread in the other forum. But anyway: I'm sorry!

jscheuer1
08-27-2010, 11:25 AM
It's not AJAX because if I do:

dogofman.htm:


<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
name="flashvideos"
width="420"
height="282"
align="middle"
id="flashvideos">
<param name="movie" value="http://yourdomain.org/funny_stuff/flash_cartoons/dogofman/dogofman.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#000000" />
<embed src="http://yourdomain.org/funny_stuff/flash_cartoons/dogofman/dogofman.swf"
width="420"
height="282"
align="middle"
quality="high"
bgcolor="#000000"
name="flashvideos"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer_de"
play="true" />
</object>

and dogofman_import.htm:


<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
$.get('dogofman.htm', function(data){$('#target').html(data);});
});
function wipe(){
$('#target').empty();
}
function iimport(){
$.get('dogofman.htm', function(data){$('#target').html(data);});
}
</script>
</head>
<body>
<input type="button" onclick="wipe();" value="wipe"> <input type="button" onclick="iimport();" value="import">
<div id="target">

</div>
</body>
</html>

It works just fine.

It's either other code on the funny_stuff/flash_cartoons/dogofman/ index page, other code on flash_cartoons.php, or the fact that another preloader has already run on the flash_cartoons.php page. Or, maybe you just have to use the absolute path to the .swf as I did above.

I think it's the dogofman index page. But I'm just guessing. Try simplifying it like in my example.

miow
08-27-2010, 11:35 AM
Well, i understand what you mean. But the fact is: If i link the page with php include or make this site (dog of man) as stand-alone version, the preloader is showing up.
It is only a problem with Ajax (load).

So i guess, i have to live with that or i have to change my code from Ajax-load to php-include.
I think, it's just one of few "mini-problems" with Ajax. ;)

Thank you very much!

jscheuer1
08-27-2010, 02:44 PM
If you link (include) this page (/funny_stuff/flash_cartoons/dogofman/index.html):


<script type="text/javascript">
location.replace('../../../flash_cartoons.php?loadpage=' + encodeURIComponent(location.href + '::content') + '#anker');
</script>
<meta http-equiv="refresh" content="0;url=../../../flash_cartoons.php?loadpage=funny_stuff/flash_cartoons/dogofman/index.html::content" />
<div class="unbev_wrapper">
<!-- BEGIN OF PLAYER -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
name="flashvideos"
width="420"
height="282"
align="middle"
id="flashvideos">
<param name="movie" value="funny_stuff/flash_cartoons/dogofman/dogofman.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#000000" />
<embed src="funny_stuff/flash_cartoons/dogofman/dogofman.swf"
width="420"
height="282"
align="middle"
quality="high"
bgcolor="#000000"
name="flashvideos"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer_de"
play="true" />
</object>
<!-- END OF PLAYER -->
<div class="unbev_descr2">
<div class="unbev_footertxt">Quelle: <a href="http://www.fat-pie.com" target="_blank">Fat-Pie.com</a></div>
<div class="unbev_myform">

Keine Ahnung was ich hiervon halten soll. Aber ich mag halt Fat-Pie.com einfach. ^^
</div>
</div>
</div>

to flash_cartoons.php via PHP, you will get an endlessly reloading page.

In fact, in Opera, that's what you get with AJAX. Try it without the highlighted part.

miow
08-27-2010, 02:50 PM
That is correct. I mean with that, i would "rewrite" the entire page to a normal html page without refreshings and then i could include this one.
But that would only be a test for me and no solution.

Just wondering about, why Ajax cant load the preloaders correctly. I test it with some other scripts and it's the same.
Funny, isn't it? .O

jscheuer1
08-27-2010, 03:48 PM
All I can say is that it works fine here. I even just tried it with ajaxpage, works fine with that too.

Try my example from post #4 in this thread.