Author Topic: Can't get my SWF to interact  (Read 980 times)

krisppp

  • Newbie
  • *
  • Posts: 11
Can't get my SWF to interact
« on: May 12, 2009, 12:09:56 pm »
Heya,

Thanks for such a great script - it's brilliant.  But I just can't get this one item working.

We're pulling in swf's into the book, and want them to fire only when the page is turned.  So wehave a stop frame on frame one, and will get it to gotoandplay.

But we have the following code in our class file:

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

      function onPageVisible(e:MegaZineEvent):void {
               var PageElements = new PageElements;
               this.pageElements.gotoAndPlay(2);
            // page is now visible
           }
but I'm not sure how to call megazineSetup; because if we call it from the top of the class as   megazineSetup(megazine:IMegaZine, page:IPage, even:Boolean);
we get the error:

1084: Syntax error: expecting rightparen before colon. - megazineSetup(megazine:IMegaZine, page:IPage, even:Boolean);

Any ideas :) ?

Chris

krisppp

  • Newbie
  • *
  • Posts: 11
Re: Can't get my SWF to interact
« Reply #1 on: May 12, 2009, 12:15:21 pm »
I'm wondering - am I putting everything in the wrong place :( ?

Chris

mech7

  • Newbie
  • *
  • Posts: 11
Re: Can't get my SWF to interact
« Reply #2 on: May 12, 2009, 04:33:41 pm »
Am wondering the same thing... do you also get an error when compiling?

http://megazine.mightypirates.de/forum/index.php/topic,169.0.html

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1989
  • MegaZine3 Developer
    • MegaZine3
Re: Can't get my SWF to interact
« Reply #3 on: May 13, 2009, 03:41:59 pm »
Thanks for pointing out that thread, seems I overlooked it. If you get the error there, add the import as I wrote in reply to it.
Although your error message differs, please check your imports, too, krisppp. You never know. If it's not that, I have no idea.
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.