Groups | Blog | Home
all groups > flash actionscript > june 2005 >

flash actionscript : I think I broke flash.


subsomatic
6/27/2005 9:46:26 PM
http://www.kellybaker.com/play/wolf.fla

The idea is, I've got a bunch of pngs imported into flash and added to
movieclip, linked and then they're supposed to be added one at a time to the
stage by attachMovie();

For some reason, after number 12, they start dissapearing!

Code:
count = 0;
numCount = 1;
this.onEnterFrame = function(){
count ++;
if(count == 10){
pic = this.attachMovie("img"+numCount, "image"+numCount, numCount);
count = 0;
numCount ++;

}
}

This seems ridiclously simple. Please help!!!
NSurveyor
6/27/2005 10:59:38 PM
Your code has some extra stuff and missing stuff. Use:

totalCount = 47;
count = 1;
this.onEnterFrame = function(){
if(count>totalCount){
delete this.onEnterFrame;
}
count ++;
pic = this.attachMovie("img"+count, "image"+count, count);
}

Also, I believe there is a limit to the number of transparent png's you can
have (or something like that - maybe someone like Jeckyl would kindly explain
this). In fact, the shapes are so simple you could convert them to just to a
fill (vector). Here is what I found to work. Open up one of the movieclips in
the library. Delete the content. Find the image in the library that corresponds
to that movieclip. Drag it onto the stage. Position it at (0,0). Then select
the image, go to Modify > Bitmap > Trace Bitmap. For Color Threshold use 500.
For Minimum Area use 1. Leave the other two options at Normal. Then hit OK.
Repeat this process with all 47 movieclips!
Jeckyl
6/28/2005 12:00:00 AM
[quoted text, click to view]

Scruffy looking bunch :):):)

Jeckyl

I flash therefore I am
6/28/2005 12:00:00 AM
Darn. And my vote was for Dawn (as nice as Jeckyl is to everybody and all!).
Oh well. (Just kidding Jeckyl :) )

Jeckyl
6/28/2005 12:00:00 AM
I thought this was me...

http://redwing.hutman.net/~mreed/warriorshtm/jekylhyde.htm
--
All the best
Jeckyl

subsomatic
6/28/2005 12:00:00 AM
Well, although the topic was a little swayed, thanks for your help guys....

Jeckyl
6/28/2005 12:00:00 AM
[quoted text, click to view]

Yeup .. when you have higher than high quality (ie the player is doing some
smoothing of edges) there is a limit of 10 overlapping objects that have any
alpha<100%. If there's any more than that, the bottom most objects are not
drawn at all. It doesn't matter how much transparency there is (0%, 50%,
99%) .. as soon as there are 10 objects at a given pixel with alpha < 100%,
no other object with alpha < 100% beneath them will be drawn. A very old
bug (or limitation) that would be trivial to fix, and MM have not botyhered
to fi in all these years .. just like the 16000 frame limitation for each
timeline.

Jeckyl


Jeckyl
6/28/2005 12:00:00 AM
see this little example:

http://www.swishzone.com/swf/BUG-overlapping-transparency.swf

if you right-click on the movie and change the quality to 'low' .. the
missing text magically appears, put it back to 'high' and it vanishes. All
because of the overlapping semi-transparent boxes over the text. Even if
the boxes are COMPLETELY transparent, the text disappears. Note: the text
that is a solid color does NOT disappear .. its only other alpha<100 objects
that vanish.
--
Jeckyl

Jeckyl
6/28/2005 12:00:00 AM
[quoted text, click to view]

Same limitation applies whether its a solid fill with color alpha<100, or
gradient with alpha<100, or image with a pixel alpha<100 or whatever. Its
just how flash renders areas with alpha<100 in non-low-quality mode.

jeckyl

I flash therefore I am
6/28/2005 12:00:00 AM
Go here:

http://www.swishzone.com/index.php?area=aboutus&tab=staff

Can you guess which one???

[quoted text, click to view]


NSurveyor
6/28/2005 1:19:30 AM
Indeed. Good to know about these "limitations". Just curious... are you part of
Swishzone?

BTW, I meant Index Transparency like where the PNG has places that are solid
and places that are see through...
Rothrock
6/28/2005 2:01:51 AM
NSurveyor
6/28/2005 2:24:04 AM
subsomatic
6/28/2005 9:07:54 PM
in case anyone is interested, i got it working:
http://www.subsomatic.com/

one of the backgrounds in there - ends up looking like a wolf. not too shabby.

NSurveyor
6/28/2005 10:45:55 PM
AddThis Social Bookmark Button