Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-27-2004, 09:44 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,000
Default Serial Port communication using SWFKit

Now you can use the CPortX activeX control in SWFKit or SWFKit Pro to access serial ports.Download

The query modem sample

Note:

You must use the CPortX in SWFKit Pro (SWFKit) ver 2.2 or later. For SWFKit 2.2 isn't released yet, please get a special edition of SWFKit Pro that can use the CPortX ActiveX object at

http://www.swfkit.com/download/swfkit.exe
Reply With Quote
  #2 (permalink)  
Old 10-09-2004, 07:56 PM
bob bob is offline
Junior Member
 
Join Date: Nov 2003
Posts: 6
Default Re:Serial Port communication using SWFKit

Hi topcmm,

This is great stuff. Everything installed ok.

How do I send/receive a binary value out the comm port?

I used to use StringStream.put but writestr does not have a put method.

Thanks,
Bob
Reply With Quote
  #3 (permalink)  
Old 10-12-2004, 06:21 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,000
Default Re:Serial Port communication using SWFKit

E.g. The "querymodem" script in the "querymodem" sample, the last line is
Code:
commx.writeStr(command);
You can change it to
Code:
var stream = new StringStream;
stream.write(command);
commx.write(stream);
The "stream" object contains the binary data and is sent by the "write" method.

Similarly, in the "initialize" script, the "onRXChar" event handler is
Code:
var str = this.readStr(count);
FlashPlayer.setVariable("response.text", str);
trace(str);
It can be changed to
Code:
var stream = this.read(count);
FlashPlayer.setVariable("response.text", stream.toString());
trace(stream);
The "read" method returns a stringstream object contains binary data.
Reply With Quote
  #4 (permalink)  
Old 10-20-2004, 02:44 AM
bob bob is offline
Junior Member
 
Join Date: Nov 2003
Posts: 6
Default Re:Serial Port communication using SWFKit

Thanks TopCMM,

Works great now.

Bob
Reply With Quote
  #5 (permalink)  
Old 02-11-2006, 08:39 AM
Junior Member
 
Join Date: Feb 2006
Posts: 12
Default Re:Serial Port communication using SWFKit

hi

i m also trying to use the serial port in macromedia flash documents.

i downloaded and opened the source file for query modem frm the sample.

I would like to knw the procedure of going frm qm.fla file to the final product qm.exe that actually works.

I downloaded and installed swkit pro2 and cportx activex component.

this is what i tried.

after installing both...i opened the .fla file in flash 8 and published the .swf
i took this .swf and tried to add it to 'movies' in swfkit pro2 and used 'build' to get a '.exe' file.
however the .exe file or the swf does not have any listing under the dropdown of PORT ....'it is blank....

while in the pre-compiled downloaded version it gives me a drop down with 'Port1' ....

please tell me the exact procedure.....
do i need to use the cportx ...if so how..

thanks
Reply With Quote
  #6 (permalink)  
Old 02-12-2006, 07:54 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,000
Default Re:Serial Port communication using SWFKit

It won't work with only the swf file, you would have to write some codes to call the CPortX component. Please try the sample, it shows how to do this (just open the .skp file with swfkit).
Reply With Quote
  #7 (permalink)  
Old 02-14-2006, 08:08 PM
Junior Member
 
Join Date: Feb 2006
Posts: 12
Default Re:Serial Port communication using SWFKit

hi again,

thanks for the reply,
I did get it to work and was able to successfully make
a program to talk to the serial port and get response.

I have one question however, I tested the program on windows XP, but I will be requiring to run the program on windows 98.

Will the same program also work on windows 98.
Does cportx work on both win XP and win 98.

I tried to go on the download page and see if it mentions which operating systems cportx will work on but I did not see it.

thanks for all your support.
Reply With Quote
  #8 (permalink)  
Old 02-15-2006, 11:57 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,000
Default Re:Serial Port communication using SWFKit

Yes, it works on both 9x and NT, 2000, XP.
Reply With Quote
  #9 (permalink)  
Old 02-16-2006, 08:55 AM
Junior Member
 
Join Date: Feb 2006
Posts: 12
Default Re:Serial Port communication using SWFKit

hi

unfortunately i was not able to run the sample downloaded program
qm.exe (query modem sample program) on the windows 98.
First it said requires cportx....so i installed that...but after that when i ran the qm.exe again it
was giving some error suggesting that the .exe is corrupt and reinstall the program...(although the same file works on windows xp 100% not corrupt).

I am doing a university project and have bought a slow speed laptop (233 mhz) with touch screen and running windows 98.

I spent all night yesterday and install windows XP on it. Now although the program works fine on winxp, (the sample and therefore mine also).... but I do not have drivers for the touch screen.

I was hopeful that the program will work on windows 98 and thus I would have been able to use the touch screen/ And there does not seem to be any kind of support for winxp drivers from the manufacturers or any forums/groups.

thanks anyway...
atleast the program works on win xp
now i can only hope i find some generic drivers and get the touch screen to work.

Reply With Quote
  #10 (permalink)  
Old 02-16-2006, 03:28 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,000
Default Re:Serial Port communication using SWFKit

Please try to rebuild the exe file on Win98, it should work. The qm.exe in the sample seems to be corrupted, we will try to fix it. Sorry for the inconvenient.
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 08:00 AM.


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