Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-01-2004, 10:03 AM
Junior Member
 
Join Date: May 2004
Posts: 7
Default dll usage

how do i use a DLL which can access the parallel port?

the functions are Inp32() and Out32()

int Inp32(int port_address);

void Out32(int port_address, int data_sent);

i'd like to get the status of my parallel port and display them in a textfield in flash...

;D
Reply With Quote
  #2 (permalink)  
Old 05-01-2004, 12:53 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:dll usage

http://www.programmersheaven.com/zon...t610/28409.htm
Reply With Quote
  #3 (permalink)  
Old 05-01-2004, 01:07 PM
Junior Member
 
Join Date: May 2004
Posts: 7
Default Re:dll usage

i know what the parameters are but what i don't know is how to use it in swfkit...please...can anyone help me... ???
Reply With Quote
  #4 (permalink)  
Old 05-02-2004, 08:17 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:dll usage

Code:
var path = getAdditionalFile("inpout32.dll");
Dll.registerFunction(path, "Inp32", "inp", "stdcall", "short", "short");
Dll.registerFunction(path, "Out32", "oup", "stdcall", "void", "short", "short");

oup(0x378, 0xFF);
trace(inp(0x378));
Reply With Quote
  #5 (permalink)  
Old 05-02-2004, 02:41 PM
Junior Member
 
Join Date: May 2004
Posts: 7
Default Re:dll usage

thanks man...that really helped...hmmm, i have another things...for example i have a dynamic textfield in my flash movie which has a variable name of "mytext", how will i get the state of my parallel port and send it to that variable?
Reply With Quote
  #6 (permalink)  
Old 05-02-2004, 03:17 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:dll usage

Code:
var state = inp(0x378);
FlashPlayer.setVariable("mytext", state.toString());
Reply With Quote
  #7 (permalink)  
Old 05-02-2004, 03:22 PM
Junior Member
 
Join Date: May 2004
Posts: 7
Default Re:dll usage

thanks again...this has been a really big help for me... ;D
Reply With Quote
  #8 (permalink)  
Old 05-03-2004, 02:50 AM
Junior Member
 
Join Date: May 2004
Posts: 7
Default Re:dll usage

if i'm gonna use what i got from the parallel port in an "if" condition, how will i do it? will i just use the variable i used in the ffishscript right away in actionscript? 'coz the motion of my object will depend on the data that flash will get from the parallel port...
Reply With Quote
  #9 (permalink)  
Old 05-03-2004, 11:03 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:dll usage

You cannot access a FFish Script variable in Action Script.

In SWFKit
Code:
var state = inp(0x378);
FlashPlayer.setVariable("mytext", state.toString());
FlashPlayer.targetCallLabel("_root", "myframe");
In Action Script for frame "myframe"
Code:
var value = parseInt(mytext);
if (value == 0)
{
    ...
}
Reply With Quote
  #10 (permalink)  
Old 05-03-2004, 11:16 AM
Junior Member
 
Join Date: May 2004
Posts: 7
Default Re:dll usage

WOW!!!

it works!!! thanks alot... ;D

its just too bad that im using only the trial version...

anyway, ill just have to "recompile" it for my project checking...thanks again... ;D
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 06:13 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.