A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: SWFAddress: "Classes may only be defined in external ActionScript 2.0 class scripts"

  1. #1
    Senior Designer
    Join Date
    Jul 2001
    Location
    Australia
    Posts
    367

    SWFAddress: "Classes may only be defined in external ActionScript 2.0 class scripts"

    Hey guys, I'm working in Actionscript 2 and trying to get the latest version of SWFAddress 2.4 to work. I'm following all the steps but I keep getting the error

    PHP Code:
    "Classes may only be defined in external ActionScript 2.0 class scripts." 
    If you're familiar with SWFAddress I've pulled the SWFAddress.as and SWFAddressEvent.as external files and placed them in a folder called 'SWF_Address' in my main directory. (Inside it is also the swfaddress.js)

    I've made sure to change the paths so what used to be;

    PHP Code:
    import com.asual.swfaddress.SWFAddress
    in the main .as file is now the following;

    PHP Code:
    import SWF_Address.SWFAddress
    I've lined up all the correct paths, and I'm definitely using the AS2 version of the files but whenever I try to #include the file I get this error. The output points at line 17 which is the class declaration;

    PHP Code:
    class SWF_Address.SWFAddress 
    How can I fix this?

    Any answers would be much appreciated!

  2. #2
    Senior Designer
    Join Date
    Jul 2001
    Location
    Australia
    Posts
    367
    Okay, I'm an idiot - was trying to include a class file when it needed to be imported. I wish this thing had better documentation (or any proper documentation!)

    The examples in the AS2 version of swfAddress have no signs of importing the class, so how does it actually get those classes for use?? If anyone has gotten this thing to work under AS2 using class files please let me know how you got it working, or point to a tutorial that showed you the way.

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center