dcsimg
A Flash Developer Resource Site

Results 1 to 14 of 14

Thread: Document class not initializing

  1. #1
    Señor Member Mavrisa's Avatar
    Join Date
    Oct 2005
    Location
    Canada
    Posts
    506

    Unhappy Document class not initializing

    I have never run into this problem before, and it is certainly a strange one... and freakin' frustrating as well.

    I've been working on a project for a little while now, and only yesterday did it start acting up. I added a bunch of new classes, and then two new functions and a few variables in the document class and then tested it only to find that it didn't work. I put a trace statement at the very beginning of the class: nothing. I commented out the two functions: nothing. I commented out the variables, and this time it worked. So I uncommented the functions: stopped working.
    I decided to check through the variables to see which ones would work, if any. One of them, a GTween instance, did work. This is in a custom classpath: com.gskinner.motion.GTween
    I tried other variables: only a few of my custom classes work (also in the same com folder, but a different path obviously), a few classes from the bit101 path work, but not all of them.

    The compiler doesn't throw any errors, and output doesn't show anything. It just comes up with my background and that's it.

    Anyone else had this problem? I played around with things for an hour last night and eventually got frustrated and went to bed.
    I can post code if anyone wants to check it out, but as far as I can tell, there doesn't seem to be anything out of the ordinary.

    Edit: I neglected to mention that it wouldn't even work with some of the classes in the current directory. Some of them were fine. Now, however, it works with those classes that didn't before, but GTween is a problem instead... grrr...

    Thanks,
    Mavrisa
    Last edited by Mavrisa; 07-15-2010 at 02:16 PM.
    Haikus are easy
    But sometimes they don't make sense
    Refrigerator

  2. #2
    Flactionscrish Baby Minion's Avatar
    Join Date
    Nov 2005
    Location
    Planet Earth
    Posts
    312
    Is there any code on the timeline?

    What fp version are you targeting?
    ktu[k-two]
    he who hesitates is lost; so i guess i'll wander intently

    Are you sure this is real?
    Life is Love, Love is Blind, Blind we go through Life.
    Life isn't hard, dealing with your self is.

    The concept of life in a human brain is weakening day after day. Live every day like its your last. Take the chances, and opportunities, and never let authority push you around for fun.


  3. #3
    Señor Member Mavrisa's Avatar
    Join Date
    Oct 2005
    Location
    Canada
    Posts
    506
    Nothing on the timeline, nothing on the stage, just a background colour and document class specified.
    FP10
    Haikus are easy
    But sometimes they don't make sense
    Refrigerator

  4. #4
    Flactionscrish Baby Minion's Avatar
    Join Date
    Nov 2005
    Location
    Planet Earth
    Posts
    312
    What IDE are you using?
    ktu[k-two]
    he who hesitates is lost; so i guess i'll wander intently

    Are you sure this is real?
    Life is Love, Love is Blind, Blind we go through Life.
    Life isn't hard, dealing with your self is.

    The concept of life in a human brain is weakening day after day. Live every day like its your last. Take the chances, and opportunities, and never let authority push you around for fun.


  5. #5
    Señor Member Mavrisa's Avatar
    Join Date
    Oct 2005
    Location
    Canada
    Posts
    506
    Flash CS4
    Haikus are easy
    But sometimes they don't make sense
    Refrigerator

  6. #6
    Señor Member Mavrisa's Avatar
    Join Date
    Oct 2005
    Location
    Canada
    Posts
    506
    Alright... I'm not positive, but it seems to have been the one library object I had, which was just a sound. Not sure why that would have any effect whatsoever, but when I took it out along with every reference to it, it turned out just fine.
    You can embed sounds the same as with fonts and whatnot, right?
    Last edited by Mavrisa; 07-16-2010 at 03:42 AM.
    Haikus are easy
    But sometimes they don't make sense
    Refrigerator

  7. #7
    Flactionscrish Baby Minion's Avatar
    Join Date
    Nov 2005
    Location
    Planet Earth
    Posts
    312
    Yes, you can embed sounds that way. I'm curious as to what happened. You should browse the outernets for how to embed sounds properly, and see if you had messed up anywhere.
    ktu[k-two]
    he who hesitates is lost; so i guess i'll wander intently

    Are you sure this is real?
    Life is Love, Love is Blind, Blind we go through Life.
    Life isn't hard, dealing with your self is.

    The concept of life in a human brain is weakening day after day. Live every day like its your last. Take the chances, and opportunities, and never let authority push you around for fun.


  8. #8
    Señor Member Mavrisa's Avatar
    Join Date
    Oct 2005
    Location
    Canada
    Posts
    506
    Didn't find anything wrong with the way I was doing the sound. And the problem actually isn't gone... is there some sort of limit on the number of uninstantiated variables you can have in a document class, or the number of display objects... or something like that?
    I can manage with exactly what I've got luckily, but if I want to add a button? Forget it. Even just a variable which could potentially contain a button. Haven't found a solution or similar problem anywhere.
    Haikus are easy
    But sometimes they don't make sense
    Refrigerator

  9. #9
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    It looks like your file is very large. Are you using CS5?
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  10. #10
    Señor Member Mavrisa's Avatar
    Join Date
    Oct 2005
    Location
    Canada
    Posts
    506
    The mp3 file I mentioned is 10 kb. The swf file (with the sound embedded) is 56kb. I've had larger projects that worked fine... and a lot of the size is only because of monsterDebugger (7kb smaller without it), but removing that doesn't seem to help. I'm using CS4.
    Haikus are easy
    But sometimes they don't make sense
    Refrigerator

  11. #11
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    With "large" I meant you are instantiating a lot of objects. Check if this is what is causing your problem:

    http://forums.adobe.com/thread/64979...ullThread=true

    or check this:

    http://jobemakar.blogspot.com/2008/1...-of-death.html
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  12. #12
    Señor Member Mavrisa's Avatar
    Join Date
    Oct 2005
    Location
    Canada
    Posts
    506
    Well, I tried the things they mentioned in those two links.
    I already had the 10.0.2 update, so I knew that wasn't it.
    I tried changing the specified registry value from 0x80 to 0x100, and restarted. That didn't work either.
    I counted the number of objects I'm instantiating in the document class, or from the constructor... 13.

    Simply adding:
    private var helpBtn:PushButton;
    throws it. Is this considered instantiating? Because I do have a half-dozen more of these...
    Haikus are easy
    But sometimes they don't make sense
    Refrigerator

  13. #13
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    Instantiating is done with the new word. I have never experienced your problem. Can you spare a sample fla with the problem?
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  14. #14
    Señor Member Mavrisa's Avatar
    Join Date
    Oct 2005
    Location
    Canada
    Posts
    506
    I thought that was the case...
    And strangely enough, I haven't been able to get it to happen again... everything is now working fine...

    Thanks anyway
    Haikus are easy
    But sometimes they don't make sense
    Refrigerator

Tags for this Thread

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