Author Topic: MegaZine embedded in other FLA project?  (Read 1538 times)

capdesuro

  • Jr. Member
  • **
  • Posts: 49
MegaZine embedded in other FLA project?
« on: May 28, 2009, 01:00:35 am »
Hi,

Is there any example, template or tutorial on embedding MZ in a Flash project?

I understand that this could seem stupid for most of you, but please understand that I just moved from SwishMax to Flash and every step is still hard for me.

Thanks in advance and regards

capdesuro

  • Jr. Member
  • **
  • Posts: 49
Re: MegaZine embedded in other FLA project?
« Reply #1 on: May 28, 2009, 07:42:24 pm »
Well, I managed to put the MZ in a container... still hundreds of battles to fight, but at least I've a nice blank page flipping in my project.  :-\

Anyway I think it would be nice to have some FLA example from you guys, it would help a lot for newbies like me!

Thanks and regards

kekoav

  • Newbie
  • *
  • Posts: 9
Re: MegaZine embedded in other FLA project?
« Reply #2 on: June 01, 2009, 08:50:26 pm »
How did you get this done? I've been trying to create new MegaZine() with nothing showing up after I addChild() it.

capdesuro

  • Jr. Member
  • **
  • Posts: 49
Re: MegaZine embedded in other FLA project?
« Reply #3 on: June 01, 2009, 10:45:13 pm »
Well, at the end it was quite easy:
- Download de source code (all of it) and (to simplify) copy the folders at the same place where's your FLA file (so the "de", "bin", "snd" and other folders are at the same level than your FLA file).
- Create a movie clip, open it and put these lines at the first frame:
Code: [Select]
import de.mightypirates.megazine.MegaZine;

var mz:MegaZine = new MegaZine("your_xml_file.xml","bin/interface.swf");
addChild(mz);
That should work... In fact you don't need to use a movie clip container, but in my case I want to add other buttons together with the book, so it was more convenient for me.

Hope it helps...

kekoav

  • Newbie
  • *
  • Posts: 9
Re: MegaZine embedded in other FLA project?
« Reply #4 on: June 02, 2009, 05:10:48 pm »
Yeah I did get it to work by throwing it in a MovieClip, it didn't seem to work when I added it to the stage though.

Thanks!

kekoav

  • Newbie
  • *
  • Posts: 9
Re: MegaZine embedded in other FLA project?
« Reply #5 on: June 02, 2009, 10:06:47 pm »
I have a MegaZine object added to my MovieClip, and it displays properly, and will flip through pages, but I cannot seem to get images to load.

I've been trying to load an image through the simple XML below:

Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE book SYSTEM "http://megazine.mightypirates.de/megazine.dtd">
<book>
<chapter>
<page bgcolor="0xFF0000" stiff="true">
<img src="Graphics/splash.jpg"/>
</page>
<page>
</page>
</chapter>
</book>

The page is showing up as red, but the graphic does not show up.  When I use the exact XML in the binary version of MegaZine I downloaded, it works fine.  Is there something special I must do to enable the loading of images?  Even txt tags don't seem to show up.

And yes, I have checked the location of the image files.

capdesuro

  • Jr. Member
  • **
  • Posts: 49
Re: MegaZine embedded in other FLA project?
« Reply #6 on: June 13, 2009, 09:51:08 am »
Well, I don't know what to say. I tried with an XML like yours and works... just double check file paths... image path at the XML file are relative to the SWF not the XML location.

But if you checked it, I simply don't have any clue.

Regards

maxie

  • Jr. Member
  • **
  • Posts: 43
Re: MegaZine embedded in other FLA project?
« Reply #7 on: June 13, 2009, 09:09:20 pm »
Hi Kekoav,

just an idea ... because the syntax looks OK ... I wonder whether you would see your picture if you would rename your folder with the picture in it from "Graphics" into "graphics"?

[...]
      <page bgcolor="0xFF0000" stiff="true">
         <img src="Graphics/splash.jpg"/>
      </page>
[...]

<img src="graphics/splash.jpg" />