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, the more lines you draw the more data must be send to PHP. I think that is normal... anyway ...


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
  #51 (permalink)  
Old 02-01-08, 06:55
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,
the more lines you draw the more data must be send to PHP.
I think that is normal... anyway I tried drawing several lines but I did not get so many time...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #52 (permalink)  
Old 05-03-08, 13:31
Junior Member
 
Join Date: Mar 2008
Posts: 1
Rep Power: 0
robalewis is on a distinguished road
Re: SWF to PNG with Actionscript 3.0 - ByteArray class

Hi there,
Thanks for such an interesting tutorial. My knowledge of flash is fairly basic, and I have even less experience of actionscript, so I would appreciate basic help, if that's ok!

I would like to add a "delete all" button to this, to reset the picture and start again from scratch. I can't figure out how to do this - I thought if I could set an action to a button then that would do, but I don't seem to be able to as all the code is in actionscript! Could anybody tell me what code I need to put in and where?!

Help appreciated and thank you again for the brilliant tutorials.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #53 (permalink)  
Old 07-03-08, 15:16
Junior Member
 
Join Date: Mar 2008
Location: Netherlands
Posts: 1
Rep Power: 0
libeco is on a distinguished road
Re: SWF to PNG with Actionscript 3.0 - ByteArray class

First of all let me thank you for this excellent website. I'm busy with an application for school (I started learning AS3 for school about four months ago so I;m not really an expert yet). I've implemented your swf to png which works excellent.

I do have a problem though. Your application lets you draw on the stage. I want my application to draw on an object, not a square one, but one drawn with the pen tool in Flash (or Photoshop, doesn't really matter as long as it follows my shape (a T-shirt)).

Do you have any idea how I should do this? I already tried with drawing something in a MovieClip in Flash and exporting it for AS (with name canvas) and using:
Code:
canvas.addEventListener(MouseEvent.MOUSE_DOWN, dragLine);
But the result is no different from the original drawing.

Thanks in advance!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #54 (permalink)  
Old 20-04-08, 23:33
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

Quote:
Originally Posted by robalewis View Post
Hi there,
Thanks for such an interesting tutorial. My knowledge of flash is fairly basic, and I have even less experience of actionscript, so I would appreciate basic help, if that's ok!

I would like to add a "delete all" button to this, to reset the picture and start again from scratch. I can't figure out how to do this - I thought if I could set an action to a button then that would do, but I don't seem to be able to as all the code is in actionscript! Could anybody tell me what code I need to put in and where?!

Help appreciated and thank you again for the brilliant tutorials.
I am also looking for help with the deleted all button and a button to change the thickness of the pen. Flep, can you help us please??
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #55 (permalink)  
Old 21-04-08, 07:09
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

Quote:
Originally Posted by robalewis View Post
Hi there,
Thanks for such an interesting tutorial. My knowledge of flash is fairly basic, and I have even less experience of actionscript, so I would appreciate basic help, if that's ok!

I would like to add a "delete all" button to this, to reset the picture and start again from scratch. I can't figure out how to do this - I thought if I could set an action to a button then that would do, but I don't seem to be able to as all the code is in actionscript! Could anybody tell me what code I need to put in and where?!

Help appreciated and thank you again for the brilliant tutorials.
Quote:
Originally Posted by Cazem View Post
I am also looking for help with the deleted all button and a button to change the thickness of the pen. Flep, can you help us please??
Hi there,

1 ) create delete_btn onto the stage
2 ) add at init function:
Code:
delete_btn.addEventListener(MouseEvent.MOUSE_DOWN,setDelDown);
3 ) create the setDelDown function:
Code:
private function setDelDown(evt:MouseEvent):void
		{
			clip.graphics.clear();
			removeChild(clip);
			
			clip=new MovieClip();
			addChild(clip);
			clip.graphics.lineStyle(5,da_color,1);
			clip.graphics.moveTo(mouseX,mouseY);
		}
it's done
__________________

 


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
  #56 (permalink)  
Old 21-04-08, 23:10
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

Flep, Thank u very much for helping. Since I am very new w/ flash, can you attach a .fla with button delete here for download please ? You will make my day if you do so. Again, thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #57 (permalink)  
Old 25-04-08, 14:53
Junior Member
 
Join Date: Mar 2008
Posts: 6
Rep Power: 0
ibreslau is on a distinguished road
Re: SWF to PNG with Actionscript 3.0 - ByteArray class

Hey Flep, first of all, thanks for this component, it's great!

But I do have a problem. I addapted it for my project, so what it's doing is taking a "screenshot" of the stage and saving the .png in a folder. And the thing is - it works fine when tested locally (wamp), but once it's on server, swf won't communicate with php.
When testing on server, I get this error:
Code:
Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: http://www.ibreslau.com/wall/genSliku.php
And HTTPStatusEvent gives me:
Code:
[HTTPStatusEvent type="httpStatus" bubbles=false cancelable=false eventPhase=2 status=0]
I checked URL 100 times already and tried to type full URL or just the name of the script and still flash wouldn't communicate with php script..
Please, if you have any ideas, share it with me, cause I'm loosing my mind. The whole project is finished, this is the only thing that's halting it..
Thanks, cheers from Croatia,

Ivan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #58 (permalink)  
Old 27-04-08, 17:53
Junior Member
 
Join Date: Mar 2008
Posts: 6
Rep Power: 0
ibreslau is on a distinguished road
Re: SWF to PNG with Actionscript 3.0 - ByteArray class

I solved my problem! Although Flep wrote that the php file should be chmod 777, it didn't work for until I switched it to 755. Hope this info is helpful for some of you guys!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #59 (permalink)  
Old 03-05-08, 21:28
Junior Member
 
Join Date: May 2008
Posts: 1
Rep Power: 0
Rossman is on a distinguished road
Re: SWF to PNG with Actionscript 3.0 - ByteArray class

Thanks for this thread, I was curious if it was possible to do this!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #60 (permalink)  
Old 05-05-08, 09:28
Junior Member
 
Join Date: May 2008
Location: CA - USA
Posts: 1
Rep Power: 0
Leopard is on a distinguished road
Re: SWF to PNG with Actionscript 3.0 - ByteArray class

amazing !
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 16:12.

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