Using SFTP with Flash/Zinc (wodSFTP / wodSFTP.NET / wodSFTPdll)
Hi all,
I've made an app using Flash and Zinc (www.multidmedia.com). Initially I used Zincs internal ftp engine, but since our customer wants sFTP instead and Zinc supports ActiveX, I thought this might be a good idea.
Got the tip from a guy on the Zinc forum about using wodSFTP for this, and he even sent me some code to get started, but now I'm stuck since I dont know how to use the event methods with Flash/Zinc.
The first thing I'm trying to do is just a simple Connected event , but I can't really figure out the syntax, anyone here got the clue on how to do this?
Below is the code he sent me for the Connect method:
[code]
function connectToServer(){
//Load component
id = 0 ;
xPosition = 0 ;
yPosition = 0 ;
myWidth = 0 ;
myHeight = 0 ;
activexObject = WeOnlyDo.wodSFTP ;
mdm.activex_load(id,xPosition,yPosition,myWidth,myHeight,activexObject);
mdm.activex_doverb_inplaceactivate(id);
//Set Blocking to true, like this, the component works
//quasi synchronous with AS-code
id = 0 ;
propertyName = Blocking ;
propertyType = boolean ;
newpropertyValue = true ;
mdm.activex_setproperty(id,propertyName,propertyType,newpropertyValue);
//Set Login Parameter
id = 0 ;
propertyName = Login ;
propertyType = string ;
newpropertyValue = XXXX ;
mdm.activex_setproperty(id,propertyName,propertyType,newpropertyValue);
//Set Hostname parameter
id = 0 ;
propertyName = Hostname ;
propertyType = string ;
newpropertyValue = myHost.XXX.YYY ;
mdm.activex_setproperty(id,propertyName,propertyType,newpropertyValue);
//Set password
id = 0 ;
propertyName = Password ;
propertyType = string ;
newpropertyValue = XXXXX ;
mdm.activex_setproperty(id,propertyName,propertyType,newpropertyValue);
//Run connect method
id = 0 ;
methodName = Connect ;
numberofArguments = 0 ;
mdm.activex_runmethod(id,methodName,numberofArguments);
};
[/code]
Any help with this would be highly appreciated.
Oh, the Zinc help documents would be found here:
http://www.multidmedia.com/support/learning/help/MDM_ZINCv2.5_UserManual.pdf
TIA
.magnus