Yeah, that's what i was thinking about. I think, i'll give it a try
with a real world project.
Cheers,
Ralf.


On 8/17/06, Nicolas Cannasse <[EMAIL PROTECTED]> wrote:
> > Great news Nicolas,
> >
> > i wonder if we can find a common API for the flash players, which
> > makes it possible to compile from the same source. Maybe it is
> > possible as long as we restrict ourselfs to the elder features?
> >
> > Great work!
> > Ralf.
>
> Yes I think such a thing is possible.
> Adding an common abstraction that will be either implemented using
> Flash8 or Flash9 API and use this abstraction to write
> multi(flash)player content ;)
>
> A small example that gives an idea :
>
> class MClip {
>
>     #if flash9
>     var mc : flash.display.MovieClip;
>     #else flash
>     var mc : flash.MovieClip;
>     #end
>
>     public var parent(getParent,null) : MClip;
>
>     function new(mc) {
>         this.mc = mc;
>     }
>
>     function getParent() {
>         #if flash9
>         return new MClip(mc.parent);
>         #else flash
>         return new MClip(mc._parent);
>         #end
>     }
>
>     public function empty( parent : MClip ) {
>         #if flash9
>         var mc = new flash.display.MovieClip();
>         parent.mc.addChild(mc);
>         #else flash
>         var d = parent.mc.getNextHighestDepth();
>         var mc = parent.mc.createEmptyMovieClip("@empty"+d,d);
>         #end
>         return new MClip(mc);
>     }
>
> }
>
> Nicolas
>
> _______________________________________________
> osflash mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>


-- 
Ralf Bokelberg <[EMAIL PROTECTED]>
Flex & Flash Consultant based in Cologne/Germany

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to