Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-19-2004, 09:32 PM
Junior Member
 
Join Date: Oct 2004
Posts: 16
Default capture image

Sorry for my english ...;

I want to capture a image from my swf .... I read this forum and i do :
1/ I put this action to a button in my swf with flashMX2004 :
on (release) {
capture =Image.captureScreen([500, 500, 100, 100]);
capture.save("c:\\test.jpg");
}

2/I import my swf into swfkit and create an .exe

But when i run the exe and click on the button, nothing is created in c:\\ ??

Help me please !
Reply With Quote
  #2 (permalink)  
Old 10-20-2004, 08:41 AM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re:capture image

you cannot write the swfkit scripts directly in flash
you should write them in swfkit.
Then in Flash you should insert a call to the script in SWFkit

ex.:
on (release){
FSCommand("FFish_Run", "CaptureImage");
}
Reply With Quote
  #3 (permalink)  
Old 10-20-2004, 07:30 PM
Junior Member
 
Join Date: Oct 2004
Posts: 16
Default Re:capture image

Thanks ... it's work

Another question :
My clip's name is "background" ... can i save it to the hard disk into a jpg image ? and what is the code for flash and for swfkit ?

Reply With Quote
  #4 (permalink)  
Old 10-21-2004, 02:12 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:capture image

Please use the "captureMovie" method.
Reply With Quote
  #5 (permalink)  
Old 10-21-2004, 04:12 PM
Junior Member
 
Join Date: Oct 2004
Posts: 16
Default Re:capture image

Why ? ...... the command "SaveImage" don't work ????? I buy this product only for use this command ... ???
Reply With Quote
  #6 (permalink)  
Old 10-22-2004, 08:25 AM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re:capture image

It works fine for me

image = Image.captureScreen([500, 500, 100, 100]);
trace(image.width);
trace(image.height);
image.save("c:\\background.jpg");
Reply With Quote
  #7 (permalink)  
Old 10-22-2004, 10:30 AM
Junior Member
 
Join Date: Oct 2004
Posts: 16
Default Re:capture image

Thanks ... but i want that the user can choice himself the folder to save the image .... is it possible ?
Reply With Quote
  #8 (permalink)  
Old 10-22-2004, 11:09 AM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re:capture image

Code:
image = Image.captureScreen([500, 500, 100, 100]);
trace(image.width);
trace(image.height);
var f = "jpg files(*.jpg)|*.jpg|";
var path = Dialogs.fileSave(f,"","");
trace(path);

image.save(path);
Reply With Quote
  #9 (permalink)  
Old 10-22-2004, 10:44 PM
Junior Member
 
Join Date: Oct 2004
Posts: 16
Default Re:capture image

YES ! It's works very well. THANKS!
Reply With Quote
  #10 (permalink)  
Old 10-23-2004, 01:56 PM
Junior Member
 
Join Date: Oct 2004
Posts: 16
Default Re:capture image

Another probleme ..... the script save the entire screen and not : Image.captureScreen([500, 500, 100, 100]);
Reply With Quote
Reply

Was this information helpful?    Yes No



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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 09:53 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.