Flash CS3 - Flash CS4

Free tutorials and scripts for all.
Actionscript 3.0

SWF to PNG with Actionscript 3.0 - ByteArray class

This is a discussion on SWF to PNG with Actionscript 3.0 - ByteArray class within the Tutorials forums, part of the English Forums category; does any one of you is able to export the png as transparent. if so please let me know....


Go Back   Forum Flash CS3 Flash CS4 > English Forums > Tutorials

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #71 (permalink)  
Old 22-07-08, 21:21
Junior Member
 
Join Date: Jun 2008
Posts: 1
Rep Power: 0
robinhavoc is on a distinguished road
Re: SWF to PNG with Actionscript 3.0 - ByteArray class

does any one of you is able to export the png as transparent. if so please let me know.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #72 (permalink)  
Old 07-09-08, 08:44
Junior Member
 
Join Date: Sep 2008
Posts: 1
Rep Power: 0
ashdude is on a distinguished road
Re: SWF to PNG with Actionscript 3.0 - ByteArray class

The above post does work with changing the flag inside the main .as file to true and republishing the main swf file.

The reason why you guys might not see the transparent effect is because IE6 doesn't display transparency in PNG files without the help of a filter. Firefox displays the transparency fine.

So my suggestion for noobs is, change:

Code:
var encoding:PNGEncoder;
                bitmap_data=new BitmapData(stage.stageWidth,stage.stageHeight,false,0xDEDEDE);
                bitmap_data.draw(clip);
                byte_array=PNGEncoder.encode(bitmap_data);
to

Code:
var encoding:PNGEncoder;
                bitmap_data=new BitmapData(stage.stageWidth,stage.stageHeight,true,0xDEDEDE);
                bitmap_data.draw(clip);
                byte_array=PNGEncoder.encode(bitmap_data);
and save it

republish the swf file to something with a different filename like main_eng_trans.swf

embed this new movie into a new html page and run it.

After the final image is displayed, right click it and "save file as" to the desktop and hey presto the image has transparency.

To get IE6 to display it properly is harder but check this post:

A List Apart: Articles: Cross-Browser Variable Opacity with PNG: A Real Solution

Cheers!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #73 (permalink)  
Old 21-10-08, 17:56
Junior Member
 
Join Date: Oct 2008
Posts: 1
Rep Power: 0
alexnechifor is on a distinguished road
Re: SWF to PNG with Actionscript 3.0 - ByteArray class

flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #74 (permalink)  
Old 22-10-08, 15:21
Onsitus's Avatar
CSS.FlepStudio.org
 
Join Date: Jul 2007
Location: Nettuno Beach
Posts: 973
Rep Power: 2
Onsitus is on a distinguished road
Re: SWF to PNG with Actionscript 3.0 - ByteArray class

Quote:
Originally Posted by alexnechifor View Post
flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER flep<-LIFE SAVER.
Original as a first message.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #75 (permalink)  
Old 31-10-08, 17:26
Junior Member
 
Join Date: Oct 2008
Posts: 1
Rep Power: 0
maximillion is on a distinguished road
Exclamation Re: SWF to PNG with Actionscript 3.0 - ByteArray class

flep,

i am new to AS3 and i need some help with this.. heres what i am trying to do.
i have a an swf that upon the user finishing and clicking a button to move on i can "screenshot" the entire app and send it over in a PNG to a location on my server.

I still havent started working with classes yet, so i am confused as to how i can apply this to my app. can you help? I have been searching for a solution to this for days now and i need to get this done ASAP.

thanks in advance.


max

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Flash Multi Gallery
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
Slicing an image with the Matrix Class of Actionscript 3.0 Flep Tutorials 7 17-11-08 01:48
Actionscript calls Javascript - ExternalInterface class of Flash CS3 Flep Tutorials 1 21-10-08 16:30
CheckEmail Class - Actionscript 3.0 Flep Tutorials 9 19-12-07 08:03
Timer class of Actionscript 3.0 Flep Tutorials 0 08-10-07 16:34
ByteArray Flep Articoli e tutorials 0 19-09-07 17:10


All times are GMT. The time now is 21:12.


Powered by vBulletin versione 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC4
Forum SiteMap


FlepStudio
by Filippo Lughi
P.IVA 03605860406