|
|||
|
I've found a bypass way to solve the problem,
using swfkit's Trigger component,in it's envet handler to call Flash function. however,I still want to know that if there is any brief method to do this? thanks! |
|
|||
|
Hi,
One method I've used it to add blank frame at the start of the Flash movieclip with a "stop" on it. Then have SWFKit play that movieclip when appropriate. Not ideal, but you might want to give it a go. Cheers, G. |
|
|||
|
look that's ;D
Code:
var SKCall = new Object();
SKCall.run=undefined;
SKCall.callFonction = function(run, old, fdata)
{
var param = new Array();
param = fdata.slice();
param.shift()
trace(fdata);
trace(param);
_root[fdata[0]].apply(null, param);
};
SKCall.watch("run", SKCall.callFonction);
it's an Array var MyArray=new Array("callFonction","param1","param2",...,"paramN "); Voila!! Kado ;D French Touch |
|
|||
|
I MAKE A BIG MISTAKE!!!!!! :-[
so I repair..... ;) Actionscript: Code:
var SKCall = new Object();
SKCall.val = "";
SKCall.Run = undefined;
SKCall.callFonction = function(prop, old, fdata)
{
***var param = _root.SKCall.val;
***var paramArray = new Array();
***paramArray = param.split(",");
***var fonc = paramArray[0];
***paramArray.shift();
***_root[fonc].apply(null, paramArray);
};
SKCall.watch("Run", SKCall.callFonction);
Code:
var SKCall=new Object;
SKCall.val=new Array("mafonction","ee",0xFF,"rr","tt");
SKCall.Run="go";
FlashPlayer.putObject("_root.SKCall",SKCall);
no "_root" for the name of the fonction and no......NO ", " on the arguments..... split function won't work.... it's work this time See ya Kado ;D french retouch |
|
|||
|
Last version before the bed..... you can use the "," character...
![]() you just have to call the FlashCall function.... FlashCall (function,param1,param2,....?paramN); Actionscript Code:
var SKCall = new Object();
SKCall.val = "";
SKCall.Run = undefined;
SKCall.callFonction = function(prop, old, fdata)
{
var param = _root.SKCall.val;
var paramArray = new Array();
paramArray = param.split(String.fromCharCode(219));
var fonc = paramArray[0];
paramArray.shift();
_root[fonc].apply(null, paramArray);
};
SKCall.watch("Run", SKCall.callFonction);
Code:
function FlashCall ()
{
var param= new Array();
for (var n=0;n<arguments.length;n++)
{
param.push(arguments[n]);
}
var stringParam =param.join(String.fromCharCode(219))
var SKCall=new Object;
SKCall.val=stringParam;
SKCall.Run="go";
FlashPlayer.putObject("_root.SKCall",SKCall);
}
;D ;D ;D ;D ;D Kado French touch http://adonnoh.free.fr |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|