Author Topic: vid plays no matter what  (Read 2331 times)

Adrian

  • Newbie
  • *
  • Posts: 5
vid plays no matter what
« on: May 03, 2009, 08:57:17 pm »
Hello:

I'm using the latest version. Below is most of the xml page (which works) BUT THIS LINE OF CODE:

<vid src="../imgs/1961_double.flv" onlywhenactive="true" left="20" top="20" />

DOESN'T.

The movie begins playing on loading the cover page. I've even added the "nopause" but to no avail.

I'm at a loss to explain it. Anything other order I send (like top, left, etc.) is obeyed.

BTW: the reflection bg is superb and gives a classy look to the whole page.

Adrian Catarzi

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE book SYSTEM "http://megazine.dtd">
<book bgcolor="0x000000" pageheight="650" pagewidth="482" lang="en" barpos="-700" hidebuttons="fullscreen" reflection="true">
   <chapter>
      <page stiff="true" anchor="cover">
         <img src="../imgs/cover.jpg" useglow="false" />
         <snd src="../megazine/snd/Blue_Danube.mp3" />
      </page>
      <page>
         <img src="../imgs/1.jpg" aa="true" useglow="false" />
      </page>
      <page>
         <img src="../imgs/2.jpg" aa="true" useglow="false" />
         <vid src="../imgs/1961_double.flv" onlywhenactive="true" left="20" top="20" />
      </page>
      <page>
         <img src="../imgs/3.jpg" useglow="false" />

DavidC

  • Guest
Re: vid plays no matter what
« Reply #1 on: May 03, 2009, 10:27:51 pm »
The DOCTYPE tag looks wrong - <!DOCTYPE book SYSTEM "http://megazine.dtd">

Try <!DOCTYPE book SYSTEM "http://megazine.mightypirates.de/megazine.dtd">
or if megazine.dtd has been copied to local server try <!DOCTYPE book SYSTEM "megazine.dtd"> (without the http://)
« Last Edit: May 03, 2009, 10:39:32 pm by DavidC »

Adrian

  • Newbie
  • *
  • Posts: 5
Re: vid plays no matter what
« Reply #2 on: May 04, 2009, 01:33:14 am »
Thanks for your reply, David.

I'll try what you advised in the morning.

Again, thanks.

Adrian

Adrian

  • Newbie
  • *
  • Posts: 5
Re: vid plays no matter what con't
« Reply #3 on: May 04, 2009, 08:21:06 pm »
Tried David's suggestion but still no luck.

I have attached a pdf that details what I tried next and its outcome.

Take a look.

I really appreciate help on this.

Adrian

DavidC

  • Guest
Re: vid plays no matter what
« Reply #4 on: May 06, 2009, 10:02:18 am »
Hi Adrian,

I could only suggest maybe using a different file format, maybe mp4. I'm no expect on Flash and haven't been able to investigate this thoroughly. Maybe it would be worth mentioning this as a possible bug to Florian in the Bug Reports list.

David

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1985
  • MegaZine3 Developer
    • MegaZine3
Re: vid plays no matter what
« Reply #5 on: May 06, 2009, 06:36:59 pm »
I've had someone else report problems with the onlywhenactive tag, too. Seems there's something wrong with it ;)

I'll look into it when I have the time.

Edit: one more possibility Jay pointed out would be that you're using an absolute or at least invalid path for your video, could you verify that one's correct? As you seem to load it inside your swf, it has to be relative to the html file (unless you use the mz.getAbsPath).
« Last Edit: May 06, 2009, 07:31:59 pm by Florian Nücke »
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.

bnnorman

  • Newbie
  • *
  • Posts: 16
Re: vid plays no matter what
« Reply #6 on: May 16, 2009, 07:04:44 pm »
Hi, I've just started looking at this software and had similar problems with animated pages and embedded video - not quite the same as using the <vid../> thing but I inserted a FLVComponent in a Flash page and named the instance Flv then used this actionscript on frame 1 to stop/start it when the page was visible/invisible. Before that it would play as soon as the book was loaded.
Might be of some help to you (BTW got the idea from elsewhere in this forum).

/*
   *    this code plays the FLV when the page is Visible
   *   and stops it when the page is made invisible
   *   successful compilation requires the de,com and org class
   *   folders to be in the same place as the FLA
   *   You can then include it in the FLA frame 1 like this:-
   *   include "FlvPlayAndStop.as";
   *   the FLVComponent instance is expected to be called Flv.
*/

Flv.stop();
Flv.autoRewind = true;

import de.mightypirates.megazine.IMegaZine;
import de.mightypirates.megazine.IPage;
import de.mightypirates.megazine.elements.AbstractElement;
import de.mightypirates.megazine.gui.ILibrary;
import de.mightypirates.megazine.events.MegaZineEvent;

//var mz:IMegaZine;

function megazineSetup(mz:IMegaZine, page:IPage, even:Boolean):void {
   page.addEventListener(even ? MegaZineEvent.VISIBLE_EVEN : MegaZineEvent.VISIBLE_ODD, onPageVisible);
   page.addEventListener(even ? MegaZineEvent.INVISIBLE_EVEN : MegaZineEvent.INVISIBLE_ODD, onPageInvisible);
   
}

function onPageVisible(e:MegaZineEvent):void {
   Flv.play();
}

function onPageInvisible(e:MegaZineEvent):void {
   Flv.stop();
}

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1985
  • MegaZine3 Developer
    • MegaZine3
Re: vid plays no matter what
« Reply #7 on: May 18, 2009, 02:34:37 pm »
Should be fixed in new version (1.36).
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.