Uli's Web Site
[ Zathras.de - Uli's Web Site ]
Other Sites: Stories
Pix
Abi 2000
Stargate: Resurgence
Lost? Site Map!
 
 
     home | blog | moose | programming | articles >> blog

 Blog
 
 Archive
 
 Blog Topics
 

15 Most Recent [RSS]

 Less work through Xcode and shell scripts
2011-12-16 @600
 
 iTunesCantComplain released
2011-10-28 @954
 
 Dennis Ritchie deceased
2011-10-13 @359
 
 Thank you, Steve.
2011-10-06 @374
 
 Cocoa Text System everywhere...
2011-03-27 @788
 
 Blog migration
2011-01-29 @520
 
 All you need to know about the Mac keyboard
2010-08-09 @488
 
 Review: Sherlock
2010-07-31 @978
 
 Playing with Objective C on Debian
2010-05-08 @456
 
 Fruit vs. Obst
2010-05-08 @439
 
 Mixed-language ambiguity
2010-04-15 @994
 
 Uli's 12:07 AM Law
2010-04-12 @881
 
 Uli's 1:24 AM Law
2010-04-12 @874
 
 Uli's 6:28 AM Law
2010-04-12 @869
 
 Uli's 3:57 PM Law
2010-04-12 @867
 

More...

Flash with SWFMill and MTASC

Durrrrn... A few days ago I made a major update to my article on using SWFMill, extending it to also cover integration with MTASC, and then I find I must have accidentally reverted the article. If anybody still happens to have a copy of the updated article, I'd be very thankful if you could e-mail it to me (click my name at the bottom of any page for contact info).

Okay, here's a condensed blurb repeating all of this so you don't have to search for it like I had to:

  • Don't use MTASC to replace code in the SWFMill-generated document. Create a new, otherwise empty classes.swf-file with MTASC and then include it from SWFMill just like any other clip.
  • You need a bit of dummy code somewhere in your main file that uses all classes that are only used by SWFMill-created objects. Just a function that is never called is okay. Otherwise MTASC will remove the classes, thinking they were unused.
  • Use the class attribute to the <clip ...>-tag to specify the MovieClip subclass that contains the code for a particular clip. Here, you specify the full package identifier for the class. Alternatively, you can call Object.registerClass("person", CPerson) (assuming the clip has name person and your class is named CPerson). You can assign the result of that call to a dummy static var of the class to make sure it's called before any other code in the class.
  • In resources.xml-file, be sure to add the <call object="Game" method="main" />-tag if you want your main function (that sets up some of the stage) to be called. Don't use the MTASC option.


Reader Comments: (RSS Feed)
No comments yet
Comment on this article:
Name:
E-Mail: (not shown, hashed for Gravatar)
Web Site URL: (optional)
Comment: (plain text only)
Please Enter the following word:
Or E-Mail Uli privately.
 
Created: 2005-10-23 @463 Last change: 2005-10-23 @695 | Home | Admin | Edit
© Copyright 2003-2014 by M. Uli Kusterer, all rights reserved.