[swfmill] swfmill + mtasc + emacs (Beginner)

2006-05-19 Thread Andrei Stebakov
Hi,

I just started with Flash and probably have the most stupid question...
Looks like I miss one step how to actually link the swf file generated by swfmill and the sfw file generated by mtasc. 
I am looking at http://aralbalkan.com/index.php?p=373more=1c=1(FAMES tutorial) and I can't understand how the application.swf generated by mtasc from 
application.as and application.swf generated from the xml file end up merged together?

Any pointers are greatly appreciated!

Andrew
___
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org


Re: [swfmill] swfmill + mtasc + emacs (Beginner)

2006-05-19 Thread Mark Winterhalder
Hi Andrei,

basically, there are two methods:

- make swfmill swf first, then tell mtasc to compile the code /into/ it, or
- compile mtasc swf first, then have a clip import=classes.swf /
somewhere in your swfml-s

Personally, I have always used the latter. It has the advantage of
being able to link classes to assets (so that library movieclips can
have behaviours), but I don't think this works with haXe at present.
(If you're new to SWF, consider using haXe instead of AS. See
haXe.org. It's a matter of preference, of course, just thought I'd
point you to it -- haXe is something like mtasc's successor, slightly
different syntax but can target several platforms.)

See Aral's sequel of the tutorial you linked to for details of the two ways:
http://www.flashant.org/index.php?p=408more=1c=1

Hth,
Mark



On 5/19/06, Andrei Stebakov [EMAIL PROTECTED] wrote:

 Hi,

 I just started with Flash and probably have the most stupid question...
 Looks like I miss one step how to actually link the swf file generated by
 swfmill and the sfw file generated by mtasc.
 I am looking at
 http://aralbalkan.com/index.php?p=373more=1c=1 (FAMES
 tutorial) and I can't understand how the application.swf generated by mtasc
 from application.as and application.swf generated from the xml file end up
 merged together?

 Any pointers are greatly appreciated!

 Andrew
 ___
 swfmill mailing list
 swfmill@osflash.org
 http://osflash.org/mailman/listinfo/swfmill_osflash.org





-- 
http://snafoo.org/

___
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org


Re: [swfmill] swfmill + mtasc + emacs (Beginner)

2006-05-19 Thread Robert Jonathan Molesa
Andrei,
Both swfmill and mtasc can create the application.swf.  If you're
using swfmill to create the swf in order to place images and other
assets, the you do not need to again create the application.swf again
with mtasc.  Instead, just inject your AS code into the existing swf
mtasc -main -swf application.swf application.as.  This would assume
you already have an swf called application.swf.

Andrei Stebakov wrote:
 Hi,
  
 I just started with Flash and probably have the most stupid question...
 Looks like I miss one step how to actually link the swf file generated
 by swfmill and the sfw file generated by mtasc.
 I am looking at http://aralbalkan.com/index.php?p=373more=1c=1
 http://aralbalkan.com/index.php?p=373more=1c=1 (FAMES tutorial)
 and I can't understand how the application.swf generated by mtasc from
 application.as http://application.as and application.swf generated
 from the xml file end up merged together?
  
 Any pointers are greatly appreciated!
  
 Andrew
 

 ___
 swfmill mailing list
 swfmill@osflash.org
 http://osflash.org/mailman/listinfo/swfmill_osflash.org
   

-- 
Jon Molesa
Owner - Consoltec
828-994-2067
[EMAIL PROTECTED]
http://www.consoltec.net

___
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org


Re: [swfmill] swfmill + mtasc + emacs (Beginner)

2006-05-19 Thread daniel fischer
Andrew,

it depends on your Entry Point Method. You can
 a) construct the swf containing your assets with swfmill, then use MTASC to 
compile into the swf, and use mtasc's -main (i'd call this traditional)
 b) compile the code first, generating classes.swf, then import that using 
swfmill (clip import=classes.swf/), likely calling main from swfml (call 
object=Main method=main/) (swfmill as linker or sth.)
 c) not use main at all, but just couple classes to your clip/s (i think 
that's called Natural entry point method)

to probably make it clearer, what i do for swfmill's informal test is method b):

#mtasc -cp .../std -swf classes.swf -header 320:240:25 Main.as
#swfmill -v simple test.swfml output.swf

with a test.swfml of basically:

movie width=450 height=270 framerate=15
library
clip import=classes.swf/
/library
frame
call object=Main method=main/
/frame
/movie



hope that helps, i'm sorry that swfmill docs are so sparse.

-dan


Andrei Stebakov [EMAIL PROTECTED] (on Fri, 19 May 2006 12:27:40 -0400):

   Hi,
   
   I just started with Flash and probably have the most stupid question...
   Looks like I miss one step how to actually link the swf file generated by
   swfmill and the sfw file generated by mtasc.
   I am looking at http://aralbalkan.com/index.php?p=373more=1c=1 (FAMES
   tutorial) and I can't understand how the application.swf generated by mtasc
   from application.as and application.swf generated from the xml file end up
   merged together?
   
   Any pointers are greatly appreciated!
   
   Andrew



-- 
http://0xDF.com/
http://iterative.org/

___
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org


Re: [swfmill] swfmill + mtasc + emacs (Beginner)

2006-05-19 Thread daniel fischer

lol- i wonder why a single question suddenly creates a flurry of replies while 
others might even remain unanswered... :)


-- 
http://0xDF.com/
http://iterative.org/

___
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org


Re: [swfmill] swfmill + mtasc + emacs (Beginner)

2006-05-19 Thread Robert Jonathan Molesa
I was thinking the same thing myself.  So questions go unanswered for a
while and this one gets lots of attention.

For me it was a question I felt that I could actually answer.  haha.

daniel fischer wrote:
 lol- i wonder why a single question suddenly creates a flurry of replies 
 while others might even remain unanswered... :)


   

-- 
Jon Molesa
Owner - Consoltec
828-994-2067
[EMAIL PROTECTED]
http://www.consoltec.net

___
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org


Re: [swfmill] swfmill + mtasc + emacs (Beginner)

2006-05-19 Thread Andrei Stebakov
Ok, I created the xml file:
?xml version=1.0 encoding=iso-8859-1?movie width=320 height=240 framerate=30background color=#ff/frame
libraryclip id=spheres import=library/spheres.png//library/frame
library clip import=classes.swf/ /library frame call object=Main method=main/ /frame
/movie
The code in classes.swf is suppoesed to animate the spheres.png takend from the assets. I still see the blank window when I launch the resulting application.swf file. Do I mis-compose the assets in the application.xml
?

Thanks,
Andrew


On 5/19/06, daniel fischer [EMAIL PROTECTED] wrote:
Andrew,it depends on your Entry Point Method. You cana) construct the swf containing your assets with swfmill, then use MTASC to compile into the swf, and use mtasc's -main (i'd call this traditional)
b) compile the code first, generating classes.swf, then import that using swfmill (clip import=classes.swf/), likely calling main from swfml (call object=Main method=main/) (swfmill as linker or sth.)
c) not use main at all, but just couple classes to your clip/s (i think that's called Natural entry point method)to probably make it clearer, what i do for swfmill's informal test is method b):
#mtasc -cp .../std -swf classes.swf -header 320:240:25 Main.as#swfmill -v simple test.swfml output.swfwith a test.swfml of basically:movie width=450 height=270 framerate=15
 library clip import=classes.swf/ /library frame call object=Main method=main/
 /frame/moviehope that helps, i'm sorry that swfmill docs are so sparse.-danAndrei Stebakov [EMAIL PROTECTED]
 (on Fri, 19 May 2006 12:27:40 -0400): Hi, I just started with Flash and probably have the most stupid question... Looks like I miss one step how to actually link the swf file generated by
 swfmill and the sfw file generated by mtasc. I am looking at http://aralbalkan.com/index.php?p=373more=1c=1 (FAMES tutorial) and I can't understand how the 
application.swf generated by mtasc from application.as and application.swf generated from the xml file end up merged together? Any pointers are greatly appreciated!
 Andrew--http://0xDF.com/http://iterative.org/___swfmill mailing list
swfmill@osflash.orghttp://osflash.org/mailman/listinfo/swfmill_osflash.org
___
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org


Re: [swfmill] swfmill + mtasc + emacs (Beginner)

2006-05-19 Thread Mark Winterhalder
Hi Andrei,

This looks correct, is the resulting SWF smaller if you !-- comment
out -- the clip import=... / part? If so, it gets imported as it
is supposed to. (It doesn't have to be inside a library/ tag, btw.)

The way it is now, it assumes you have a class Main with a static
method main() in your classes.swf. If so, it should get called. You
could also skip that part and add -main to your mtasc arguments, but
you'd still need a static method main().

Here's a short example Main.as that /should/ work (i.e., I am too lazy
to test it):

class Main.as {
  public function Main () {}

  public static function main () {
var sphere:MovieClip = _root.attachMovie( spheres, sphere1, 1 );
sphere.onEnterFrame = function () {
  this._x += Math.random() * 4;
  this._y += Math.random() * 3;
};
  }
}

Dan: I guess Jon is right, it's the one thing everybody can answer
because we all need to do it :)

Hth,
Mark


On 5/19/06, Andrei Stebakov [EMAIL PROTECTED] wrote:

 Ok, I created the xml file:

 ?xml version=1.0 encoding=iso-8859-1?
 movie width=320 height=240 framerate=30
  background color=#ff/
  frame
  library
   clip id=spheres import=library/spheres.png/
  /library
  /frame


  library
clip import=classes.swf/
/library
frame
call object=Main method=main/
/frame
 /movie

 The code in classes.swf is suppoesed to animate the spheres.png takend from
 the assets. I still see the blank window when I launch the resulting
 application.swf file. Do I mis-compose the assets in the application.xml ?

 Thanks,
 Andrew






 On 5/19/06, daniel fischer [EMAIL PROTECTED] wrote:
  Andrew,
 
  it depends on your Entry Point Method. You can
  a) construct the swf containing your assets with swfmill, then use MTASC
 to compile into the swf, and use mtasc's -main (i'd call this
 traditional)
  b) compile the code first, generating classes.swf, then import that
 using swfmill (clip import=classes.swf/), likely calling main from swfml
 (call object=Main method=main/) (swfmill as linker or sth.)
  c) not use main at all, but just couple classes to your clip/s (i think
 that's called Natural entry point method)
 
  to probably make it clearer, what i do for swfmill's informal test is
 method b):
 
  #mtasc -cp .../std -swf classes.swf -header 320:240:25 Main.as
  #swfmill -v simple test.swfml output.swf
 
  with a test.swfml of basically:
  
  movie width=450 height=270 framerate=15
 library
 clip import=classes.swf/
 /library
 frame
 call object=Main method=main/
 /frame
  /movie
  
 
 
  hope that helps, i'm sorry that swfmill docs are so sparse.
 
  -dan
 
 
  Andrei Stebakov [EMAIL PROTECTED]  (on Fri, 19 May 2006 12:27:40
 -0400):
 
   Hi,
  
   I just started with Flash and probably have the most stupid question...
   Looks like I miss one step how to actually link the swf file generated
 by
   swfmill and the sfw file generated by mtasc.
   I am looking at
 http://aralbalkan.com/index.php?p=373more=1c=1 (FAMES
   tutorial) and I can't understand how the application.swf generated by
 mtasc
   from application.as and application.swf generated from the xml file end
 up
   merged together?
  
   Any pointers are greatly appreciated!
  
   Andrew
 
 
 
  --
  http://0xDF.com/
  http://iterative.org/
 
  ___
  swfmill mailing list
  swfmill@osflash.org
  http://osflash.org/mailman/listinfo/swfmill_osflash.org
 


 ___
 swfmill mailing list
 swfmill@osflash.org
 http://osflash.org/mailman/listinfo/swfmill_osflash.org





-- 
http://snafoo.org/

___
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org


Re: [swfmill] swfmill + mtasc + emacs (Beginner)

2006-05-19 Thread Andrei Stebakov
Just wondering... I've never tried Flash IDE, would the IDE help to generate the ActionScript code like in this tutorial case, or it's entirely manually written? So the only need for Flash IDE is the timeline and asset management (which is taken care of by swfmill, right)?


Andrew
On 5/19/06, daniel fischer [EMAIL PROTECTED] wrote:
Andrei Stebakov [EMAIL PROTECTED] (on Fri, 19 May 2006 13:19:09 -0400):
 Ok, I created the xml file: ?xml version=1.0 encoding=iso-8859-1? movie width=320 height=240 framerate=30
background color=#ff/framelibrary clip id=spheres import=library/spheres.png//library/frame
libraryclip import=classes.swf//libraryframecall object=Main method=main/
/frame /movie The code in classes.swf is suppoesed to animate the spheres.png takend from the assets. I still see the blank window when I launch the resulting
 application.swf file. Do I mis-compose the assets in the application.xml?apart from that you probably dont want two libraries and frames, the swfml looks alright. could you post your main class too, plz?
-dan--http://0xDF.com/http://iterative.org/___swfmill mailing list
swfmill@osflash.orghttp://osflash.org/mailman/listinfo/swfmill_osflash.org
___
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org


Re: [swfmill] swfmill + mtasc + emacs (Beginner)

2006-05-19 Thread Robert Jonathan Molesa
everything goes in the movie tag because you have only one movie that
you're creating.

Andrei Stebakov wrote:
 By Jove, it works now!
 Question: Why do we put everything withing the same movie tag? I
 thought only the frames of the movie are supposed to go there... Is
 the sequence of tags important?
  
 Andrew
  
 On 5/19/06, *Mark Winterhalder* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 Ah, easy:

 replace call object=Main method=main/
 with call object=Application method=main/

 Hth,
 Mark



 On 5/19/06, Andrei Stebakov [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:
 
  The code of the main class is:
 
 
 
  class Application extends MovieClip
  {
   var tfCaption:TextField;
 
   // Clips attached dynamically from Swfmill library
   var mcSpheres:MovieClip;
 
   var sW:Number = null;  // Stage width
   var sH:Number = null; // Stage height
 
   private function Application ( target )
   {
// Link movie clips to classes
Object.registerClass ( spheres, Particle );
 
// Assimilate the target
target.__proto__ = this.__proto__;
target.__constructor__ = Application;
this = target;
 
// Store stage dimensions for easy look-up
sW = Stage.width - 1;
sH = Stage.height - 1;
 
// Draw border around the stage
lineStyle ( 1, 0x00 );
moveTo ( 0, 0 );
lineTo ( sW, 0 );
lineTo ( sW, sH );
lineTo ( 0, sH );
lineTo ( 0, 0 );
 
//
// Create a caption
//
var captionTextFormat = new TextFormat();
captionTextFormat.size = 12;
captionTextFormat.font = _sans;
 
var captionText:String = Made with FAMES (FAME + Swfmill);
 
var captionTextExtent:Object = captionTextFormat.getTextExtent (
  captionText );
var captionWidth:Number =
  captionTextExtent.textFieldWidth;
var captionHeight:Number =
  captionTextExtent.textFieldHeight;
var captionX = sW / 2 - captionWidth / 2;
var captionY = sH - captionHeight;
 
createTextField( tfCaption, 1, captionX, captionY,
 captionWidth,
  captionHeight );
 
// Write caption text
tfCaption.text = captionText;
 
// Add ten particles
for ( var i = 0; i  10; i++ )
{
 // Attach a sphere clip
 attachMovie (spheres, mcSphere, 1000 + i );
}
   }
 
   static function main ()
   {
// Create an Application instance and
// have is assimilate _root.
var test:Application = new Application( _root );
   }
  }
 
 
 
  On 5/19/06, daniel fischer  [EMAIL PROTECTED] mailto:[EMAIL 
 PROTECTED]
 wrote:
   Andrei Stebakov [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] (on Fri, 19 May 2006 13:19:09
  -0400):
  
Ok, I created the xml file:
   
?xml version=1.0 encoding=iso-8859-1?
movie width=320 height=240 framerate=30
 background color=#ff/
 frame
 library
  clip id=spheres import=library/spheres.png/
 /library
 /frame
   
 library
   clip import=classes.swf/
   /library
   frame
   call object=Main method=main/
   /frame
/movie
  
The code in classes.swf is suppoesed to animate the
 spheres.png takend
  from
the assets. I still see the blank window when I launch the
 resulting
application.swf file. Do I mis-compose the assets in the
  application.xml?
  
   apart from that you probably dont want two libraries and
 frames, the swfml
  looks alright. could you post your main class too, plz?
  
   -dan
  
   --
   http://0xDF.com/
   http://iterative.org/
  
   ___
   swfmill mailing list
   swfmill@osflash.org mailto:swfmill@osflash.org
   http://osflash.org/mailman/listinfo/swfmill_osflash.org
 http://osflash.org/mailman/listinfo/swfmill_osflash.org
  
 
 
  ___
  swfmill mailing list
  swfmill@osflash.org mailto:swfmill@osflash.org
  http://osflash.org/mailman/listinfo/swfmill_osflash.org
 
 
 


 --
 http://snafoo.org/

 ___
 swfmill mailing list
 swfmill@osflash.org mailto:swfmill@osflash.org
 http://osflash.org/mailman/listinfo/swfmill_osflash.org


 

 ___
 swfmill mailing list
 swfmill@osflash.org
 http://osflash.org/mailman/listinfo/swfmill_osflash.org
   

-- 
Jon Molesa
Owner - 

Re: [swfmill] swfmill + mtasc + emacs (Beginner)

2006-05-19 Thread Robert Jonathan Molesa
The FlashIDE is really one useful for placing the assets and timeline
control as you stated.  If you're asking if it automatically writes AS
code for you, I don't believe that it does.  However, there are
shortcuts for simple actions.  The FlashIDE's code interface is highly
regarded as sub par for the purpose of programming.  Those that use the
IDE to build the asset library are usually graphics designers, which
then pass the swf to a programmer that typically uses mtasc to compile
in the code.  Mtasc is much faster and more strict in what it allows to
compile.

Andrei Stebakov wrote:
 Just wondering... I've never tried Flash IDE, would the IDE help to
 generate the ActionScript code like in this tutorial case, or it's
 entirely manually written? So the only need for Flash IDE is the
 timeline and asset management (which is taken care of by swfmill, right)?
  
 Andrew

  
 On 5/19/06, *daniel fischer* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
 wrote:

 Andrei Stebakov [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] (on Fri, 19 May 2006 13:19:09 -0400):

  Ok, I created the xml file:
 
  ?xml version=1.0 encoding=iso-8859-1?
  movie width=320 height=240 framerate=30
   background color=#ff/
   frame
   library
clip id=spheres import=library/spheres.png/
   /library
   /frame
 
   library
 clip import=classes.swf/
 /library
 frame
 call object=Main method=main/
 /frame
  /movie

  The code in classes.swf is suppoesed to animate the spheres.png
 takend from
  the assets. I still see the blank window when I launch the resulting
  application.swf file. Do I mis-compose the assets in the
 application.xml?

 apart from that you probably dont want two libraries and frames,
 the swfml looks alright. could you post your main class too, plz?

 -dan

 --
 http://0xDF.com/
 http://iterative.org/

 ___
 swfmill mailing list
 swfmill@osflash.org mailto:swfmill@osflash.org
 http://osflash.org/mailman/listinfo/swfmill_osflash.org


 

 ___
 swfmill mailing list
 swfmill@osflash.org
 http://osflash.org/mailman/listinfo/swfmill_osflash.org
   

-- 
Jon Molesa
Owner - Consoltec
828-994-2067
[EMAIL PROTECTED]
http://www.consoltec.net

___
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org