Author Topic: using FlashDevelop code with megazine  (Read 2095 times)

macaujapan

  • Newbie
  • *
  • Posts: 11
using FlashDevelop code with megazine
« on: February 11, 2009, 09:28:33 am »
i import all needs package, thne
Code: [Select]
var megazine:MegaZine = new MegaZine("/abc/megazine.xml", "abc/interface.swf");

addChild(megazine);
it show error my path not work.

Max

  • Newbie
  • *
  • Posts: 13
Re: using FlashDevelop code with megazine
« Reply #1 on: February 11, 2009, 10:05:35 am »
what is the error exactly? and i dunno but shouldnt you call the Main.as class and instance that instead of MegaZine.as

kopitejay

  • Support
  • Jr. Member
  • *****
  • Posts: 37
Re: using FlashDevelop code with megazine
« Reply #2 on: February 11, 2009, 11:21:12 am »
i import all needs package, thne
Code: [Select]
var megazine:MegaZine = new MegaZine("/abc/megazine.xml", "abc/interface.swf");

addChild(megazine);
it show error my path not work.

Don't know if this will help but I think your address is not wrote correctly. I mean you have an extra "/" at the start of the first paramater.
I believe it should be wrote like this.

MegaZine("abc/megazine.xml", "abc/interface.swf");

Whether this will help solve the problem I'm not sure. Give it a go and see what happens.

Jay

macaujapan

  • Newbie
  • *
  • Posts: 11
Re: using FlashDevelop code with megazine
« Reply #3 on: February 12, 2009, 02:38:55 am »
thanks all guys. what my situation is , i use FlashDevelop coding a webcam motion trace project, i want the user can flip the book by motion trace, so i write a WebCamMotion.as and inside it i would like to call Megazine, the code like this.
Code: [Select]

package{
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.utils.Helper;

public class WebCamMotion extends Sprite{
public function WebCamMotion()void{
    var megazine:MegaZine = new MegaZine();
addChild(megazine);
}
}
}

i put the all Megazine files(*.xml, interface.xml ect). in the same directory with WebCamMotion.as
the program run fine if i remarked the var megazine:MegaZine = new MegaZine();
addChild(megazine);

any idea are welcome.


Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1989
  • MegaZine3 Developer
    • MegaZine3
Re: using FlashDevelop code with megazine
« Reply #4 on: February 12, 2009, 08:03:46 pm »
Hm, where do you have the sources? I'm assuming the excerpt is from the top level (as it's in the default package). The de folder would then have to reside in the same folder as that class file. Then it should work, actually...

To repeat Max's question: what kind of error do you get, i.e. the exact error message?
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.