Hey!

Has anyone used ming before?
I want to make some buttons with graphics as their visual component, as opposed to a shape.
I basically want to do this:

$buttonSprite = new SWFSprite();
$buttonSprite->add(fopen("images/pauseButton.gif", "rb"));

$pauseButton = new SWFButton();
$pauseButton->addShape(buttonSprite, $hit | SWFBUTTON_DOWN | SWFBUTTON_OVER | SWFBUTTON_UP);

I'm pretty dumb and I don't know why this doesn't work.
Any ideas?

David Politi Super Genius

On Oct 26, 2005, at 3:27 PM, Benjamin Dobler wrote:

Hi All,



i have the following problem. I want to load a sequence of Images. I have my
own SequenceLoader so that is fine.

Now i need to now the size (totalBytes) of all clips in advance to show a
progress bar that counts all clips.

So my first guess is to load one clip wait fort he first progress - get the
bytesTotal - and than cancel the loading. With this i would get the

Sizes of all clips without loading them. Now i always thought it`s not
possible to cancel a loading progress but to my surprise the following seems
to work:



this.createEmptyMovieClip("image_mc", this.getNextHighestDepth());

var mclListener:Object = new Object();

mclListener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number,
bytesTotal:Number){

            var progress:Object = mcLoader.getProgress(image_mc);

    trace(" bytesTotal: " + bytesTotal);

            size_tx.text=bytesTotal;

   image_mcl.unloadClip(target);



};

var image_mcl:MovieClipLoader = new MovieClipLoader();

image_mcl.addListener(mclListener);

image_mcl.loadClip("img1.jpg", image_mc);



I believe that the loading is really canceled. I don`t have the image in my
cache after calling this.

Can someone verify that this works? Any better solutions?



Thanx



Benjamin





RichApps.de

RIA Development



Benjamin Dobler



web:   |  <http://www.richapps.de> http://www.richapps.de

mail:   |  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]



_______________________________________________
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

Reply via email to