Outputting Without PHP
Is there any way to save txt/xml on an online server without using PHP?
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 10-21-2004, 08:21 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Outputting Xml
My application is written using Flash MX with lots of action script. I have to output a text file that will contain xml data - send that text file to a blackbox calculation engine. That blackbox engine will then output a text file which contains data that must be read back into the Flash application.
I was told that mmsave was what I could use - I did it but now I am told that this is only a debugging feature.
MMSave(mystring,MyDir)
What would I use to output a text file in a directed location i.e. c:mmtextfile*.* using ActionScript?
Are there other solutions ? I am quite lazy so I would like the solution to be simple.
Thanks in advance
Not Outputting
Hi guys,
last night i was playing around and for some reason my output panel dont seem to work, i can do trace('why dont trace work'); and cntrl-enter and it does'nt do anything.
has anyone ever experienced it. Anyone have any ideas about fixing it?
Thanks
Problem Outputting To AVI
I'm having problem outputting a slideshow done in Flash MX 6 to uncompressed AVI format.
It works when I tested with a very short animation. With the slideshow the output AVI file is >3GB so the file size seems right, but the file is not playable in any player. WMP gives me the file type or codec not supported error.
Is this a known issue? Is there any way to go around it or any plugin that fixes it? thanks.
Outputting To A Txt File
can someone tell me how to output variables to a .txt file? I'd like to create a .txt file from one swf for another swf to take as input later
also, this first swf will be run from a browser, so how do I specify where this txt will be saved?
[F5] Outputting Variables
I have a grid with 2 dynamic text fields : "from" and "to". This grid is separated in to squares. "from" and "to" change depending on where the cursor is. I've done the math but am having trouble implementing it.
Code:
fx = _xmouse/80;
math.floor(fx) * 10000;
fy = _ymouse/80;
math.floor(y) * 100000;
from = fx + fy + 1;
tx = _xmouse/80;
math.ceil(tx) * 10000;
ty = _ymouse/80;
math.floor(ty) * 100000;
to = tx + ty;
Also; is "math.floor" and "math.ceil" the correct command for rounding down and up?
Thanks.
Outputting A Query In A Fla Mc
OK, I know how to flash remote. What i do not know how to do is output a query result set in flash. I know how to send a query result set from coldfusion, but i do not know how to display it in flash.
For example, I would like to have a user click VIEW ORDER HISTORY, then coldfusion will return a query how can i make a table in flash that will show all orders?
eg.
order 1 date x item c
order 2 date x+3 item d
...
Outputting Flash 8 With FLV
Greetings, I am outputting a Flash 8 project with embedded FLV. On the test movie, it played fine, however, when i published it, the scrubber does not show up. Anyone knows what's causing it?
Outputting Time
Okay i am making a simple kids game in flash, basically the kid clicks on the start button, this loads a series of questions, and starts a timer, the kid has to answer the 10 questions, once they have done this it outputs a congratulations message and the time in which it took to do the activity.
Now the timer works great, the problem is that i don't know how to terminate the activity and output the time, i want it so that when the kid hits the correct answer on the last question it plays a congratulations movie and outputs the time.
If anyone thinks that they can help please reply, and i shall send u the fla.
Thanks
Outputting Time
Okay i am making a simple kids game in flash, basically the kid clicks on the start button, this loads a series of questions, and starts a timer, the kid has to answer the 10 questions, once they have done this it outputs a congratulations message and the time in which it took to do the activity.
Now the timer works great, the problem is that i don't know how to terminate the activity and output the time, i want it so that when the kid hits the correct answer on the last question it plays a congratulations movie and outputs the time.
If anyone thinks that they can help please reply, and i shall send u the fla.
Thanks
Outputting Special Characters......... Need Some Help
Hey guys I need a lil assistance outputting some special characters.... I need to get the code for "&" and "."
the code snippet I'm using is below
nav = "reports "+chr(65)+" stats";
which outputs the "A" but the usual code for & is 38 (I think) but it doesn't work
Including ActionScript When Outputting To AVI
I think I've tried everything an dstill, I cannot output my ActionScripted animations to AVI. I've been using screencapture apps but they take far too many resources when capturing live video, making my animations crawl... I've also tried SWF2Video but as far as I can tell, it's a piece of well, let's not go there. It crashes every time I try to export an SWF to AVI...
So, does anyone have any suggestions? I'm really in a bind here...
Matt
Outputting Variables To A File
Hello - please help if you can...
I have 2 movies and I need them to speak to each other. Basically, I want to pass a variable out to a text file from where my second Flash movie can read it in.
I'm OK at reading in variables from text files but do not know how to save a variable to an external file...
Like I say, if you know how then please enlighten me...
Many thanks, PM
Outputting Movie By Scenes In MX
Hi,
I got bunch of scenes in one swf and was wondering if there is a way to output the scenes one by one so that checking is easier....
It would be great if I could get some help.
Thank yoU!!
:cow:
A Way To Prevent Certain Layers From Outputting?
Kind of a weird question I guess...is there a way to prevent layers from outputting when you make your final flash movie?
I'm building this presentation for my company, and I've built the navigation already...certain section of the presentation are ending up to need less menus than I originally built into the nav...but I don't want to trash the menus just in case stuff is added later. So is there a way to keep certain layers or objects from showing in the flash movie that is made when you're done?
Outputting Text After Inputting.
Hi, I'm generally not a newbie... but not a veteran either, so I figured this would be the place to post.
I'm trying to create a flash where you can input text in an input text box which then outputs after hitting enter in the same general presentation. Can someone help me on how I can do this? I didn't even know what kind of tutorial this would be in.
Thanks a lot.
Outputting Text From An Input Box
Okay, I just can't figure this out. In FlashMX2004, unfortunatly, I haven't become code savey yet... I want to type something in an input box, and let it output in another text box once I hit enter in the input box... how can I do this?
I've got a fair idea that it is used with variables, and having the text box display whatever is inputted in the variable... other then that, I am really confused.
Thanks.
[F8] Outputting Variable To Text Box
Howdy,
I have a Random Muisc player which is working exactly the way i want it to.
The only feautre i would like to add is having the title of the track output to a dynamic text box but i cant figure out how.
Below is the code for the player
Quote:
temp = [];
mp3s = ["cler1","cler2"];
function init(){
temp = mp3s.concat();
temp.sort(function(){return Math.floor(Math.random()*3)-1});
playTracks();
};
function playTracks(){
if(temp.length==0) init();
toPlay = temp.pop();
myMP3 = new Sound(this);
myMP3.loadSound(toPlay+".mp3",true);
myMP3.onSoundComplete=function(){
playTracks();
};
};
init();
any help would be greatly appreciated
Outputting Png From Swfs In Runtime
I've been trying to find a way to do this. I've done a bit of searching around, but all I've been able to find are links to the png encoder by Tinic Uro- http://www.kaourantin.net/2005/10/pn...er-in-as3.html and some other methods involving pixel by pixel strings.
The pngencoder looks the best way, but I can't get it to work, even after following the suggestions in the comments onhis blog - I always get Error #2030: End of file was encountered. when I try to access the byteArray.
Has anyone used this method, or knows about it and can help?
[AS2.0] Outputting Value In Format '1.20' Without It Being Changed To '1.2'?
I have a simple movie where you click on items and it adds a value to a total. I am using coins so I want it outputted in the format 1.20 but it changes it to 1.2. I know its to do with decimal points but not sure what to do to get round it. I am setting a variable called cost and adding to that in the actionscript and then outputting through a dynamic textbox.
I start up by setting it as...
cost = 0.00;
But this doesn't help.
Any ideas?
[F8] Outputting Php As Xml, Then Load It Into Flash
Hi all,
I'm having a little problem there..
I have data stored in mysql database, im using php to extract the data and output it as xml.. but when i try to output the xml in flash. it wont work.. I've never done this before and would really like to have some help. Here are my codes
php code:
Code:
<?php
header("Content-type: text/xml");
$server = "localhost";
$user = "root";
$pass = "";
$db = "tamil";
$link = mysql_connect($server,$user,$pass) or die("Could not connect to the server.");
mysql_select_db($db,$link)or die("Could not select the database.");
$query = "SELECT * FROM ads ORDER BY id DESC";
$result = mysql_query($query,$link);
$xml = "<?xml version="1.0" encoding="utf-8"?>";
$xml .= "<entries>
";
for($i=0;$i<mysql_num_rows($result);$i++){
$row = mysql_fetch_assoc($result);
$xml .= " <entry>
";
$xml .= " <test>" . $row['advert'] . "</test>
";
$xml .= " </entry>
";
}
$xml .= "</entries>";
echo $xml;
?>
And here is the AS2 code:
Code:
var myXML:XML = new XML();
myXML.ignoreWhite = true;
var output:String = "";
myXML.onLoad = function(success){
if(success){
var news:Array = myXML.firstChild.childNodes;
output = news[0].childNodes[0].firstChild.nodeValue;
ads_txt.text = output;
}
else
{
ads_txt.text = "Failed";
}
}
myXML.load("flash.php")
The XML shows fine when i open it in my browser.
Where am I being wrong? :S
Trouble Outputting Xml From Flash
i'm trying to output xml from flash using the following code...
var XMLString:String = "<root formation_id=""+_root.formationid+"" fan_id=""+_root.fanid+"" team_id=""+_root.teamid+"" fixture_id=""+_root.fixtureid+"" player1=""+_root.target1.player.id+"" player2=""+_root.target2.player.id+"" player3=""+_root.target3.player.id+"" player4=""+_root.target4.player.id+"" player5=""+_root.target5.player.id+"" player6=""+_root.target6.player.id+"" player7=""+_root.target7.player.id+"" player8=""+_root.target8.player.id+"" player9=""+_root.target9.player.id+"" player10=""+_root.target10.player.id+"" player11=""+_root.target11.player.id+""/>";
var sendXML:XML = new XML(XMLString);
var replyXML:XML = new XML();
replyXML.ignoreWhite=true;
replyXML.onLoad = showResponse;
//sendXML.xmlDecl = "<?xml version="1.0" ?>";
sendXML.sendAndLoad("http://localhost/myfootballclub/load_vote_xml.aspx", replyXML);
function showResponse(success:Boolean):Void {
if (success) {
trace(this);
} else {
trace("Error receiving response");
}
}
i'm outputting to an asp page but the xml isn't being recognised as its not being converted to xml format. the data outputted by flash looks something like this...
<?xml version="1.0"?>
<vote player11="10" player10="1" player9="25" player8="13" player7="23" player6="26" player5="11" player4="16" player3="5" player2="15" player1="8" fixture_id="1" team_id="1" formation_id="2" />
here is the asp code...
Dim XmlDoc As System.Xml.XmlDocument
XmlDoc = New System.Xml.XmlDocument
XmlDoc.Load(Request.InputStream)
XmlDoc.Save(\itlab-lon-dellaspdatahereitis.xml)
does anyone know what i'm doing wrong?
Outputting Code In Flash
Hi, I just took a training class in Flash and I was told Flash no longer outputs the (actionscript) codes? You have to know how to write the action scripts by hand? Is this correct??
For Instance: If I created mouseovers in Fireworks, the program would output the code I could then copy into an HTML file.
thanks.
Outputting Data Into Buttons
I am very close on this, just need a nudge in the right direction. I have done this successfully using just text boxes (i.e. this["base"+i] like you'll see in the code below) but want to be able to show those textboxes in a button and then use the button click function to do something based on the data.
Here's what I have. I have a movie called btn_holder (it has a linkage of btn_holder). Within btn_holder I have a button called bluebutton (again linkage of bluebutton). Within bluebutton I have a movie called base (linkage base). Within base I have two textboxes: Title_txt and Description_txt are their instance names.
What I am trying to do is loop through a recordset and place the buttons on the stage dynamically with the data loaded into the textboxes. The buttons all show up fine but the text data isn't displaying, it just shows the generic values on each button.
Here is my actionscript code...any help would make me more sane.
Thanks,
Jason
function SimpleSearchProvider_Result(result)
{
// Display detail information in text boxes within a button
cant = result.length //how many rows in recordset
for(var i=0; i<cant; i++){
//Dynamic put btn_holder on stage and fetch data to it
attachMovie("btn_holder", "btn_holder"+i, i, {_x:0, _y:(43*i)})
this["btn_holder"+i].bluebutton.base.Title_txt.text = result.getItemAt(i).tutorial_title
this["btn_holder"+i].bluebutton.base.Description_txt.text = result.getItemAt(i).tutorial_description
}
}
Outputting Data Into Buttons
I am very close on this, just need a nudge in the right direction. I have done this successfully using just text boxes (i.e. this["base"+i] like you'll see in the code below) but want to be able to show those textboxes in a button and then use the button click function to do something based on the data.
Here's what I have. I have a movie called btn_holder (it has a linkage of btn_holder). Within btn_holder I have a button called bluebutton (again linkage of bluebutton). Within bluebutton I have a movie called base (linkage base). Within base I have two textboxes: Title_txt and Description_txt are their instance names.
What I am trying to do is loop through a recordset and place the buttons on the stage dynamically with the data loaded into the textboxes. The buttons all show up fine but the text data isn't displaying, it just shows the generic values on each button.
Here is my actionscript code...any help would make me more sane.
Thanks,
Jason
function SimpleSearchProvider_Result(result)
{
// Display detail information in text boxes within a button
cant = result.length //how many rows in recordset
for(var i=0; i<cant; i++){
//Dynamic put btn_holder on stage and fetch data to it
attachMovie("btn_holder", "btn_holder"+i, i, {_x:0, _y:(43*i)})
this["btn_holder"+i].bluebutton.base.Title_txt.text = result.getItemAt(i).tutorial_title
this["btn_holder"+i].bluebutton.base.Description_txt.text = result.getItemAt(i).tutorial_description
}
}
Help W/ XML, Looping Through And Outputting Data
I have an xml document that looks like this:
Code:
<tns:YoObjects>
<Term>
<termId>8</termId>
<sessionId>12</sessionId>
<languageId>0</languageId>
<term>black and white</term>
<enteredDtm>2007-03-27 17:00:05</enteredDtm>
<mimeId>1000</mimeId>
<categoryId>0</categoryId>
</Term>
<Term>
<termId>6</termId>
<sessionId>12</sessionId>
<languageId>0</languageId>
<term>cars</term>
<enteredDtm>2007-03-27 16:59:56</enteredDtm>
<mimeId>1000</mimeId>
<categoryId>0</categoryId>
</Term>
<Term>
<termId>1599</termId>
<sessionId>360</sessionId>
<languageId>0</languageId>
<term>cars</term>
<enteredDtm>2007-04-17 10:03:43</enteredDtm>
<mimeId>1000</mimeId>
<categoryId>0</categoryId>
</Term>
<Term>
<termId>7</termId>
<sessionId>12</sessionId>
<languageId>0</languageId>
<term>photograph</term>
<enteredDtm>2007-03-27 16:59:59</enteredDtm>
<mimeId>1000</mimeId>
<categoryId>0</categoryId>
</Term>
</tns:YoObjects>
What I want to do is loop through and get all of the "term" values, and simply put them into a text field. How should I do this?
Outputting .ps Postscript Files
We have a system which allows people to use an swf for design a banner. We want to be able to save the design as a .ps file. Does anyone have any idea how to do this?
Including ActionScript When Outputting To AVI
I think I've tried everything an dstill, I cannot output my ActionScripted animations to AVI. I've been using screencapture apps but they take far too many resources when capturing live video, making my animations crawl... I've also tried SWF2Video but as far as I can tell, it's a piece of well, let's not go there. It crashes every time I try to export an SWF to AVI...
So, does anyone have any suggestions? I'm really in a bind here...
Matt
Outputting Variables In Flash MX
My friend is learning Flash MX, but he didn't want to sign up on the forums, so I'm asking this question for him:
How to you output variables in Flash MX?
Pretty simple. I'm betting there's just a short little command/function or something to do it. Thanks.
Outputting The Location Of Your Mouse Cursor
Can anyone help me with this, I'm trying to output the cursors location in a dynamic text box. When you move the cursor it should show the x and y cordance in the text box. I dont understand how to go about it. Can someone please help.
Outputting To A Text File On The Server?
I need to output to a text file, that I can retrieve at a later time. The guys that do games should have a method for this, similar to keeping game high scores. How do you do that, is it with XML?
Sorry I don't know squat about XML?
Any recommended tuts etc would be helpful?
Or an example fla if poss?
Thanx all
Outputting The Value Of The Label Chosen In A List Box?
i don't think that title makes any sense
i can make a list box. and i can put text in it. i can't figure out how i'm supposed to show the selected label.
the label is a painting i did. i want the painting to appear on the stage when it's name is clicked on in the list box.
[F8] Outputting Hotspots To An External File
I was wondering if there is a tutorial or how can I when some clicks on a hotspot on an image how to get that to open up a html or php file in an html iframe? If someone could help it would be great thanks!
Random Function That Is Not Outputting Correctly
I have a random function that is not outputting in the range i specified. Here's my code:
ActionScript Code:
// on the main timeline frame 1
function randRange(min:Number, max:Number):Number {
var randomNum:Number = Math.floor(Math.random() * (max - min + 1)) + min;
return randomNum;
}
// on the movie clip called tree(some number)
onClipEvent(load) {
this._x = random(450) + 10;
this._y = randRange(-0, -800);
}
onClipEvent(enterFrame) {
this._y += 21;
}
I would appreciate some help on this Thanks.
Outputting Error Messages From A SWF In A Browser?
Is there a way to output all error messages to some sort of window when viewing a SWF in a browser? I'm working on a game and I'm about to beta test with a few dozen people. They will do this by playing the game in a browser. Sometimes the game crashes and it would be great if the error message that accompanies the crash could be shown, so they can copy and paste it to me in an email. This way i dont have to play the game over and over in the flash IDE to try and re-create the problem.
I know you can output trace messages to a javascript window, but what i need to do is output ALL error messages to a window of some sort. Any ideas or advice would be appreciated.
-Miles Tilmann, Programmer, Pixeljam Games (pixeljam.com)
Outputting Colour Values From Flash
I have a flash file that contains a webcam which allows me to display the particular colour on screen in a small box. I need to record the output of this colour (either RGB values or hex values) so that it links to a series of words associated in a pre-defined database.. ie if its more red than green or blue it will pool more words from the red database.
Any help is massively appreciated.
Thanks
Outputting Error Messages In A Browser?
Is there a way to output all error messages to some sort of window when viewing a SWF in a browser? I'm working on a game and I'm about to beta test with a few dozen people. They will do this by playing the game in a browser. Sometimes the game crashes and it would be great if the error message that accompanies the crash could be shown, so they can copy and paste it to me in an email. This way i dont have to play the game over and over in the flash IDE to try and re-create the problem.
I know you can output trace messages to a javascript window, but what i need to do is output ALL error messages to a window of some sort. Any ideas or advice would be appreciated.
-Miles Tilmann, Programmer, Pixeljam Games (pixeljam.com)
Outputting Bitmap Path From Xml File
You guys have been great for helping me solve problems!
I have another.
I have an xml file that includes image paths.
I'd like to read that image path from the xml and display the image (a jpg or gif) on the stage.
However, when I trace image_path from my xml file, the result seems to knock off the "http:" part of the node.
Also, when I load the image, the loader ends up being null (maybe this is because I didn't set up an event handler for it).
Can anyone point me in the right direction?
Attach Code
var _loader:Loader = new Loader();
_loader.load(new URLRequest(myXML.myNode.image_path[i]));
trace(_loader.content);
var image:Bitmap = Bitmap(_loader.content);
var bitmap:BitmapData = image.bitmapData;
mySprite.addChild(image);
image.x = pEvent.stageX+10;
image.y = pEvent.stageY+30;
Outputting Bitmap Path From Xml File
You guys have been great for helping me solve problems!
I have another.
I have an xml file that includes image paths.
I'd like to read that image path from the xml and display the image (a jpg or gif) on the stage.
However, when I trace image_path from my xml file, the result seems to knock off the "http:" part of the node.
Also, when I load the image, the loader ends up being null (maybe this is because I didn't set up an event handler for it).
Can anyone point me in the right direction?
Attach Code
var _loader:Loader = new Loader();
_loader.load(new URLRequest(myXML.myNode.image_path[i]));
trace(_loader.content);
var image:Bitmap = Bitmap(_loader.content);
var bitmap:BitmapData = image.bitmapData;
mySprite.addChild(image);
image.x = pEvent.stageX+10;
image.y = pEvent.stageY+30;
Outputting Bitmap Path From Xml File
You guys have been great for helping me solve problems!
I have another.
I have an xml file that includes image paths.
I'd like to read that image path from the xml and display the image (a jpg or gif) on the stage.
However, when I trace image_path from my xml file, the result seems to knock off the "http:" part of the node.
Also, when I load the image, the loader ends up being null (maybe this is because I didn't set up an event handler for it).
Can anyone point me in the right direction?
Attach Code
var _loader:Loader = new Loader();
_loader.load(new URLRequest(myXML.myNode.image_path[i]));
trace(_loader.content);
var image:Bitmap = Bitmap(_loader.content);
var bitmap:BitmapData = image.bitmapData;
mySprite.addChild(image);
image.x = pEvent.stageX+10;
image.y = pEvent.stageY+30;
Outputting Array On Multiple Lines
I have a movieclip that calls an array, but I want that array to be output on multiple lines in the movie. How do I break up an array in such a way that it is output with the equivalent of line breaks?
for example, if an array is defined like this:
ActionScript Code:
phrase = new Array();thewords="this is line 1 text, this is line 2 text, but it's all going to be on the same line";phrase=thewords.split(',');
When the movieclip pulls in the chunks of that array it sticks them all on one line. Is it possible to include some element in the code above to split the elements of the array onto multiple lines when it's output? Is there an equivalent to perl's "/n" which prints a line break, for example? I'd prefer that option than having to create multiple arrays and reengineer the entire function. Thanks.
Outputting Array On Multiple Lines
I have a movieclip that calls an array, but I want that array to be output on multiple lines in the movie. How do I break up an array in such a way that it is output with the equivalent of line breaks?
for example, if an array is defined like this:
ActionScript Code:
phrase = new Array();thewords="this is line 1 text, this is line 2 text, but it's all going to be on the same line";phrase=thewords.split(',');
When the movieclip pulls in the chunks of that array it sticks them all on one line. Is it possible to include some element in the code above to split the elements of the array onto multiple lines when it's output? Is there an equivalent to perl's "/n" which prints a line break, for example? I'd prefer that option than having to create multiple arrays and reengineer the entire function. Thanks.
Outputting A 1 Pixel Dot To The Page I NFlash?
I'm working on a little project for myself. I want to have a movie that outputs random dots to a Flash movie. Getting a random set of x,y coordinates from the movie (400x230). I htink I can just use random (from 0-screen.width?). I'm gonna test it myself but what would be the procedure? I guess I can use a movie clip instead of the dot.
Outputting Array Elements To Textbox
I have an array with 50 elements and I want to display elements 1-10 in a textbox.
I know how to display the 1st element but does anyone know how I can display elements 1 - 10 only in one textbox?
thanks
Mike
Outputting Xml From PHP But Flash Doesn't Read It
I'm outputting content from a MySQL DB using php. It outputs a valid XML document (which opens in Explorer as XML) but my load XML in Flash 2004 Pro doesn't seem to recognize the XML. Is it because the file it loads is a .php extension? even though the php echos out valid XML code?
|