Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-16-2004, 03:36 PM
Junior Member
 
Join Date: Feb 2004
Posts: 7
Default Passing variables from FFish to Actionscript

How can I pass variables from FFish to Actionscript so that I can use them in my Flash Movie? My problem is that I use the file.exists command to check whether a certain file exists or not. Depending on that I would like to make a button in my Flash Movie visible/not visible. So I have to send the true/false statement of the file.exists command to Actionscript.
Reply With Quote
  #2 (permalink)  
Old 03-17-2004, 07:28 AM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re:Passing variables from FFish to Actionscript

I can think of 2 ways

1.
I should use the FlashPlayer.setVariable(name, value) command.
But previously when I wanted to transfer a Number variable, it didn't work.
I had to convert the variable to a string variable.
So maybe you'll have to do that too.

So i should do something like this:
Code:
// check if file exists
var1 = File.exists("c:\\test.txt"))
// convert var1 to a string
varstring = new String(var1)
// set the status var of the root of  my flashplayer to the varstring
FlashPlayer.setVariable("_root.status", varstring)
2.
In flash you can make an extra frame which contains the code to make your button visible or invisible.
then from whitin ffish you can call the actions of that frame according to the state of the file.exists
Code:
if (File.exists("c:\\test.txt"))){
FlashPlayer.targetCallLabel("_root","actionframe")
}
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:55 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.