Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-07-2009, 02:23 PM
RJS RJS is offline
Member
 
Join Date: Sep 2003
Posts: 56
Default What is the best way to access custom FS object methods from Actionscript

I have a FFishScript custom object like this

In FFishScript:
function customObject () {
this.property = 123;
this.getProperty = function() {return(this.property)}
}

In FFishScript:
var myObject = new customObject();
trace (myObject.getProperty()); // Returns 123

In AS:
(I've tried -)
import SWFKit.*
var g = new Global();
trace (g.myObject.getProperty()); // undefined

Question. How best to synchronously access methods like this from Actionscript?

Thanks.
Reply With Quote
  #2 (permalink)  
Old 06-08-2009, 07:52 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default

Any global method in ffish script can be called with the external interface in as. So you need to first write a method in ffish script to return the custom object, and then call the method in as:

Code:
var customobj = ExternalInterface.call("createCustomObject", params);
where "createCustomObject" is a global method in ffish script.
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 05:47 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.