Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-22-2009, 07:09 AM
Junior Member
 
Join Date: Apr 2009
Posts: 2
Default Quick Question about Using SWFKit in Flex Builder

I can't get SWFKit to work in FlexBuilder 3 with Flash Player 9..

I followed these steps and added the SWF Kit wrapper classes to my Flex Build Path
SWF to EXE- Using SWFKit Series 3 Objects in Flex Builder 2

When I try a simple Flex application, it gives me a compile error because it doesn't recognize the Shell class:
1061: Call to a possibly undefined method runAndWait through a reference with static type Class.

How do I fix this?? Thanks sooo much!

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Button x="180" y="286" label="Button" id="MyBtn" click="OnClickMyBtn()"/>
<mx:Script>
<![CDATA[
import SWFKit.*;
import SWFKit.Shell;
import SWFKit.Application.*;

private function OnClickMyBtn():void
{
Shell.runAndWait("notepad.exe");

}

]]>
</mx:Script>
</mx:Application>
Reply With Quote
  #2 (permalink)  
Old 04-22-2009, 04:09 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default

First, you must add the swfkit wrapper classes into the source path of your flex project, as shown in the attached image.

Second, you must create an instance for the Shell object. Please check the attached sample.
Attached Images
File Type: gif flexshell.gif (21.5 KB, 10 views)
Attached Files
File Type: zip FlexShell.zip (268.4 KB, 13 views)
Reply With Quote
  #3 (permalink)  
Old 04-26-2009, 11:24 PM
Junior Member
 
Join Date: Apr 2009
Posts: 2
Default

Hmm I tried following your instructions and loading the sample, but nothing showed up when I clicked "Click Me." I'm using Flash Player 10 now, does that matter?

If I click on the FlexShell.swf file, I receive this error. Any ideas?

Error: Error #2067: The ExternalInterface is not available in this container. ExternalInterface requires Internet Explorer ActiveX, Firefox, Mozilla 1.7.5 and greater, or other browsers that support NPRuntime.
at Error$/throwError()
at flash.external::ExternalInterface$/call()
at SWFKit::BaseObj/fnBaseObjByName()[C:\Program Files\SWFKit Pro 3\Classes 3\SWFKit\BaseObj.as:10]
at SWFKit::Shell()[C:\Program Files\SWFKit Pro 3\Classes 3\SWFKit\Shell.as:6]
at FlexShell()[C:\Users\Kat\Documents\Flex Builder 3\FlexShell\src\FlexShell.mxml:9]
at _FlexShell_mx_managers_SystemManager/create()
at mx.managers::SystemManager/initializeTopLevelWindow()[C:\autobuild\3.2.0\frameworks\projects\framework\s rc\mx\managers\SystemManager.as:3188]
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::docFrameHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\s rc\mx\managers\SystemManager.as:3064]
at mx.managers::SystemManager/docFrameListener()[C:\autobuild\3.2.0\frameworks\projects\framework\s rc\mx\managers\SystemManager.as:2916]
Reply With Quote
  #4 (permalink)  
Old 04-29-2009, 11:42 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default

You must first compile the flexshell.skp project in the bin-debug directory to an exe file with swfkit.
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 02:26 PM.


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.