Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-07-2007, 10:19 AM
RK RK is offline
Junior Member
 
Join Date: Apr 2007
Posts: 4
Default dragdrop problem (no such property)

Hello all!
First post - first problem ...

I've coded a dragdrop function, but Flash says that there is no property named "dragdrop". And it doesn't work anyway - so i need your help please

Code:
import SWFKit.*;

Application.dragdrop.enable = true;
Application.dragdrop.onDropFiles = function (files){
   for (i = 0; i < files.length; i++) {
      trace(files[i]);
   }
}
Reply With Quote
  #2 (permalink)  
Old 04-08-2007, 11:56 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:dragdrop problem (no such property)

In actionscript you will have to use the "setEventHanlder" method to handle events of swfkit.

Actionscript 2:
Code:
import SWFKit.*;

// write an event handler
function as_onDropFiles(files)
{
Dialogs.msgBox(files.toString());
}

var dd = new SWFKit.application.dragdrop;
SWFKit.application.dragdrop.enable = true;
// set the "onDropFiles" event handler
// because the "setEventHandler" method of
// the SWFKit wrapper objects is not static,
// we must construct a new instance before call it
dd.setEventHandler("onDropFiles", as_onDropFiles);

stop();
Actionscript 3:
Code:
import SWFKit.*;
import SWFKit.application.*;

// write an event handler
function as_onDropFiles(files)
{
var dlg = new Dialogs;
dlg.msgBox(files.toString());
Dialogs.Release();
}

// SWFKit wrapper classes for as 3 have no static methods,
// we must construct new instances before we can call methods
var dd = new dragdrop;
dd.enable = true;
dd.setEventHandler("onDropFiles", as_onDropFiles);

stop();
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 04: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.