Re: [Flashcoders] Bundle swf's on server for transport to client

2008-02-04 Thread Gert-Jan van der Wel
That's a nice hack indeed! I'll keep it in mind. Thanks!
Gert-Jan

2008/2/4, EECOLOR <[EMAIL PROTECTED]>:
>
> >In the Flash app we are having some trouble with the attachMovie method
> and
> the fact that you can only attach a mc on the same parent.
>
> What you could do here (if you are developing for Flash 8) is put a method
> in you library like this (might contain errors, wrote it from the top of
> my
> head):
>
> function getImageBitmapData(linkageID:String, width:Number,
> height:Number):BitmapData
> {
>var currentImage:MovieClip = attachMovie(linkageID, "currentImage", 0);
>
>var bmd:BitmapData = new BitmapData(width, height);
>bmd.draw(currentImage);
>
>//remove the movieclip
>currentImage.removeMovieClip();
>//make sure it is removed
>delete this.currentImage;
>
>return bmd;
> };
>
> Then where you use the component you could draw it with attachBitmap or
> bitmapFill. I suspect you resize the images aswell. In that case at the
> end
> of the resize just get a new bitmapData (during might be too heavy,
> something to test I guess).
>
>
> Greetz Erik
>
>
> On 2/4/08, Gert-Jan van der Wel <[EMAIL PROTECTED]> wrote:
> >
> > Hi Erik,
> > Thank you for your response. I know that something like this should be
> > possible in AS3 but we're (at this moment) stuck with AS2, so that makes
> > it
> > a little bit more difficult.
> >
> > On our server we've been testing with Swfmill and Ming, but we keep
> > getting
> > an error rate of about 10% with the bundling our furniture swf's to one
> > big
> > swf. In the Flash app we are having some trouble with the attachMovie
> > method
> > and the fact that you can only attach a mc on the same parent.
> >
> > Therefor we decided to stop our attempt. We'll continue our quest when
> the
> > main app is AS3 ;-)
> >
> > Cheers,
> > Gert-Jan
> >
> >
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
Gert-Jan van der Wel
Floorplanner

[w] http://www.floorplanner.com
[e] [EMAIL PROTECTED]
[t] +31 616.650.338
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Bundle swf's on server for transport to client

2008-02-04 Thread EECOLOR
>In the Flash app we are having some trouble with the attachMovie method and
the fact that you can only attach a mc on the same parent.

What you could do here (if you are developing for Flash 8) is put a method
in you library like this (might contain errors, wrote it from the top of my
head):

function getImageBitmapData(linkageID:String, width:Number,
height:Number):BitmapData
{
   var currentImage:MovieClip = attachMovie(linkageID, "currentImage", 0);

   var bmd:BitmapData = new BitmapData(width, height);
   bmd.draw(currentImage);

   //remove the movieclip
   currentImage.removeMovieClip();
   //make sure it is removed
   delete this.currentImage;

   return bmd;
};

Then where you use the component you could draw it with attachBitmap or
bitmapFill. I suspect you resize the images aswell. In that case at the end
of the resize just get a new bitmapData (during might be too heavy,
something to test I guess).


Greetz Erik


On 2/4/08, Gert-Jan van der Wel <[EMAIL PROTECTED]> wrote:
>
> Hi Erik,
> Thank you for your response. I know that something like this should be
> possible in AS3 but we're (at this moment) stuck with AS2, so that makes
> it
> a little bit more difficult.
>
> On our server we've been testing with Swfmill and Ming, but we keep
> getting
> an error rate of about 10% with the bundling our furniture swf's to one
> big
> swf. In the Flash app we are having some trouble with the attachMovie
> method
> and the fact that you can only attach a mc on the same parent.
>
> Therefor we decided to stop our attempt. We'll continue our quest when the
> main app is AS3 ;-)
>
> Cheers,
> Gert-Jan
>
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Bundle swf's on server for transport to client

2008-02-04 Thread Gert-Jan van der Wel
Hi Erik,
Thank you for your response. I know that something like this should be
possible in AS3 but we're (at this moment) stuck with AS2, so that makes it
a little bit more difficult.

On our server we've been testing with Swfmill and Ming, but we keep getting
an error rate of about 10% with the bundling our furniture swf's to one big
swf. In the Flash app we are having some trouble with the attachMovie method
and the fact that you can only attach a mc on the same parent.

Therefor we decided to stop our attempt. We'll continue our quest when the
main app is AS3 ;-)

Cheers,
Gert-Jan

2008/2/3, EECOLOR <[EMAIL PROTECTED]>:
>
> With AS2 this indeed seems
> tricky. With AS3 you could just zip the stuff, unzip within your Flash
> application and load the bytes. Your best guess is a tool like swfmill
> that has
> the ability to
> create swf's on the server. I only know of a library in java that has
> the ability to generate swf's (javaswf).
>
> If the content you are loading in is created within flash you might be
> able
> to convert it to actionscript drawings (think lineTo and beginFill, etc).
> This allows you to convert those commands to a text or xml file and run
> them
> in your main application.
>
>
> Greetz Erik
>
>
> On 1/30/08, Gert-Jan van der Wel <[EMAIL PROTECTED]> wrote:
> >
> > Hi list,
> >
> > I'm working on the Flash app of
> > Floorplanner and
> > we are having some problems with the loading of all the swf's. The Flash
> > app
> > (AS2) consists of 1 main app that loads several forms (the windows you
> > see,
> > like the library). The library holds a lot of furniture elements, which
> > are
> > separate swf's that are loaded one by one.
> >
> >
> > When someone creates a floor plan and adds furniture to it, it's not
> > strange
> > that the design holds more than 50 furniture
> > elements.
> > Though all elements are small swf files, it takes a lot of time to
> handle
> > all resource requests on our server. So my question is: is there a
> > technique
> > that makes it possible to (dynamically) bundle a set of swf's on the
> > server
> > and transport it to the client?
> >
> > Right now I'm testing with swfmill and it looks promising, but it seems
> a
> > little buggy...
> >
> >
> > I hope someone can help me out and point me in the right direction.
> >
> > Cheers,
> > Gert-Jan
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
Gert-Jan van der Wel
Floorplanner

[w] http://www.floorplanner.com
[e] [EMAIL PROTECTED]
[t] +31 616.650.338
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Bundle swf's on server for transport to client

2008-02-02 Thread EECOLOR
With AS2 this indeed seems
tricky. With AS3 you could just zip the stuff, unzip within your Flash
application and load the bytes. Your best guess is a tool like swfmill
that has
the ability to
create swf's on the server. I only know of a library in java that has
the ability to generate swf's (javaswf).

If the content you are loading in is created within flash you might be able
to convert it to actionscript drawings (think lineTo and beginFill, etc).
This allows you to convert those commands to a text or xml file and run them
in your main application.


Greetz Erik


On 1/30/08, Gert-Jan van der Wel <[EMAIL PROTECTED]> wrote:
>
> Hi list,
>
> I'm working on the Flash app of
> Floorplanner and
> we are having some problems with the loading of all the swf's. The Flash
> app
> (AS2) consists of 1 main app that loads several forms (the windows you
> see,
> like the library). The library holds a lot of furniture elements, which
> are
> separate swf's that are loaded one by one.
>
>
> When someone creates a floor plan and adds furniture to it, it's not
> strange
> that the design holds more than 50 furniture
> elements.
> Though all elements are small swf files, it takes a lot of time to handle
> all resource requests on our server. So my question is: is there a
> technique
> that makes it possible to (dynamically) bundle a set of swf's on the
> server
> and transport it to the client?
>
> Right now I'm testing with swfmill and it looks promising, but it seems a
> little buggy...
>
>
> I hope someone can help me out and point me in the right direction.
>
> Cheers,
> Gert-Jan
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Bundle swf's on server for transport to client

2008-01-30 Thread Gert-Jan van der Wel
Hi list,

I'm working on the Flash app of
Floorplanner and
we are having some problems with the loading of all the swf's. The Flash app
(AS2) consists of 1 main app that loads several forms (the windows you see,
like the library). The library holds a lot of furniture elements, which are
separate swf's that are loaded one by one.


When someone creates a floor plan and adds furniture to it, it's not strange
that the design holds more than 50 furniture
elements.
Though all elements are small swf files, it takes a lot of time to handle
all resource requests on our server. So my question is: is there a technique
that makes it possible to (dynamically) bundle a set of swf's on the server
and transport it to the client?

Right now I'm testing with swfmill and it looks promising, but it seems a
little buggy...


I hope someone can help me out and point me in the right direction.

Cheers,
Gert-Jan
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders