ActionScript 2.0 :: Open An External Text File With The Help Of Button?
Oct 10, 2006
Im trying to open an external text file with the help of button. It works locally on my computer. But as soon as i upload it on my site, it does not work any more. Im not sure, if im putting the wrong path.
on (release) {
_root.flying_pages.empty_holder.loadMovie("1.jpg") ;
loadText = new loadVars();
I admit I am WAY in over my head here and its been WAY too long since I've used AS2.0 to remember anything about what I'm doing. I have a dyaminc table on the screen that is holding a movieClip that contains the following code.
Quote:
this.attachMovie("info_btn","NigeriaTrain4_5",this .getNextHighestDepth(),{_x:13, _y:85});//add button to the stage and places it on x & y axis NigeriaTrain4_5.onRelease = function() {//give button function
I'm creating a flash portfolio, I have small image icons, each icon when clicked on loads a diff. swf file, image gallery that loads bigger external images. I would like a different external text file to load every time a diff. image gallery loads, for some reason I cant find the answer to my problem,
I would like to add some actionscrpt to each icon/button so it will load a new txt file when clicked on.
(each image icon is a button and has the instance name of icon 1, 2 etc.)
Im trying to get a button when pressed to display text from an external .txt file (which I've done so far), but (1) I want it to only display certain paragraphs (the actual dialogue) of this text and (2) every time I click the button it should replace the old text with the new (like in any RPG). Now I asked a former lecturer for help and he gave me a link to a website and gave me a hint of what to do, but seeing as I was recently voted #48 on Forbes worst 100 programmers of all time (actually I haven used AS for 5 years) so I thought someone could explain it to me in a much clearer fashion? PS: My lecturer said: When you click the button to add text to the textfield but you ewant the previous text to be cleared the first thing you do is empty the box ( myText.text = "") then fill the box again with your new text..
Im building a portfolio on Flash.I have created my menu buttons and need to open files with doc, pdf, avi and swf extentions.So far I have been using the getUrl command and it seems to work for the pdf and swf. How can I get this to work for the other types?
How can I replace text loaded from an external file with text from another external file? Using setInterval and calling the .load from a function or something? In the example below I'm calling an external text file, could this also work with an .xml file with cycling through the children?
i am working on a flash-based report project (we'll run it on CD) for past week, I'm new to AS3 , got in so many troubles because of it. but finally got it working fine. but there is a problem with the final act, i want to open a PDF file using flash alone. it was very easy using AS2's getURL function and worked like a charm but its a different story in AS3, i worked on it so much that it gives me a headache whenever i think about it.I searched and read almost every article on the web concerning this, the only think that works for me is navigateToURL,but it opens the file in web browser and that I'd rather not have.so i want to ask if there is a way to actually open a PDF file external source such as H.D.D using pure AS or I'll need to take a look on zinc and air?this is the code i used for the linking job :
Actionscript Code: myDataGrid.addEventListener(Event.CHANGE, clicker);function clicker(evt:Event) { var SSL:String = evt.target.selectedItem.item; var path:String = "Books/"+SSL+".pdf";
i have made one aplication in flash and i want to add a button to open one doc file that is in the same dir. this will not to publish for web is for a aplication on a cd rom.
I have a webpage that currently display a powerpoint slides.The problem is that other can download the slides which I really dont want.
following issues:I dont want to convert the ppt slides to .swf then convert them to flash but rather let flash open the .ppt directly and display on the webpage.
I am using SWF Studio already which allows me to open an external .bat file by clicking a button in flash.I now need to open another file but this time i dont know the exact name of the file but it will be the only .cfg file in the folder.Does anyone know of a way to open a file just by the file extension alone without specifying the name?Here is my origional code for opening the .bat file:[code]i have tried using the above code and just replacing the "\Test Link.bat" part to "\*.cgf" but that doesnt do it.
In my Flash application users must be able to download or open PPT files nested in application's subfolder.When I run .*swf file, it works fine (Save file dialog appears), but if I run .exe file, nothing happens.[code]I suspect that "navigateToURL" function doesn't work in this case.
I am new to flash and I don't understand much about action script. I want to open one swf file from another using a button I have called ready_set_go. The project is not going to go into html format I only want to open the file locally. What is the code I need to do this?
I've managed to piece together a flash website with my limited as3 knowledge. The text is loaded from external text files and styled with an external css file.
It's working perfectly in Firefox and Explorer but it only works SOME of the time in Safari (on my mac).It's hit and miss. Sometimes it styles the text sometimes it doesn't.
I'm loading a external text file to flash and according to the number present in the text file i'm trying to do a IF - ELSE command. It's not working coz the value I load from the external file is string. How can i get this as intiger.
i want to open a SWF file to a button but in a completely new window however Im not talking web related i.e. not linking to a web page like...
on (release) { getUrl("www.blah.com") }
whateva it is...don�t want that... I want it so it simply opens a completely new window within flash which I can close... the reason for this is I have a SWF file which is protected and i cant create a back button within it... so I need it to open a completely new window so i can get back to my main page..
I have an Intro with two buttons for language. When you choose the language, it shoul open de spanish site or the english site.How is the script for opening the a .swf or .html?
i have made one aplication in flash and i want to add a button to open one doc file that is in the same dir. this will not to publish for web is for a aplication on a cd rom.
function main9Click(event:MouseEvent):void { var main9URL:URLRequest = new URLRequest("N:ICTNationalsUnit 2PagesCars"); navigateToURL(main9URL, "_self");[code]....
I need to make it open so when you click on that button it opens the file
I am currently struggling with an error which is occurring on what should surely be the simplest of tasks. All I want to do is open a text file but I constantly get the following error: Error #2032: Stream Error
After searching the web for over an hour I just cannot find a solution to this problem. My conclusion is that I have a security issue and the error is occuring because I do not have permissions to access the file
The code is as follows:
import flash.events.*; import flash.net.*; function dataChanged(event:Event):void
I tried to search this forum but its goes to a blank white page??Anyhow I'm trying to open a remote text file, the code below works locally I need to make this open from a remote server with a specified URL.
Ext_text = new LoadVars(); Ext_text.onLoad = addText; Ext_text.load("ContactUs.txt");
I have attempted to have a hyperlink text using actionscript:
[Code]...
when I run the code it always creates a new window to open up the file in. I have even attempted to switch out _self with _top, _parent, and _blank, always with the same result. I simply want the file to open up in the same window.
I'm developing Flash for a CD.I want to create a button for the user to click and then have a choice to save or open file (like PDF or Word file).
i have the following code: Code: myButton.onRelease = function() { getURL("abc.doc"); }
I can't see anything wrong with the above. I intend to use the code for a CD ROM.abc.doc will sit on the CD ROM. When I click on the button, it opens a browser window and tries to go to google.com.I had it working the other day.
Structure: There is 1 main file that loads external SWF files depending on what is clicked on.One of the external SWF files loads its text from external text files. This works fine when viewing the SWF applet on its own. But when viewing as a whole site, the text doesnt appear. Very annoying.I made that particular SWF on my mums computer running Flash MX 2004The flash file itself uses the Scrollbar component from MX.Could someone tell me why the text doesnt load in this scenario? It runs fine on its own, just not as an external SWF.