Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-10-2003, 03:02 PM
Member
 
Join Date: Jan 2003
Posts: 54
Send a message via MSN to swfbaz Send a message via Yahoo to swfbaz
Default FlashPlayer.getVariable probelm...

hi

I just checked follwoing code using SWFKit 1.0. it doesnt work. the data is not transffering from flashplayer to FlashPlayer Object it doesnt show the value of the coresponding field but gives the compete path of vaiable "user" in the flashplayer.


var usr = FlashPlayer.getVariable("user");
Dialogs.msgBox(usr, "User info", 0);

any reason?
__________________
SWFBaz Preview [October 2006]
http://www.SWFBaz.com
Reply With Quote
  #2 (permalink)  
Old 01-10-2003, 09:03 PM
Senior Member
 
Join Date: Jan 2001
Posts: 413
Default Re: FlashPlayer.getVariable probelm...

about your ffish script, I made a demo for your reference.

http://www.swfkit.com/download/demo/alert.zip

If you have more question, just post here. ;D ;D ;D
Reply With Quote
  #3 (permalink)  
Old 01-11-2003, 06:15 PM
Member
 
Join Date: Jan 2003
Posts: 54
Send a message via MSN to swfbaz Send a message via Yahoo to swfbaz
Default Re: FlashPlayer.getVariable probelm...

well.. dear for some reason... i want to get all the details about a folder... so how can i do this... i used following script... but it doesnt work out...

function ShowFolderFileList(folderspec)
{
var fso, f, f1, fc, s;
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFolder(folderspec);
fc = new Enumerator(f.Files);
s = "";
for (; !fc.atEnd(); fc.moveNext())
{
s += fc.Item();
s += "<br>";
}
return(s);
}
var fso = new ActiveXObject("Scripting.FileSystemObject");
var a = fso.CreateTextFile("c:\\testfile.html", true);
a.writeLn(ShowFolderFileList("d:\\"));
a.Close;

can you plz elaborate?... i would appriciate if you give me some code or source. thanx
__________________
SWFBaz Preview [October 2006]
http://www.SWFBaz.com
Reply With Quote
  #4 (permalink)  
Old 01-11-2003, 09:30 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: FlashPlayer.getVariable probelm...

Code:
function ShowFolderFileList(folderspec) 
{ 
  var fso, f, f1, fc, s; 
  fso = new ActiveXObject("Scripting.FileSystemObject"); 
  f = fso.GetFolder(folderspec); 
  fc = new Enumerator(f.Files); 
  s = ""; 
  for (; !fc.atEnd(); fc.moveNext()) 
  { 
   s += fc.item().name; 
   s += "<br>"; 
  } 
  return(s); 
} 
var fso = new ActiveXObject("Scripting.FileSystemObject"); 
var a = fso.CreateTextFile("c:\\testfile.html", true); 
a.writeLine(ShowFolderFileList("d:\\")); 
a.Close; 

return true;
1. FFish script is case sensitive, using "fc.item" instead of "fc.Item";
2. "writeLn" is not a method of "TextStream" object, it should be "writeLine".

Then the code works fine.
Reply With Quote
  #5 (permalink)  
Old 01-12-2003, 05:17 AM
Member
 
Join Date: Jan 2003
Posts: 54
Send a message via MSN to swfbaz Send a message via Yahoo to swfbaz
Default Re: FlashPlayer.getVariable probelm...

thanx...

well i am new to SWFKit... i will use this fragment of code in my project.. hopefully i will work out. thanx agian for letting me know about SWFKit sensitivity...

regards

SWFBaz
__________________
SWFBaz Preview [October 2006]
http://www.SWFBaz.com
Reply With Quote
  #6 (permalink)  
Old 01-13-2003, 06:26 PM
Member
 
Join Date: Jan 2003
Posts: 54
Send a message via MSN to swfbaz Send a message via Yahoo to swfbaz
Default ShowFolderFileList

hi topcmm,

thank you for giving me time... well dear this code also doesnt work out... it still not printing the names of files. it says undefined for each file/folder... and it counts # of files than actual.

i would appriciage if you give me an example .skp.. coz its not working if i make it.

regards

SWFBaz
__________________
SWFBaz Preview [October 2006]
http://www.SWFBaz.com
Reply With Quote
  #7 (permalink)  
Old 01-22-2003, 10:07 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: FlashPlayer.getVariable probelm...

The code had been tested before we posted it. It works well. Here is the output:

c:\testfile.html

FILE0026.dat<br>mimi3.IMZ<br>mimi1.IMZ<br>mimi2.IM Z<br>mimi.IMZ<br>mimi4.IMZ<br>daemon323.exe<br>

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 07:42 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.