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 Flash English category; Hi Flep, I am able to add the redo button as you suggestion. I wonder if you can help me ...


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

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #61 (permalink)  
Old 05-06-08, 09:09
Junior Member
 
Join Date: Apr 2008
Posts: 3
Rep Power: 0
Cazem is on a distinguished road
Re: SWF to PNG with Actionscript 3.0 - ByteArray class

Hi Flep,
I am able to add the redo button as you suggestion. I wonder if you can help me 1 more time. I want to add a brush button where user can chose the thickness of their pen to draw ( like 1 = thickness, 10 = lightness) ???

Hope you can help . Greatly appreciated.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #62 (permalink)  
Old 05-06-08, 14:29
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,535
Rep Power: 6
Flep is on a distinguished road
Re: SWF to PNG with Actionscript 3.0 - ByteArray class

Hi Cazem,

did you try by changing the value of lineStyle ?
__________________

 


I recommend: Essential Actionscript 3.0

- I do not reply technicians pvt messages. Open a thread !
- Non rispondo ai messaggi privati con domande tecniche. Apri una discussione sul forum !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #63 (permalink)  
Old 24-06-08, 17:00
Junior Member
 
Join Date: Jun 2008
Posts: 5
Rep Power: 0
Iszard is on a distinguished road
Re: SWF to PNG with Actionscript 3.0 - ByteArray class

Ello, I think you have a great example here.

I was trying it out on my server but am running into some problems maybe you can help.

The only thing i have changed from the zip file it'self was I published the file with an HTML page and change the two URLs in main.as to read my locations on the server

However once i hit "create image" it goes to the echo command but errors out saying it can not find the image. When I check the server the image isn't there either.

Any possible errors I could have done? I have no changed the php code either or anything else.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #64 (permalink)  
Old 24-06-08, 17:20
Junior Member
 
Join Date: Jun 2008
Posts: 5
Rep Power: 0
Iszard is on a distinguished road
Re: SWF to PNG with Actionscript 3.0 - ByteArray class

Oh nevermind. The image folder was given 755 once switch to 777 it all works great thanks again!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #65 (permalink)  
Old 26-06-08, 12:06
Junior Member
 
Join Date: Jun 2008
Posts: 3
Rep Power: 0
antigirl is on a distinguished road
Re: SWF to PNG with Actionscript 3.0 - ByteArray class

HEY
is it possible to save pngs transparently?

i've changed the bitmap Data parameters to (height, width, TRUE);
and left it empty for background color. and ive changed swf's wmode to transparent.

yet PNG still has a white background?


i need to mask an image and save that as a png, its an oval mask so cant have any background color

thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #66 (permalink)  
Old 02-07-08, 03:47
Junior Member
 
Join Date: Jun 2008
Posts: 5
Rep Power: 0
Iszard is on a distinguished road
Re: SWF to PNG with Actionscript 3.0 - ByteArray class

Hey Antigirl,

Sounds like we might be working on the same kind of project. I have mine exporting with a mask leaving me with an oval. and if i show the image right away I have it with a transparent background. However the file it saves to the server does not have the transparent background.


I would be glad to work together to find the answer to the same goal.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #67 (permalink)  
Old 02-07-08, 09:54
Junior Member
 
Join Date: Jun 2008
Posts: 3
Rep Power: 0
antigirl is on a distinguished road
Re: SWF to PNG with Actionscript 3.0 - ByteArray class

hey i think i have transparency working

in your bitmap code, make sure background is white
PHP Code:
if(myBitmap.width>2&& myBitmap.height>2)
            {
                var 
encoding:PNGEncoder;
                
bitmap_data=new BitmapData(Mask.height,Mask.width,true,0x000000); 
my main problem is that pngencoder takes snapshot from 0,0 to whatever height width stated, on the stage, is it possible for snapshot to start anywhere else on stage rather than 0,0?


thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #68 (permalink)  
Old 02-07-08, 16:30
Junior Member
 
Join Date: Jun 2008
Posts: 5
Rep Power: 0
Iszard is on a distinguished road
Re: SWF to PNG with Actionscript 3.0 - ByteArray class

well 0x000000 is black for starters so thats not transparent. It comes up with a black background.

And as for it not starting a 0,0 that i have not seen done. However my work around was putting it in a MC so that is 0,0 and i interact with everything inside that MC giving me that 0,0 and yet giving me the freedom to work with my image
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #69 (permalink)  
Old 02-07-08, 16:35
Junior Member
 
Join Date: Jun 2008
Posts: 3
Rep Power: 0
antigirl is on a distinguished road
Re: SWF to PNG with Actionscript 3.0 - ByteArray class

doesnt matter what background is so, the 3rd field is for transparency


BitmapData(width:int, height:int, transparent:Boolean = true, fillColor:uint = 0xFFFFFFFF)

and it works for me !?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #70 (permalink)  
Old 07-07-08, 20:39
Junior Member
 
Join Date: Jun 2008
Posts: 5
Rep Power: 0
Iszard is on a distinguished road
Re: SWF to PNG with Actionscript 3.0 - ByteArray class

My image seems to only still have the transparency if duplicated in flash. However if i save it to the server and well maybe it is how i am viewing it put I open the image in a browser and there is no transparency anymore.

I don't know XML and PHP well enough, so I am going to have to find an example to work off of to upload it back into flash
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

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
Timer class of Actionscript 3.0 Flep Tutorials 5 20-12-08 17:44
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
ByteArray Flep Articoli e tutorials 0 19-09-07 17:10


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

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