A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Class Could Not Be Loaded

  1. #1
    Join Date
    Jun 2001

    Class Could Not Be Loaded

    Hi -

    Using MX Professoinal 2004:

    Bit of a newbie. My class file is in the directory of my residing .fla file, and refuses to load the class file. What I'm using for the SuperFades (Bob Donderwinkel - http://stimpson.flashvacuum.net/mt/a...uperfades.html class:

    import com.bdontwerp.SuperFades;
    var my_SF:SuperFades=new SuperFades(loop_player, 30, true);
    my_SF.alphaFade(5, 500);

    Error: The class 'com.bdontwerp.SuperFades' could not be loaded.


  2. #2
    Senior Member
    Join Date
    Sep 2000

    there are a couple things you can do, one would be to create a directory structure in the same level as your fla that looks something like:
    com/bdontwerp/ with the SuperFades.as file in the bdontwerp folder.

    so flash sees com.bdontwerp as a folder or path structure relavent to your source which i belive is the first place flash will look for this stuff then it will check your classpaths that you have set in the IDE.

    Or edit the SuperFades.as file and get rid of the com.bdontwerp. in the class declaration. (easiest by far)

    Or create a global classpath for all your classes so you don't have to do either of the above and set that preference in the AS2 settings prefs within the IDE so you can have all your classfiles housed in one place as opposed to keeping them with the source files, this helps so you can re-use class files w/o having to dig through project folders and stuff like that, so your the root level of your classfiles could be a folder with a bunch of folders and files within it, "com", "org" whatever else is mostly used, i think this is more of a java style way of setting this stuff up, at least that's what i've read.

    And lastly pick up moocks AS2 Essentials through O'Reilly or Amazon, you'll be glad you did..

    hope this helps,

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