Preface
first of all, please forgive my fractured english! I am italian not used to speak/write english. If you don't understand something please drop me a line in english, that will probably be better than mine. [top]

What is mk and what it does
mk is a pure php framework for producing/editing swf files. It aims to provide a complete swf support using standard php libraries. At the moment of writing this document mk can deal with swf and tag headers, defineShape, images, actionscript bytecode.
The project has started in sept 2004 and follow a slow progress since is mantained by an one person "for fun".
I you find mk useful (note that mk is released under gpl) please let me know, i will listen to suggestions and bug reports.

Use cases

Typical use cases:

mk typical use cases
    Uses/flow:

mk uses/dev flow

mk can be used either for flash content development or web server component, for me is useful in production flow for setup files in a complete development chain based on full open source tools:

  1. eclipse
  2. asdt
  3. as2ant
  4. phpeclipse
  5. batik eclipse plugin
  6. and of course, mk

mk is far from being perfect, but for sure it gets better day by day, hoping to be something useful for developers as it is for me.

changes from last snapshot release (april 2006)
I've not made any promises to keep a decent changelog... so there is not :P, anyway mk ha some nice features to worth tell:

note that the whole class naming convention has changed, if you have done some coding with mk you must edit in order to use the latest snapshot release.

changes from last snapshot release (october 2005)

* NOTE: some methods and class name has changed, please refer to these new samples. If you have coded on earlier releases it is recommended to do some testing.

changes from last snapshot release (may 2005)
I've made many improvements in the last months, unfortunately I'm also too busy (probably lazy is the right term :P ) to mantain accurate changelog, hope in future to track better project progress, here is an overview of new features:

remember, all in mk is experimental, more testing needed. [top]

Installation
yep, mk is quite simple to install, uncompress mk package, put where you want in your web server and simply open config.inc.php and edit the $mkroot variable to adjust your ABSOLUTE path to mk folder. You may prefer to configure a virtual server e.g. in apache, the scope of these decisions are over of this user guide, they are related to daily administration for webmaster.
The rest of config.inc.php should not be changed, excepting DEBUG_STATUS that cause message to be shown in web browser (if you don't want this set it to zero).
mk needs write privileges in directores: tmp, media/bcks, media/flash. Many paths are preconfigured so mk can retrieve properly relevant contributions, e.g. if you put your svg files in media/svg you don't need to set any explicit path. Every class that require a path to load/write files has setter/getter to deal with each path you want, it is only required that you use absolute path or combining with SERVER_[...] preconfigured paths defined in config.inc.php. [top]

Requirements
mk needs a web server configured with php. Basic file system for mk is:

     mk_root_folder
     |
     |__ classes
     |__ lib
     |__ media
     |     |__ bcks
     |     |__ flash
     |     |__ flasm
     |     |__ fonts
     |     |__ imgs
     |     |__ snd
     |     |__ svg
     |     |__ ut
     |
     |__ tmp
   
directory css, docs and samples were included for distributing samples and this userguide

Testing systems
mk was developed on windows xp pro and linux fedora core 5 with three different machines that run php4 and php5 with apache httpd, on-line version is linux 2.4 kernel + apache + php4.
If you like, even if mk works fine, tell systems features you are working on. [top]

Reference
there is a quick and dirt documentation reference you may use to dive in mk. [top]

Let's start
to use mk you have to create your own app and include the file config.inc.php

include("config.inc.php"); // be care to reference with a correct relative path
note that for security reasons every mk php file does not return anything but errors (if php.ini is configured to do that) if linked directly. [top]

mk is based on hybrid classes/functions model, there are several function utilities and classes ready to use. Basically developer has to instantiate one or more classes and deal with their methods/parameters using php itself or function utilities.
Many classes/functions has default arguments, so in some case they don't need to know much about it, e.g. when creating a new swf you get a 550x400 pixel stage, 12 fps, version 6 and white background. [top]

the configuration file: config.inc.php
config.inc.php contains several constans and mk assumptions, they are used all around mk in many situations, please refer to this file when needed, they are (almost all) commented. [top]

Explore mk feature
there is a bunch of samples that can be considered a simple overview of mk features. I hope you will dive into the project to explore the whole mk potential, please report your successful attempts and whatare your best results. [top]

feedback
I'm listening to suggestions, feature requests, snippets and further improvements. Feel free to submit bugs or whatever, but just notice, mk has not deadlines, no master-blaster nor commercial expectations/customer-care. [top]

future plans
of course mk miss too many things to mention, they are in a sort of implementation queue. I plan to improve animations and fonts, give actionscript buttons, sound and (maybe) video support. [top]

credits
many thanks to:

respects to the warp9 crew for its support and macchia for some translation corrections. [top]

06.2k6
jaco_at_pixeldump_dot_org

mikrokosmos