Flash READ What Files Exist Within A Directory ...Without USING SERVER SIDE SCRIPTING
Hi,
How can Flash read what files exists in a sub directory on my server without using server side scripting becasue this is going to be an online/offline product.
For example:
I need the Flash application to read what files are in a sub folder within the main folder where the swf sits on my server:
For example:
www.multimediaprogrammer.com/mainapp/pics/
Contains
1.jpg
2.jpg
I want Flash to tell me files 1.jpg and 2.jpg are in the pics folder?
MANY THANKS IN ADVANCE FOR THE HELP!!!!!
Debra
FlashKit > Flash Help > Flash ActionScript
Posted on: 04-20-2004, 04:18 PM
View Complete Forum Thread with Replies
Sponsored Links:
Read Server Side File From Client Side
Hello all,
i m using Influxis server.I have used these lines of code to create text file at server side:->
var myFile = new File("log_file.txt");
if(myFile.exists) myFile.open("text", "append");
else myFile.open("text", "create");
myFile.writeln("Hello world!");
above code is working fine but i want to download this "log_file.txt" file at client side.How can i do this?
Plese help me on this issue
View Replies !
View Related
Read Server Side File From Clent Side
Hello all,
i m using Influxis server.I have used these lines of code to create text file at server side:->
var myFile = new File("log_file.txt");
if(myFile.exists) myFile.open("text", "append");
else myFile.open("text", "create");
myFile.writeln("Hello world!");
above code is working fine but i want to download this "log_file.txt" file at client side.How can i do this?
Plese help me on this issue
View Replies !
View Related
Read Server Side File From Clent Side
Hello all,
i m using Influxis server.I have used these lines of code to create text file at server side:->
var myFile = new File("log_file.txt");
if(myFile.exists) myFile.open("text", "append");
else myFile.open("text", "create");
myFile.writeln("Hello world!");
above code is working fine but i want to download this "log_file.txt" file at client side.How can i do this?
Plese help me on this issue
View Replies !
View Related
Read Server Side File From Clent Side
Hello all,
i m using Influxis server.I have used these lines of code to create text file at server side:->
var myFile = new File("log_file.txt");
if(myFile.exists) myFile.open("text", "append");
else myFile.open("text", "create");
myFile.writeln("Hello world!");
above code is working fine but i want to download this "log_file.txt" file at client side.How can i do this?
Plese help me on this issue
View Replies !
View Related
Can Flash Read The Number Of Files In A Directory?
I am currently working on a project and need to get the total number of files in a directory.
So for example, when the flash program first starts up, and if there are 5 files in the directory, it scans the number of files and returns the value 5 into a variable that I can manipulate.
Is Flash even able to do this? I've looked around, and I can't seem to find an answer.
edit: I don't know why I used the code tag....I guess it should be the question tag.
View Replies !
View Related
Does Anyone Here Know Anything About Server Side Scripting?
I've never received an answer here on server side scripting i really need a forum where people are exsperienced with both client and server side scripts can somebody give me a link and point me in the right direction....my current problem is i cannot trace and messages to the output panel using application.onAppStart=function(){ trace "this traced when the app started"}
View Replies !
View Related
Server-side Scripting
background:
running an asp.net webserver
hosted provider does not have flash remoting installed
what's the best way to send an XML document through flash? i've tried creating an vb.net webservice but trying to process the my xml within the xml got tricky for me. i've tried .send and .sendAndLoad, which works, but they both redirect or open new browser windows which is undesirable.
help?
-ty
View Replies !
View Related
Server Side Scripting Help(php) And Actionscript
I am relativly new to pHp, not so much to actionscript.
With that said, I need is some asistance in seting up a dynamic gallery for my portfolio section of my website. So any help would be most appreciated.
To better understand a quick overview of the actionscript and ultimate intentions is neseccary before getting to the root of the promblem.
actionscript:
Code:
//portfolio images
thumbs=[" ","face.jpg","poster.jpg","cards.jpg","4.jpg"]
m = 20 // relative displacement
r = 4 // number of objects per row
count=16 // amount of objects total
h = r+(r*.25)
for (i=1; i<=count; i++) {
if(i >=(r+1)){xCord = (m*(i-((h+(r*2))-i)))+(Stage.width/2)}
if(i<(r+1)){xCord = (m*(i-(h-i)))+(Stage.width/2)}
if(i>=(r*2+1)){xCord = (m*(i-((h+((r*2)*2))-i)))+(Stage.width/2)}
if(i>=(r*3+1)){xCord = (m*(i-(((h+((r*2)*2))+(r*2))-i)))+(Stage.width/2)}
if(i>=(r*4+1)){xCord = (m*(i-(((h+((r*2)*2))+((r*2)*2))-i)))+(Stage.width/2)}
if(i<(r+1)){yCord = (Stage.height/2)-140}
if(i>=(r+1)){yCord = (Stage.height/2) - 100}
if(i>=(r*2+1)){yCord = (Stage.height/2)-60}
if(i>=(r*3+1)){yCord = (Stage.height/2)-20}
if(i>=(r*4+1)){yCord = (Stage.height/2)+20}
if(i>=(r*5+1)){yCord = (Stage.height/2)+60}
if(i>=(r*6+1)){yCord = (Stage.height/2)+100}
if(i>=(r*7+1)){yCord = (Stage.height/2)+140}
mybox.duplicateMovieClip ("box"+i, i);
_root["box"+i].number=i;
_root["box"+i].gotoAndStop(i+1);
_root["box"+i]._x = xcord;
_root["box"+i]._y = ycord;
contain.duplicateMovieClip("gallery"+i, i+count);
_root["gallery"+i].loadMovie(thumbs[i]);
_root["gallery"+i]._x= ((Stage.width/2)-30);
_root["gallery"+i]._y= (Stage.height/2);
_root["gallery"+i]._xscale = 15;
_root["gallery"+i]._yscale = 15;
_root["gallery"+i]._alpha = 0;
}
for(var i=0;i<=count;i++){
_root.attachMovie("mybox", "box"+i, (i+(count+1)));
_root["box"+i].thei=i;
_root["box"+i].onRollOver=function(){
_root["gallery"+(this.thei)]._alpha = 100;
}
_root["box"+i].onRollOut=function(){
_root["gallery"+(this.thei)]._alpha = 0;
}
}
Basically this duplicates a a movieclip called mybox and sets them up on the stage.
Then It duplicates contain and sets up all the images on the stage with a transparentcy of 0.
Then when you rollover any given box the image which shows up is dependent on the i incerment or thei.
Non of that is really important though.. since, it all works.
Now I am hoping to bring to the next level.
This is more of less the concern with the actionscript:
Code:
//portfolio images
thumbs=[" ","face.jpg","poster.jpg","cards.jpg","4.jpg"]
I have it set up currently so that each image I add it works (no more modification is nessecary to the rest of the code... since it is all based on a proportionate variables.)
What I need now is a way To read a directory in which the images are in and output the names.
Then pull out those names in flash.
So Instead of needing to write anything more in actionscript I can just add images to that folder and everything works in flash.
this is the code I am looking to use as a foundation for the reading directory.
Code:
#!/usr/bin/perl
$dirtoget="/home/yourname/www/images/";
opendir(IMD, $dirtoget) || die("Cannot open directory");
@thefiles= readdir(IMD);
closedir(IMD);
print "Content-type: text/html
";
print "<HTML><BODY>";
foreach $f (@thefiles)
{
unless ( ($f eq ".") || ($f eq "..") )
{
print "$f<BR>";
}
}
print "</BODY></HTML>";
However, I have very minimal experience if any with php but, would highly like to have this run totally dynamically.
So any help would be most gratefull.
Especially from some pHp and actionscript gurus.
thanks
View Replies !
View Related
Getting LoadVariables To Read A Server Side Script
Ive created a simple ticker in flash, with the help of the tutorials here, which you can view at:
http://www.tns.co.uk/dev/t/inc/ticker.swf
and Im trying to get it to read an ASP file which takes the headlines from the latest 5 press releases - the problem is it wont load it somehow... normal text files are fine, but i thought flash could read an ASP page?
the ASP file is here:
http://www.tns.co.uk/dev/t/inc/ticker.asp
is there anyway I can get the ticker.swf to read the ticker.asp??
View Replies !
View Related
Need FMS Guru To Read Substitution.xml From Server Side Apps
I know how to read XML file from HTTP using XML.load(url), but there are some config node i need to read from substitution.xml from conf folder. Seems like XML.load doesn't allow accessing Physical path from "D:Program FilesAdobeFlash Media Server 3conf" - I am new in FMS Development, I dont know how to access them from Server side. Help pls.
View Replies !
View Related
Sending Automatic E-mail, Server Side Scripting
hey,
I have made some simple forms. currently i have this code in the "send" button:
Code:
on (release) {
getURL("mailto:indiapavilion@yahoo.com");
}
But, does any1 know how i can make it so that when the user clicks the "send" button, then the information in the forms is automatically sent to a given e-mail address?
The code i have up above.....it only opens up the default e-mail application, which i don't need.
Baljinder
View Replies !
View Related
Read Name Of Files From Directory
hi:
i´m working in a project that need to use the names of the files to load .JPG into a MC, if in the directory are 5 files, the movie loads this 5 files, but if i erase 2, then the movie only loads 3, my principal question is how can i acces the names of the files in a directory?
tnx
Plutarcomp
View Replies !
View Related
Read All Mp3 Files In A Specified Directory And Then Play Them
I have a mp3 player that plays 3 different mp3 files and it works good enough I suppose, but what I would like to do now is make it read all mp3 files in a specified directory and then play them. That way I won't have to specify individual filenames and locations in my code.
So what I need to know is how to read the all the mp3 filenames in my target directory to an array so I can include them in my playlist.
View Replies !
View Related
FMS Server Side ASC Files
Hello there I am having some trouble understanding the use of the server side scripts on FMS.
What I am trying to do is make a very basic isometric multiplayer game where you kill some monsters that are on screen (mmo style)
My basic code flow is
1> when starting the application create a shared object to hold information on monsters
2> Allow the player to connect
Now here all of my problems start.
ActionScript Code:
application.onAppStart = function(){
trace("Application Started");
amountMonsters = 5
//this is the object used to hold the monsters
monsters = SharedObject.get("monsters", false)
//I am making it into an array because of course there is more than 1 monster
monsters.data.monsters = new Array();
for (i=0; i<amountMonsters; i++) {
//I am pushing a class called Poring.as to the array and sending it some info when it is created
var por = new Poring(i);
monsters.data.monsters.push(por);
}
players = SharedObject.get("playersOn",false)
players.data.playersOn = new Array()
};
The poring as file contains this
ActionScript Code:
class Poring{
var myNum:Number = 0
var intervalId:Number
var tileX:Number
var tileY:Number
var tileTarget:String
function Poring(poringNum){ // initial poring setUp
myNum = poringNum
tileX = random(2)+1
tileY = random(2)+1
tileTarget = "tile"+tileX+"-"+tileY
trace(tileTarget)
intervalId = setInterval(this, "moveMe", 6000);
}
function moveMe(){
tileX = random(2)+1
tileY = random(2)+1
tileTarget = "tile"+tileX+"-"+tileY
}
}
In the flash file I call the shared object using getRemote and just try to trace it with
ActionScript Code:
monsterObject = SharedObject.getRemote("monsters", netConn.uri, false);
monsterObject.connect(netConn);
monsterObject.onSync = function(list){
trace("monsterSync")
trace(monsterObject.data.monsters)
}
What traces is undefined =/
I am at a loss as to what to do here I am sure I must be either using the wrong syntax or doing things in the wrong order.
Any help is greatly appreciated,
Simon
View Replies !
View Related
Editing Workgroup Flash Documents (directory Doesn't Exist)
How to solve.
We get a mock flash ad....
We go to edit the images.... either from the timeline or library...
Or double clicking or trying to select "Edit with Fireworks.."
The ending result is always the same...
"The file C:documentsandsettings......" doesn't exist.
which is the other, originating directory..not ours.
You see, the directory seems to be linking to the 1st creative persons computer and not our directory when we try to edit an image.
and everything we try, except swap image, seems to give us an invalid directory.
The only work around so far would be to have them send us the original *PNG files (fireworks) and edit them and then swap?
Surely we must be doing something wrong.
Please advise.
Thanks
View Replies !
View Related
Creating New .TXT Files Server-side
Not sure exactly where this should have been posted but never mind :P
What my problem is this:
I have a dynamic login;
code: // Assume AAA is the username and BBB is the password.
// Write password=BBB in AAA.txt and save it.
// Create two textFields and name them as username and pswd.
// Write the following code to the first frame:
username = "";
pswd = "";
stop ();
// Then, write the following to the second frame:
login = username +".txt";
loadVariablesNum (login, 0);
// Create two scenes for the denied and accepted users.
// Let's say scene1 for the denied, scene2 for the accepted users.
// Code for the third frame is:
if (pswd ne password) {
gotoAndPlay ("scene1", 1);
} else if (pswd eq password) {
gotoAndPlay ("scene2", 1);
}
stop ();
// Code for the enter button (with a keyboard event) is:
on (release, keyPress "<Enter>") {
if (username add pswd eq "" add "") {
gotoAndStop ("scene2", 1);
} else {
gotoAndPlay ("scene1", 1);
}
}
Think that works.
What I'm looking to do though is create "new users". This means creating new .TXT files on my server. How do I do this? I have no idea where to start.
Regards.
View Replies !
View Related
[F8] Loading XML Files Server Side
Currently I am using this code in an actionscript file
Code:
xml.load("file.xml");
I want to make it so that I can load the XML file from my embed code instead of having it in my actionscript file.
Basically I need something like
Code:
<embed src=file.swf xml-file=file.xml></embed>
- file.xml would be loaded the same way as it would be if i was using
Code:
xml.load("file.xml");
Is this possible?
The reason I need this is because I am setting up a user system where each user would be loading a different XML file.
View Replies !
View Related
Find Files Without Server-side?
Is there a way to find out how many files there are in a folder, if they´re named like swf1 swf2 swf3 and so on...?
I was thinking something like:
Code:
i=1;
while (swf[i] != undefined or Nan or whatever){
arr_swfs += swf[i];
i++;
}
But I cant figure out a way to do this (except maybe by loading them, but that is not what I want to do)
Is this possible at all, or do I have to run a server-side script to trace them files?
View Replies !
View Related
Read + Edit Txt Files From Server Using PHP
Greetings fellow flashers,
I want to know if somebody can help me with a php script that can make users edit txt files from the server when online.
I am not good at programming, so is there somebody who can help me with a simple PHP script?
Kind regards from the Netherlands,
Blackdoor
View Replies !
View Related
LoadVars With Server Side ActionScript (Flash Com Server)
I'm making a simple login application. I want to send a username/password while connecting to FCS, and have the SSAS of main.asc connect to a PHP document that will lookup the username/pass and make the necessary checks for the information in a mySQL database.
I'm trying to use the LoadVars() object, maybe you can't do this with SSAS? Or maybe i need to include some other actionscript file (I know when you use components you have to specify load("components.asc"); at the top of the main.asc file --- i'm hoping it's something that easy )
This is my first FCS app, I've done a lot of research but this one's sort of stumping me. I keep getting an error that looks like this:
/opt/macromedia/fcs/applications/my_app/main.asc: line 9: ReferenceError: LoadVars is not defined
Here is my code for main.asc:
ActionScript Code:
application.onAppStart = function(){ this.userCount = 0; this.users = [];}application.onConnect = function(thisClient, username, password){ thisClient.username = username; //authentication functions var my_lv:LoadVars = new LoadVars; //line 9 where error happens my_lv.load("http://10.10.1.200/_websites/quickconnect/verify.php?username="+escape(username)+"&password="+escape(password)); my_lv.onLoad = function(success){ if(success == true){ thisClient.username = my_lv.username; thisClient.email = my_lv.email; thisClient.firstname = my_lv.firstname; thisClient.lastname = my_lv.lastname; thisClient.usertype = my_lv.usertype; this.users[this.userCount] = thisClient; this.userCount++; } } //if login is okay //add user to users list this.acceptConnection(thisClient); }
View Replies !
View Related
LoadVars With Server Side ActionScript (Flash Com Server)
I'm making a simple login application. I want to send a username/password while connecting to FCS, and have the SSAS of main.asc connect to a PHP document that will lookup the username/pass and make the necessary checks for the information in a mySQL database.
I'm trying to use the LoadVars() object, maybe you can't do this with SSAS? Or maybe i need to include some other actionscript file (I know when you use components you have to specify load("components.asc"); at the top of the main.asc file --- i'm hoping it's something that easy )
This is my first FCS app, I've done a lot of research but this one's sort of stumping me. I keep getting an error that looks like this:
/opt/macromedia/fcs/applications/my_app/main.asc: line 9: ReferenceError: LoadVars is not defined
Here is my code for main.asc:
ActionScript Code:
application.onAppStart = function(){ this.userCount = 0; this.users = [];}application.onConnect = function(thisClient, username, password){ thisClient.username = username; //authentication functions var my_lv:LoadVars = new LoadVars; //line 9 where error happens my_lv.load("http://10.10.1.200/_websites/quickconnect/verify.php?username="+escape(username)+"&password="+escape(password)); my_lv.onLoad = function(success){ if(success == true){ thisClient.username = my_lv.username; thisClient.email = my_lv.email; thisClient.firstname = my_lv.firstname; thisClient.lastname = my_lv.lastname; thisClient.usertype = my_lv.usertype; this.users[this.userCount] = thisClient; this.userCount++; } } //if login is okay //add user to users list this.acceptConnection(thisClient); }
View Replies !
View Related
Flash Media Server, Does It Need Server Side?
Ive been importing my videos and selecting flash media server, which I thought was streaming. However its always worked fine and I dont understand what these extra files are that are needed on the server? Are my videos just converting to progressive video? Because I never knew they needed special files yet they have always worked or so it seems!
View Replies !
View Related
READ Directory Structure From Flash
I am trying to figure out how to
read a directory structure from an (index)flash file
and dynamically present links to those directories (index)
named after the folders...ultimately I would like to have
some control over the presentation of the links as in being
spaced by certain pixel dimensions...x and y.....
any help here would be great ...even a shout in the right
direction of study...
PHP maybe?????????
XML perhaps.....or just html???
I have been getting a lot of help from these forums and
I am currently reading about 5 books trying to get something to
give back...thanks in advance Paul S. Mungar
View Replies !
View Related
Can AS3 Or XML "read" Files From A Directory?
What I want is for flash to grab files from a directory without knowing what files are there. I dont think it's possible with AS3 but I'm not too sure about XML, and if I can get it into a xml file, then i can ccess it from as3.
The concept might be confusing so an example would be if I had a mp3 player and I wanted to play files from a certain directory but not know what files were in that directory. I would assume XML can "scan" folders for files with a specified exstention and store that information in an array of somesort.
View Replies !
View Related
SSAS - Call A Client Side Function From Server Side
Hi all!
I have a problem...
I'm working with FMS and AS3, and i need to call a client side function from a 'server side action script' code and pass through a parameter to the client side function.
To specify the problem:
The application im trying to create is a video communication tool.
The user connects to the server, on the server side the application.onConnect() function runs.
The client gets an id on the server side and i have to pass this 'clientId' through to a client side function, (it needs the clientId parameter) which is sorting the streams.(like this function setStream(clientId){}) The 'clientId' is needed to identify the stream that is captured by the users camera.
Have to visualize 5 streams (5 user connects and sends streams) on each application instance, and i have to know which stream belongs to which user.
For example: I dont want to visualize John to his stream, instead of the other four streams.
I tried with client.call() but it didnt work.
Could anybody please help me, about how to pass variable data and call a client side function from the server side, or how to solve this problem?
Thx a lot!
Malk
View Replies !
View Related
Flash, And XML In Server Side
hey guys, I took a fla from the xperiment forum here, and I tryed placing it in a hosting space, but it those not work, it works in my machine locally, but not in the server space.
the swf shows one image, and one thumb, but it those not show the rest
Thanks dudes!!
link: http://anardodesign.com/radio/photoviewer.swf
View Replies !
View Related
Flash And Server Side?
I am an ASP.NET programmer... getting ready to move to ASP.NET 2.0. I want to use Flash 8 as my UI front end for my next web app.
What do I need in order to have the Flash UI communicate with my ASP.NET backend? If there is no specific product, what is the best, most documented technique for moving data between Flash and the backend?
Thanks!
View Replies !
View Related
Container Error, Loading External SWF Still Exist... Please Read
hey guys... ive been cranking for over 10+ hours, and thought i figured the whole thing out but i just ran across a nasty error.
I have 4 flash files. I want to externally load 3 other files to completely change the layout.
Now, the main file has a container located on top of the layout that I have created for the 1st layout.
When I click a button to go to the next external swf (layout), it loads up the next swf file, which takes up the whole layout; basically changes the entire layout, even covering the previous buttons. Exactly what I want it to do.
Now the thing that happens is, once the new layout is up and running perfectly, the buttons from the previous file, are still clickable. You can't see them at all, but the buttons are still clickable when you move the mouse over where they last where on the previous layout.
Examples of code (actionscript) in the Main File on the button
Quote:
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "test01";
container.loadMovie("test01.swf");
} else if (_root.currMovie != "test01") {
if (container._currentframe>= container.midframe) {
_root.currMovie = "test01";
container.play();
}
}
}
you can also use this code as well and it still does the same thing...
Quote:
on(release){
container.loadMovie("test01.swf");
}
I don't know if I'm doing something wrong, or just not adding the correct code. Please help
View Replies !
View Related
Flash Clock At Server Side
Hi All,
I have put the Flash Clock on my server. my intention was to show the WORLD TIME ZONE after clicking on different regions.
But i found that when the swf is shown in the browser, it takes the time of CLIENT not of the SERVER.
Because of this i am not able to generate the world clock.
Is anybody there who can help me ?
Saiprasad
View Replies !
View Related
Server Side Flash Detection
Hi,
I try to detect the Flash plugin in user borwsers with a PHP script. I found a tutorial that recommended reading the global $_SERVER['HTTP_ACCEPT']. it should contain the string "shockwave-flash" if the plugin is installed.
The problem is that Mozilla, though is supposed to support it does not. MSIE does have the string, and i didin't test any other browser.
Does anyone have a clue what can be done, or another way to detect the plugin at the server side?
Thanks
View Replies !
View Related
[as2] Problem On Side Server With Flash
hello there,
I have a AS code that work with php that need to give me the view and click on my ad
I upload my flash advertisements, on customer server, and put the php code on my server,
When I run the flash and the php file on the same server it's works great,
the problems came when i put my ad on the customer server and leave my php scripit on my server....
somone know how to solve the problem this?
I have to keep the PHP file on my server
View Replies !
View Related
Server Side Flash Detection
Hi,
I try to detect the Flash plugin in user borwsers with a PHP script. I found a tutorial that recommended reading the global $_SERVER['HTTP_ACCEPT']. it should contain the string "shockwave-flash" if the plugin is installed.
The problem is that Mozilla, though is supposed to support it does not. MSIE does have the string, and i didin't test any other browser.
Does anyone have a clue what can be done, or another way to detect the plugin at the server side?
Thanks
View Replies !
View Related
Flash Client-side Web Server
Hey There.
I've never used Flash, but I'm investigating some ideas to do with image processing on the client side.
Basically we're implementing a website using AJAX. We're doing a lot of image stretches. Currently, we're using Javascript (well DOM) to do the stretch, but it looks like crap. There's NO antialiasing.
So is there a way to do the following:
1. Have Flash load an image from a URL
2. Flash stretches the image to a size indicated by javascript
3. Flash makes the stretched image available to javascript.
My idea was that Flash acts as a proxy. That is, Javascript 'connects' to a Flash webserver (which is on the clientside) and downloads the image it wants from it. When really, Flash is contacting the real location of the image, stretching the image and then serving it up.
If someone could point me to some documentation that discusses an interface between Flash and Javascript that would be great! Any other ideas or thoughts or whatever would also be appreciated. Even if it doesn't involve Flash!
Thanks.
Jamie Chong
Vancouver, Canada.
View Replies !
View Related
How To Load Images From Client Side When The Swf Is Hosted On A Server Without Uplaoding It To Server?
I'm trying to build a online image resize tool.
problem i face are:
1. I build a button that allow user to browse the file. Once file is selected, it doesnt show full path.
2. lets say if it shows fullpath, but i try to load it into a movieclip, and it doesnt work because the swf file is located at the server and not the client's place.
3. as far as i know, flash can only load images which is located in the same server or internet.
4. if i use php, asp, cgi.. it can only allow me to 1st upload the image then resize later, but this is not wat i want.
5. I need to 1st resize then upload later, because if i have 100 and more photos taken from digicam, it's going to be very slow and heavy.
What i have tested:
1. upload "image3.jpg" into the same directory as the "viewer.swf", and it works.
2. do not upload the swf to the server, but run locally from the user's computer and open "image3.jpg" and it works.
3. upload the swf to the server and open "image3.jpg" from the user's computer and IT DOESN"T WORK!
please help me out.
Thanks~!
Attach Code
//---------- Import -------------
import flash.display.BitmapData
import flash.net.FileReference;
//---------- objects -------------
var dlgOpen:FileReference = new FileReference();
var dlgOpen_Listener:Object = new Object();
//---------- _root.value -------------
//Value transfer from <object> or <Embedded> tag.
var strOutputFileField:String = _root.OutputFileField;
var iMaxPPI:Number = eval(_root.MaxPPI);
var iMaxWidth:Number = eval(_root.MaxWidth);
var iMaxKB:Number = eval(_root.MaxKB);
var bDebug:Boolean = eval(_root.bDebug);
lblNo.text = "Picture " + _root.PictureNo;
//---------- Variables -------------
//var bCropProcess_Flag:Boolean = false;
//var bIsValidFormat_Flag:Boolean = false;
//---------- Listener -------------
//dlgOpen_Listener
dlgOpen_Listener.onSelect = function(selectedFile:FileReference):Void
{
//Flag the crop process has been started
bCropProcess_Flag = true;
//update filename, cannot get full filename because flash don't allow
txtFilename.text = selectedFile.name;
//Create into a movie clip or a bitmapdata
_root.tmpBitmap.loadMovie(selectedFile.name);
CreateBitmap();
};
//---------- Functions-------------
//OpenImage
function OpenFileDialog(event:Object):Void
{
dlgOpen.browse([{description: "Image Files", extension: "*.jpg;*.gif;*.png;*.bmp;*.tif"}]);
//_root.tmpBitmap.loadMovie(txtFilename.text);
}
//Load Image into Bitmap Object
function CreateBitmap()
{
}
function sendData(pixels:Array, h:Number, w:Number){
//Create the LoadVars object and pass data to PHP script
var output:LoadVars = new LoadVars()
output.img = pixels.toString()
output.height = h
output.width = w
//The page (and this movie itself) should be in a server to work
output.send("jpeg.php", "output", "POST")
}
//---------- Others -------------
//Add Events and Listener
dlgOpen.addListener(dlgOpen_Listener);
btnBrowse.addEventListener("click", OpenFileDialog);
//Clean up and stop
stop();
Edited: 11/23/2007 at 07:34:09 PM by zerodevice
View Replies !
View Related
Can Flash Recognize When Asp Server-side Is Ready
I use a thirdparty flashuploader and asp for uploading multiple files to a server at once. This works perfectly. When the uploading is done it redirect to a page which contains multiple records. Only the just uploaded files are not shown. When refreshing the page it shows up.
My question is.
Redirect with flash upload control doesn't work perfect because flash doesn't know when ASP server-side is ready. Is there a control inside flash to recognize when the server-side is ready. The third-party does not give any answer on this.
ThanXs
View Replies !
View Related
How Can I Retrieve Server-side Code To Flash
hello guys, im just to buil my data driven application im still newbie.. can anyone help with get var from php code to flash.. Im using LoadVars here is my code..
var lvFile:LoadVars = new LoadVars();
lvFile.load = function(bSuccess:Boolean){
if (bSuccess){
trace(lvFile.name1);
trace("loaded");
}
else{
trace("not loaded!!!!");
}
}
lvFile.load("http://localhost/web/final_website/Flash/test.php");
and here is my php code..
<?php
$name1 = "Its me!";
echo $name1;
?>
Im having undefined in my output panel in flash.. Can anyone help how to do it right? thanks guys for the help...
View Replies !
View Related
Server Side Video To Flash Conversion
Does anyone know of a program for Server Side Video to Flash Conversion. i Would like to have web page that would allow visitors to upload multiple files of there video files and in the process convert them to flv. any help would be appreciated..
tks.
john
View Replies !
View Related
Server Side Help - Saving Images From Flash
I'm pretty comfortable with troubleshooting complex actionscript, but have yet to dip into server side scripts very far.
Below is what I'm looking for / to be answered:
...you can use the BitmapData class to capture pixel data for an image from a movieclip (Flash 8 only) - but you'll need a server side script to actually save the image...
I've looked through books, flash help, and online... this doesn't appear to be an overly common task (saving images from flash to a server) - not surprised.
keep in mind - This will be ran on my employer's server - I'm gonna say the server is Windows. Not much by the way of tech help at my job.
Thanks - I appologize if this is an issue for a different area of the forum.
View Replies !
View Related
Flash And Server-side Java Interaction
If I have a graphic designer who is going to build a Flash front-end that needs to interact with server-side Java code running in a web server (Tomcat), should we be using Flash Remoting with a front-end that the designer creates with the Flash builder? It seems like that would be the easiest way for them to build it rather than having them get into Flex and all that. However, if there's a better way, please point it out to me, because I've never tried using any of these Adobe products. Thanks...
View Replies !
View Related
Passing Variables From Server-side Asp To Flash
I'm having some difficulty passing the server's date/time to Flash.
I'm getting this error message: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.
However, it appears as if I am sending name/value pairs. Both my files reside in the same directory. Can anyone help?
Attach Code
Code for time.asp:
' VBScript File
Dim myDateString
myDateString = Date()
Dim myTimeString
myTimeString = Time()
dim myDateTime
myDateTime = myDateString + myTimeString
response.write "myDateTime=" & Server.UrlEncode(myDateTime)
----------------------------------------------------------------------
AS3 code:
var variables:URLVariables = new URLVariables();
var request:URLRequest = new URLRequest("time.asp");
request.method = URLRequestMethod.POST;
request.data = variables;
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.addEventListener(Event.COMPLETE, completeHandler);
try {
loader.load(request);
} catch (error:Error) {
trace("Unable to load URL");
}
function completeHandler(event:Event):void {
var variables:URLVariables = new URLVariables(event.target.data);
var myDateTime = variables.myDateTime;
trace(myDateTime);
}
View Replies !
View Related
FMS Server Side Code With Flash As3 - How To Ping?
Hi,
Can someone please show me how to use a .asc (server-side script) with a ping function that updates a text component on the client side (.swf). If you can, I request that the explanation is in AS3 and FMS2. Seems simple enough but I'm new to .asc files and how to implement them. This is a functionality that I need and it should serve to help me understand other aspects of FMS server-side code.
Thanks,
waffe
View Replies !
View Related
|