Author Topic: Unlimited loop on webserver, local works great  (Read 2748 times)

dannydehaan

  • Newbie
  • *
  • Posts: 3
Unlimited loop on webserver, local works great
« on: February 06, 2009, 11:10:35 am »
Hi,

I've downloaded Megazine 3, great stuff :D

When i'm open index.html on my local hard drive it all works fine. But when i try to open it on a webserver, he's looping unlimited, it's searching for files like:

http://mysite.nl/nieuw/pageflip/megazine/snd/restore219.mp3
http://mysite.nl/nieuw/pageflip/megazine/snd/turn218.mp3
http://mysite.nl/nieuw/pageflip/megazine/snd/endstiff216.mp3
http://mysite.nl/nieuw/pageflip/megazine/snd/dragstiff220.mp3

This is from firebug. Local it's all ok.

xml:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE book SYSTEM "http://megazine.mightypirates.de/megazine.dtd">
<book>
   <chapter>
      <page>
        <img src="../originals/1.jpg" />
      </page>
      <page>
        <img src="../originals/2.jpg" />
      </page>
      <page>
        <img src="../originals/3.jpg" />
      </page>
      <page>
        <img src="../originals/9.jpg" />
      </page>
      <page>
        <img src="../originals/10.jpg" />
      </page>
      <page>
        <img src="../originals/11.jpg" />
      </page>
   </chapter>
</book>

I use the standard html.

Can you please help me?

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1985
  • MegaZine3 Developer
    • MegaZine3
Re: Unlimited loop on webserver, local works great
« Reply #1 on: February 06, 2009, 06:00:33 pm »
Wow, that's interesting. The behaviour is in itself pretty easy to explain: there is no fixed number of sounds, so it will continue to try more while it finds them (i.e. increase the number and try to load the next file).
Normally if the file does not exist the sound loader should throw an exception. This does not seem to be happen here, for whatever reasons...

Only solution I can think of here is to add a parameter that defines how many sounds there are of each type... I hope I'll get in done in the next few days.
For the Snark was a Boojum, you see.

Before you ask a question
          After you get an answer
  • please document your problem with the answer in the Project Wiki. (e.g. in the FAQs)
  • help others out if you can, by answering their questions on the forum.

dannydehaan

  • Newbie
  • *
  • Posts: 3
Re: Unlimited loop on webserver, local works great
« Reply #2 on: February 06, 2009, 06:39:49 pm »
Hmmzz, ok,

Where are the sounds defined? Cause i in the .fla's is no actionscript at all

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1985
  • MegaZine3 Developer
    • MegaZine3
Re: Unlimited loop on webserver, local works great
« Reply #3 on: February 07, 2009, 11:18:14 am »
Yes, all the scripting is done in the class files in the de/mightypirates/* directories (and the com and org one, but those are 3rd party ones).
The sounds are located in the snd folder. The files are loaded in the DragHandler class (de/mightypirates/megazine/Draghandler.as), in a function called loadSound.
If you want you can temporarily make it do nothing by commenting out the body of the function (everything between the { }) and recompile using the megazine.fla.
For the Snark was a Boojum, you see.

Before you ask a question
          After you get an answer
  • please document your problem with the answer in the Project Wiki. (e.g. in the FAQs)
  • help others out if you can, by answering their questions on the forum.

dannydehaan

  • Newbie
  • *
  • Posts: 3
Re: Unlimited loop on webserver, local works great
« Reply #4 on: February 07, 2009, 07:50:10 pm »
Ok, thanx.

Another Question.
I want my book at 1000x707 px without margins, can you tell me how to do that. Megazine has to open in a lightbox and margin isn't nice in a lightbox.

Take a look at:
http://www.bastioncollections.nl/nieuw/pageflip/flipper

If you inspect with firefox you can also see the loop
« Last Edit: February 07, 2009, 07:52:38 pm by dannydehaan »

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1985
  • MegaZine3 Developer
    • MegaZine3
Re: Unlimited loop on webserver, local works great
« Reply #5 on: February 08, 2009, 04:39:21 pm »
That's due to the current implementation of the liquid scaling... next Version will a) have it disabled per default and b) have an option to set the minimum scale. This will solve you issue (currently it just scales down, because it internally reserves a little space all around).

Had a look at your page, really don't know what causes that loop. As I said, I'll add an option to set the number of each sound (which is actually cleaner anyways, as it does not cause so many 404s in the server log).

I'm hoping to finish the next version during the next week or so.
For the Snark was a Boojum, you see.

Before you ask a question
          After you get an answer
  • please document your problem with the answer in the Project Wiki. (e.g. in the FAQs)
  • help others out if you can, by answering their questions on the forum.