Search code examples
actionscript-3flash-cs6document-class

how to add a external document class to timeline based Flash website


I have made a simply timeline based flash website. There are four buttons, each in a different frame (home , gallery, etc.). frames have actions dependent to each frame (simple stop(), gotoandPlay etc.).

I have found a tutorial how to create a Thumbs Scroller with AS3 and XML

http://www.fladev.com/free-files/create-a-thumbs-scroller-with-as3-and-xml/

This is a simple thumb scroller with next prev buttons and Caurina Tweener classes. Problem it's calls for setting a document class linked to external AS file. When I set the document class in as3 settings and the source path this messes up my timeline based actions. I have also tried a new MainClass() and import src.scroller.*; in gallery frame but there a 1180: Call to a possibly undefined method...

My question is how can I incorporate this external as into my flash site file without messing up my current scripts? is there a possibility?


Solution

  • is there a possibility?

    Yes, it is.

    It's too bad, that you use main timeline to manage states of website... But, if you like such approach, you can move all code provided in the tutorial to the frame.