Writing A Movieclip To An Swf
Hello all.
I am kind of tired right now and not thinking one hundred percent straight. But I need to know if this makes any sense;
I want to be able to create runtime movieclips and write them to the server via byteArrays with .NET or actionscript, as swfs.
Please let me know of any 3rd party software, experiences, input you may have.
Thanks
ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 10-22-2007, 05:22 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Writing To Txt
Is it possible to write to a text file using mx? and nothing else.
Writing To Txt With Php
I have been trying to make a simple hscore table but for some reason I cant get flash to write to the .txt.
In flash I put this code in.
code:
Submit.onPress = function() {
SendScore = new LoadVars();
SendScore.n = Name;
SendScore.s = Score;
SendScore.f = "Scorelist.txt";
SendScore.sendAndLoad("SendScore.php", SendScore, "POST");
};
Then in the php file I have this code.
code:
<?
$n = $_POST['n'];
$s = $_POST['s'];
$f = $_POST['f'];
$o = fopen("$f", "a+");
if(fwrite($o, $n, $s));
else
fclose($o);
?>
The problem is most likely with the php as I have not used it much and although I know to use the php code I am unsure what it means. Thanks
Writing XML
ok i got this script and i need it to write into a XML file onto the server im using.
The structure is:
root---|
flash.swf
web.XML
the flash.swf sends data to the XML file and writes it.(and i dont want to use php.)
Ideas???
[F8] Writing To An SWF
Hi, this is driving me crazy and I'm afraid I don't even where to start looking (or even how best to ask) for help. What I'd like to be able to produce is the following:
'User-bookable time slots' (or however else they might otherwsise or more appropriately be termed).
I'd like to create a table indicating time slots (10am til 11 am; 11am til 12; 12pm til 1pm etc) which, if not already taken - i.e. someone else's name isn't already displayed in a slot - will allow the user to type his/her name in, then hit a submit button whereupon the his/her name will be shown in the slot rendering it unavailable to subsequent site users.
Does any of this make sense? I'm having trouble getting my head 'round how to achieve it, despite having successfully added guestbooks and all manner of other 'read/write' sort of stuff to various of my sites.
Sigh... I think I might be having a 'senior moment'! Please, please help!!!
Many thanks,
Fran
Writing To XML
Well i know how to read XML and everything...but now i want to add to an existing XML..and i have NO IDEA how...
my xml looks something like this , and now i want to add like a ITEM or FOLDER like underneath the 2ndfolder for example..
How do I insert it in theory and how will i find the correct spot ect..
how do i insert something between a tag like this <folder> </folder> ?
CODE would also be helpful...
ActionScript Code:
<?xml version="1.0"?>
<Explorer>
<!-- comments -->
<Folder title ="Desktop" icon="desktop">
<Folder title="Stuff" icon="folder"/>
</Folder>
<Folder title="My Computer" icon="pc">
<item title ="readme2.txt" icon="txt"/>
</Folder>
<Folder title="Recycle Bin" icon="recycle"/>
</Explorer>
THANK YOU !!
Writing XML With AIR
im trying to open an existing XML document and then write to it with AIR using flash..
ActionScript Code:
import flash.filesystem.File;
import flash.filesystem.FileStream;
import flash.filesystem.FileMode;
var appDir:File = File.applicationStorageDirectory
var dskTopFileStream:FileStream = new FileStream();
var fileString:String = appDir.nativePath;
var dskTopFile:File = File.documentsDirectory;
trace(dskTopFile);
dskTopFile = dskTopFile.resolvePath(fileString+"\bankroll.xml");
//trace(dskTopFile.toString());
// LOAD XML
var xmlString:URLRequest = new URLRequest(fileString+"\bankRoll.xml");
var xmlLoader:URLLoader = new URLLoader(xmlString);
xmlLoader.addEventListener("complete", init);
var defaultXML:XMLDocument = new XMLDocument();
defaultXML.ignoreWhite = true;
function init(event:Event):void {
var xml:XML = XML(xmlLoader.data);
defaultXML.parseXML(xml.toXMLString());
//var myString:String = defaultXML.firstChild
var existingData = defaultXML.firstChild.childNodes
trace(existingData)
var i = 0
for (i=0;i<defaultXML.firstChild.childNodes.length-1;i++) {
trace(i)
}
dskTopFileStream.openAsync (dskTopFile, FileMode.WRITE);
dskTopFileStream.writeUTFBytes ("<BankRoll>"+ existingData+existingData+"</BankRoll>");
dskTopFileStream.close ();
}
problem is, it keeps inserting weird charecters and placing commas etc between my childNodes.. this effect seems much like an old php problem i use to encounter having something to do with a setting in the php server..
any ideas?
erik
Writing To HD
I need a Flash application to write something on to the hard drive (to
itself or to another file). The application is supposed to run on a
stand-alone computer, no connection to other computers, no Internet.
Is it possible to do that with FLASH means without installing ASP, PHP or
other add-ons?
Writing To PHP
So I am still new to AS3 and I need some direction for a school project and was wondering if I could get help here. I am creating a website all built in Flash for my family website (It is kind of like a family newsletter website). It has letters that my family writes each month. Before the would email me the letter and I would replace it. I want to be able to have the letter be displayed in a dynamic text field then they hit a submit button and a write letter area pops up. They then write their letter and then it automatically replaces the old letter with the new one. Now I have created the lay out and the text field that pops up and I have got it in AS3 just to replace the text but when I leave that page and come back, it does not keep any of the new text. I talked to a few people saying that I would have to have it be an xml file (Which is ok, I can figure that much out) But then I would have to use PHP to write to that file to have it switched on the server. Anyone know where to find some help with that? Or do you know of anything? Thanks for your help.
Sky Writing
Hi everyone!
It was a long long time since I posted in the forums! Well I'm back and need some help with an effect I saw a few years ago. It was a flash movie of a small airplane leaving a trail of text as is moved through the 2D sky. I guess it involves a motion guide and the plane following the guide but how do I make the text appear in the way that the plane flies?
Cheers
Writing To Xml
ok i know someone knows how to do this.
i need a basic form that maybe has 4 variables and then once submitted will write to an xml file.
i understand how to display the xml, but i need a client friendly form to write to it.
anyone??
Writing To XML
I've got this really simple login system that is used for about ten peeps.
But now I want these people, once they logged in, to write a short story, which has to be saved in an XML file. Can someone help me with this, really don't know how to get it to work.
If you look at the flash file, and login using username "a" and password "b", you get to the write screen. General idea is that when people write something here, and press the sned button... this info will be saved in the supplied .xml file before the other inputs.
Writing To A Txt
Just wanted to know if flash can write to a txt file(without php), and if so how.
Please
WRITING TO XML?
Hi,
I have an xml file I use for a gallery. However the client is a bit simple and cannot grasp updating the tags, so I've decided to build some sort of control panel that will write to the XML, i.e. you enter the image path, description and thumbnail location, submit, and the XML is written...
Can you point me in the most basic way to do this? I know kirupa is wonderful for straight to the point tutorials
Writing XML Using AS3
Hello,
I would like to know if there is a way to write to an xml file using Flash and Actionscript.
What I want to do is write to an xml file and then access it later.
Thanks!
Sky Writing
Hi everyone!
It was a long long time since I posted in the forums! Well I'm back and need some help with an effect I saw a few years ago. It was a flash movie of a small airplane leaving a trail of text as is moved through the 2D sky. I guess it involves a motion guide and the plane following the guide but how do I make the text appear in the way that the plane flies?
Cheers
Writing To Xml
ok i know someone knows how to do this.
i need a basic form that maybe has 4 variables and then once submitted will write to an xml file.
i understand how to display the xml, but i need a client friendly form to write to it.
anyone??
Writing)?
I'm new to Flash and I'm wondering if it's possible to use actionscript to create a file, write to that file, save it, read from it, modify it, etc.? I see the XML functions, but I don't see file i/o functions.
Thanks
Thanks.
Writing Look
hey guys, i am trying to figure out how to do something like this
the writing part at the beginning
if you guys could point me in the right direction i'd appreciate it cause i can't find any tutorials on how to create this effect
Writing To Disc
Err, Flash standalone can write to disk.
I need syntax, and explanation of it ...
(well, actualy, this is syntax, but from time to time it does not work for some reason)
fscommand ("exec", "command.com" add chr(9) add "/c" add chr(9) add "echo" add chr(9) add "&take=" add _root.variable add ">c: ext.txt");
pleeeaaaseeeee!!!
Writing Txt File To Cgi
Hey all!
I have in my website http://www.brucekey.nl a dynamic txt box that loads from my cgi-bin. If I want to change the txt file, which happens weekly, I just change the textfile and upload it again into the bin.
Is it possible in flash to make changes to that textfile online?
So let's say make a special page where the text loads in the textbox, editable, make changes and save it again, so I don't need to ftp it over and over??
I read about php, but I am not really into that, especially since my txt.cgi works good enough...
Thanks for your input!
Writing To Txt File
Hi. I'm making a flash app, and I'd like to write variables to a txt file in url-encoded format locally.
Is this at all possible?
Should I use fscommand/javascript or something?
I'm not too familiar with javascript, so if anyone could give an example, it would be appreciated.
Thanks!
andreas
Writing To A Txt-File
Hello!
I know how I can read a txt-File in Flash, but now I wan't to know, how I WRITE to a txt-File. It has to run on my local computer.
Is it something like
loadVariablesNum("data.txt", 0, POST);
???
Thank You for help
Mfg
FlashNiete
Writing In Arabic
hi can someone plase help me with writng in arabic in flash mx. thankyou
Writing To A Txt File...
Okay I know this is supposed to be really simple and I considered myself beyond it until I tried. And it wouldn't cooperate with me. I've got this code:
Code:
on(release){
//other code checking to see if params are met...
_root.loadVariables("comments.txt", "POST");
}
i have 3 dynamic text fields: name, email, and comments. each show up as variables under level0 when i list the variables at runtime, so I don't know why when I open up the comments file there isn't anything in it! Any help on this would be a relief and greatly appreciated. I am humbled, once again, by AS... Anyway, Happy Flashing.
Writing New XML Nodes
I know that you can remove XML nodes in Flash, but does anyone know if you can concatenate new nodes to an external XML file in Flash MX?
Writing To A Txt File With PHP
Hey I was wondering what a simple php script that writes a flash variable to a txt file would look like. ill be using it so visitors can 'leave me a message', so they don't have to bother with email if they just want to shoot off a little hello or something. thanks for your time.
Now For Some Realistic Writing
id like to have a line come on to my site in a way that looks like the viewer is watching someone write it in. I dont need it to look like pencil, i just mean i want the action of the line starting from nothing and going to the other end of the site.
can this be done?
i assume i would have to make a movie clip of some sort, but i dont know how to make it fludily go accross.
thanks a lot.
Writing To A .txt File ... Possible?
Hi!
I'm not sure if this question belongs to the "Newbies" forum instead, but here goes anyway...
I know how to read a text file into Flash.
However, is it possible to write a string like "I am an idiot" to a text file using Flash? If so, how? I'm still using Flash 5 btw.
If this question has been asked before, or if there is already a tutorial written about it, please re-direct me to it.
Thanks in advance!
Writing Letters
Hi,
I've seen many times the cool effect as if someone is writing a text in flash.You can see how the letters are written. Can anyone tell me how I can do that? It has to be realistic though :-)
Thanks in advance
Greetings
Camme
Writing Letters
Hi,
I've seen many times the cool effect as if someone is writing a text in flash.You can see how the letters are written. Can anyone tell me how I can do that? It has to be realistic though :-)
Thanks in advance
Greetings
Camme
Writing To Files
G'Day all,
I was wondering if there was any way to be able to write to a file in flash?? I am trying to write an application in flash for our office that will work on both mac and pc, and to do this i would like to write to a common file. Can anyone help??
Writing To A .txt File?
I know how to import variables from an external text file but what i need to know is how to change the variables in the text file from within flash. It can be Flash 5 or MX. So any ideas?
Help With Writing To Php Script
I have a php script for an mp3 playlist. I need to be able to write to it from input text. <song title="input" artist="input" path="input"/>[][]
then i need to be able to write
<song title="space" artist="space" path="space.mp3"/>
and i would also like to know how to delete the last line everytime i put sumthing new in. Any help would be appreciated. If I confused you plz email me at e.caffeine@blackcodemail.com maybe I can explain it better.
Writing To ActionScript
Hey guys and gals- I am curious to know if there is a way to write to ActionScript... via the flash movie... As in ... Being able to enter text in an Input Text Field, clicking a button, and have it save that information in the ActionScript. Or, would you have to write it to an alternate file, and have the ActionScript read from there?
I am working with Flash MX, any hints or ideas would be great, I know that the advice from you guys and gals is excellent. Thank you for your time.
-Taylor
Script Writing
I need help writing a script to load movies by date. I have something written but it isn't working and I need some help.
Interested?
Writing To Txt Files
HI everyone,
I have a flash file.in my flash file i have a variable called 'total';
which increments by 1 each time some 1 gets a question right. and decrements everytime someone gets a question wrong.
I want the score value & the players name to be save to a txt file on the clients pc.(a cookie) when the game is finished.
can some 1 tell me how to do this? OR do this using php or something...
this is the code for my last question in the quiz.
Code:
on (release) {
score = score+1;
gotoAndPlay("Scene 2", 1);
}
I want that variable score & name to be written to a txt file.
and also when the score & name has been saved to a text file. how do i call this information into a dynamic text box in flash.
Can some 1 else me please
Thanks
Scrollable Writing
I would like to make a scrollabe textbox in an accordeon component. I've got the accordeon component working its just i need 2 know how to make the writing scrollable.
Thanks in advance.
Writing In Flash
Im not to sure what the correct term for this is and if it has been asked before please direct me to the thread.
Im trying to figure out how to take the pen and write out something and giving it that look which makes it seem like its being written in real time.
Hope someone knows what im talking about enough to help me out or point me somewhere.
Writing Text With A Pen
I know that it sounds simple, but I'm wondering how to use a pen to look like it's writing out some text.
I think that masking may be involved??
Thanks so much, Mandoza
Writing Txt File
Sorry for the cross post wrong forum first time,
ok I am using the following php file to read off my server what files are in a certain directory, then it is supposed to write those files as a link to a txt file, but when it writes the file it writes over the stuff that is already in the text file and it only writes so that the last link is on there, (I think it is because of the while function), so when it writes over the text in the txt it writes over my variable code(in the txt) and messes up my loadvars, if someone would be so gracious could you please look at the attached files
-edit-
K i fixed the thing so it doesn't write over other text (changed "w" in fopen to "a" but it still only displays 1 link ) Also when i tried to load the php page into flash it never plays the specified frame, lotsa things wrong, I stink with PHP no wonder it is doing so crumby
Writing To A File HELP :-O
my brains are about to explode! somebody please point me in the right direction. I'm simply trying to have flash write to a txt file on my server. I understand php, but i'm not that great at it. I figure i can have flash send the variable to php and append it to the txt file. here's what i can't figure out:
1. how do i get flash to activate the php file?
2. how do i get the variables from flash to php? I think it's by using "get" or "post" but i'm not understanding! :-(
please help! just point me in the right direction and i'll figure it out.
virtual hugs,
threebrain
Writing Code For Swf To Exe
First of all I am not sure if this is the correct forum but am sure from here I wil get directions to what I need, Secondly I hope I make sense
For a certain project I am required to develop a module which can convert swf files into screensavers. Are there any tutorials/ documentation with which I can start off? What will be the different steps involved? I guess the tricky part is to convert it into a standalone exe.
One caution I can’t use any third party tool for that, since this is an academic project so I need to write my own code. But I guess I will need some library though.
Thanks for your help
Writing To AS File
Hi all,
Are you able to dynamically write to an .as file using, for example, PHP?
If so, what are the AS functions to write (echo/print) to the file?
Cheers,
maccac
Writing To File/xml
hello, im stomped again on my project
1. Does flash MX 2004 professional support writing to a text file? or an XML file?
2. and second question Is it possible to read/write a database from flash without using php/asp? thanks!
Writing Html
I've been working in Flash 4 for about a year and now am trying MX 2004. I never have figured out where you write html within flash. I know how to do actions and behaviors and such and have even figured out that I can write some javascript in the Get URL window. However, I usually create the whole movie, then open in a program that allows me to write additional html like <BODY leftmargin="0" topmargin="0" MARGINWIDTH="0" MARGINHEIGHT="0">. I never have enough time to read about everything I need to do in a book. Where can I write html within Flash...especially the 0 margins?
Over Writing Previous Mc?
Hi - with this piece of AS (in flash 04 pro as2):
Code:
var printClip = this.createEmptyMovieClip("print_mc", this.getNextHighestDepth());
what would flash do if "print_mc" already existed?
Would it delete the old clip or reuse the existing clip?
thanks
frank
Hand Writing
Has anyone ever developed or even seen a good realistic hand writing effect? I imagine the best way to do it would be to animate a mask over static text. I can't seem to get the mask to look very real though. Thoughts? Mind you, I would like to do more than just a couple of words. As much as 5 sentences at a time.
Writing A Function
I need some help writing a function, here is what I have (which does not work):
function Out() {
tox = _x;
ease = 3;
_x += (tox-_x)/ease;
_x = -900;
}
then I call this "function" from the main movie like this:
on (release) {
this._parent.fixedmid.one.Out;
}
"One" being the MC I am targeting. So what I am trying to do is call a function and tell a movie to reposition itself with a ease.
can anyone help me write this the right way? Thanks in advance for any replies.
|