ActionScript 2.0 :: Flash8 Import Txt.file - Know When Updated
Apr 16, 2009If I use an imported txt-file in my flash-move. Is it possible for flash to see if it has been uppdated ( last time saved ) the last five days?
View 2 RepliesIf I use an imported txt-file in my flash-move. Is it possible for flash to see if it has been uppdated ( last time saved ) the last five days?
View 2 RepliesI`m using flash cs3 for my works , but i have one problem!when i use File=> Import=> Import to Library... or Import to Stage...the flash environment becomes terminated.I changed my flash version to CS4 and I have this problem again.
View 2 RepliesI'm trying to import some variables set up in a .txt file. However the variables that I would like to behave like numbers are not doing so.
I have a variable in the text file called "&middleimg=1" when I pull this in and say do the following:
Code:
var numvar:Number=0;
numvar = _root.myvars.middleimg+1;
I get "11" rather then "2" as the result. I tried setting up my text file as such: "&middleimg:Number=1" but get an "undefined" result. Is there anyway to get imported variables to behave like a number instead of a string?
Well im using this code
loadText = new LoadVars();
loadText.load("price1.txt");
loadText.onLoad = function() {
[code]....
And this text in my text file
chain=�200&axe=�100&sledge=�125
Now the first Chain variable will load, But the other two wont...Ampersands are there, i removed the pound signs at one point thinking that was a problem. But it wasn't so now i am completly stuck.
I want to import a external textfield ( called text2 into a created textfield inside a movieclip. But fo some reasons it doesn�t work. I can�t see the text. but I load an image inside a mc and that work.
stop();
///create a movieclip////
this.createEmptyMovieClip("info",1);
info._x =270;
[code]...
This seem like a silly question but as far as I've found: It's impossible to reload an xml file from a remote location while the SWF is running.
For example, I have a kiosk project that will run 24/7 (with a restart each night). I have an "calendar events" loading off an XML file that I want to keep on a webserver so I can update the kiosk by editing the XML file. However, the SWF caches the first XML file and keeps reusing it. I'm testing this by triggering a function that reloads the XML file with a button click.
I found trick that concats a unique ID to the file name which prevents using the old file but that means I'll have an ever growing list of XML files in the Temporary Internet Files folder.
I have a MovieClip which is just a progress bar animation with about 100 frames. Then I load a zip file using a URLStreamLoader and subscribe to the ProgressEvent.PROGRESS event. After loading starts I receive notifications correctly and I set the bar's corresponding frame using gotoAndStop(). Everything seems to work fine except for the animation not being visually updated.
It seems that the scene won't refresh until the zip file is fully loaded.
I'm experiencing a major setback as i cannot get this to work at all. I'm using the scrollpane component so all textfields must be in a separate mc, and should be displaying vars from an external as file. I have an import set up on the first frame of the main timeline and all the references inside the main timeline are correct:
Code:
import Variables;
var variables:Variables = new Variables();
the problem starts when displaying data onto the tf's inside the mc, which all return as their initial hardcoded values (not reflecting any changes made throughout the game) I use the code above for the import inside the mc aswell (coz i dont know any better) but it's as it creates another instance of variables.as to use within the mc only. If i change values within the mc's code they'll reflect but that's not what im looking for at all.
So my question is, is there any other way to import an external as file inside a movieclip to reflect the changes made to the values on the main timeline? Do i import it in a different manner, or approach it from a different direction, save its contents just before going to the frame containing the mc?
How do set up my Actionscripts so it can load a dynamically updated XML file? As you can see in the code below, I am able to load two items from my XML file; however, my XML file will be updated with more items to the list. Will I have to go back into Flash and hard code that in if I want Flash to read additional items.
Code:
var req:URLRequest=new URLRequest("applications.xml");
var loader:URLLoader = new URLLoader();
var list:XML;
[Code].....
I would like to have flash (as3) to save a var to a text file located on my server so everyone can reach it from their client swfs. I also need to know how to update this variable by loading latest var on the server and writing over it with a new updated var I've read so much already and it all seems so confusing[URL]
View 6 RepliesI would like to have flash (as3) to save a var to a text file located on my server so everyone can reach it from their client swfs. I also need to know how to update this variable by loading latest var on the server and writing over it with a new updated var.
[URL]
I would like to, whenever I feel like it, be able to load that var and replace it with something else.
edit: has to use "w w w" instead of "www" as it told me I needed to have made 50 posts to be able to post links, and I've only done 19 so far
I will be trying to obtain data from a periodically updated xml file. As far as I know, this file will simply continue to have data added to it indefinatly. Is there a way to load only the newly added data to the xml object? As opposed to loading the entire xml file each time I want to update my flash movie with new data added to the xml file?
View 3 RepliesI would like to have flash (as3) to save a var to a text file located on my server so everyone can reach it from their client swfs. I also need to know how to update this variable by loading latest var on the server and writing over it with a new updated var.I've read so much already and it all seems so confusing [URL]
View 1 RepliesI am working on a project which there are two .swf file play side by side simultaneously. I need to use one of the file to control the animation in another file.
If they are in same .swf it should be easy. I can just use:
gotoAndPlay("frameNumber")
but there are two .swf now. (lets say movieA and movieB) I think I should use something like:
"LinkToMovieB".gotoAndPlay("frameNumber")
"LinkToMovieB" should be the link to movie clip in the movieB file.
my problem is how do I get the link to movie B's movie clip. or there is other proper way to do this task.
Created an mp3 player that works fine, but i need the track name, artist name, track timer, to be shown aswell?and i dont have a clue how do go about doing this.
View 2 RepliesAnyone can show me how to insert or import a swf file into fla template file.I have a temple FLA file open and after import a SWF file , run test and the swf is not working.
View 2 Repliescan i import vector graphics file *.ai file(illustrator generated) into flex3 ??
View 2 RepliesI'm trying to insert an SWF flash file (a game) into another Flash file. However, when I import the swf file into the library and drag it onto the frame (and insert the stop(); command onto the frame action to stop it playing the whole movie), the SWF file plays constantly, ignoring all the actionscript and button commands in the game SWF file.When I try inserting it using the Window component, the game SWF refuses to play at all - it just stops (clicking buttons in the game work, but it goes-to-and-stops instead of go-to-and-play like it's supposed to do).When the game SWF is played by itself (by just double-clicking to open it from Windows Explorer or embedding it in a web page), it works fine.
View 2 RepliesWhat do i specify in the "Source" field? Must it be the FLA file of the SWF file i'm importing? Or can it be left blank?
View 6 Repliesi want to import a swf-file into my flashfile. i wrote the actionscript loadMovieNum("mymovie.swf", 10), but the movie is at the wrong place! how can i place the movie at a specific postition? can someone guide me? i am a newbie to flash and actionscript.
View 14 RepliesI am creating a new site using Flash 8 AS2, I have a question but im not even sure if its possible. I have created (for arguments sake) Main.swf which is made up of a logo, music player and a main window, this main window is a MC called content (content_mc). This loads external SWF files into it.
At the moment when the main.swf file is accesed it automatically fades content_mc window to black then fades back out to display a swf file called 'door.swf' that all loads fine and heres my question --- within door.swf there is a button (door_btn) what i want to happen is when door_btn is clicked I want it to look at the action script listed under the main.swf file and fade out content_mc (currently displying door.swf) then fade back in with the a new swf file i.e room.swf.
So the main.swf file has no buttons on it, all the buttons will be displyed within the swf files loaded into the content MC, when any of these buttons are clicked I want the Main.swf to perfom the transition and disply the new swf file, is this possible ?
The code im using at the moment is as follows: In Main.swf i have a content_MC and transition_MC
Content_mc
Code:
onClipEvent (enterFrame) {
if (!loaded && this._url != _root._url) {
if (this.getBytesLoaded() == this.getBytesTotal()) {
[Code]......
I know ive got to put some code into the external swf files but i dont know what ?
I am designing a website. My flash file comes up to a size of 1.5 mb. It takes around 1 minute to load.reduce the file size.
View 1 RepliesI tried to import a class in a .as file and I had strange behaviors that I cannot explain. First of, I tried to get work a senocular class by importing it locally his script in the same directory of my main .as class.
package{
import flash.display.*;
import flash.net.*;
import flash.events.*;
import duplicateDisplayObject;
There was no error returned from the compiler saying not found but there was one telling my class is still undefined as when I try to make the class work. (possibly undefined method). So I did it with the old fashion I found in some demos, placing the .as file in a com/senocular/display/ folder:
package {
import flash.display.*;
import flash.net.*;
import flash.events.*;
import com.senocular.display.duplicateDisplayObject;
And then no errors. The compiler recognize the class and execute it.
My supervisor is interested in showing certain data within a dynamic map and this data must be fed from an Excel file. I was thinking I may have to use some service to convert the XLS to a CSV file, but if there's a direct way to do it with AS3 I can skip that step. The Excel file will be updated regularly. Eventually, she wants this movie to allow her to modify the Excel file as well.
View 3 RepliesHow do I import a flash file? For instance, I've downloaded some .swf advertisements off the net and want to import them into flash 8 to see how they work.
View 1 Replieshow do I import a .as file into my .fla, I believe they have to be the same name, right?Also, is there any good tutorials that you know of that would talk about creating a particle engine?
View 2 RepliesI have problem with Flash CS3. How can I import swf into flash? I cannot imported in the normal way.
View 1 RepliesI have a loop which duplicates a MC ('news_list')on the stage and places it underneath the most recent clip...
code:
for( i = 0; i < total; i++)
{
var news= news_list.news_item.duplicateMovieClip("news_item" +i, i);[code].........
I have a text box inside the MC which autosizes depending on how much text is inserted from an xml file. This should then obviously increase the height of my 'news_list' movieclip.What I want is for the next instance of the 'news_list' MC to be placed directly underneath the current one,no matter the height of the clip.Currently,I can only get it to position a specified distance below the current instance.The code above is what I've currently got,but I can't quite grasp how to grab the height of the current instance, and then use that in the code to place the next instance below it...
I have a number of different swf files that all have a score variable. I was wondering is it possible to save this variable into an external file and be able to load these variables in a different swf?
View 3 RepliesI need to create two combo boxes that are populated by an XML file. In the first combo box there are 13 choices and depending on what the user selects I need to populate the second combo box with the correct information. Now I can create the first combo box just fine but when I try to dynamically create the XML file name for the second combo box it doesn�t seem to work. What I am doing so far is taking the data from the first combo box and adding the quotes and .xml with this piece of code:
PHP Code:
pModCombo = '"'+event_obj.target.selectedItem.data+"Combo"+".xml"+'"';
pModComboXML = new XML();
pModComboXML.ignoreWhite = true;
pModComboXML.load(pModCombo);
If you trace that code it creates the file name just fine however the xml file will not load. If I replace that code with the normal xml code like this:
PHP Code:
pModComboXML = new XML();
pModComboXML.ignoreWhite = true;
pModComboXML.load("new.xml");
The second xml file seems to load just fine. However, if I create an if statement with all the different xml file names I will have to update the swf every time I add a new choice in the first combo box. So my question is does anyone know how to dynamically create the xml file name?
PHP Code:
pmComboXML = new XML();
pmComboXML.ignoreWhite = true;
pmComboXML.load("brands combo.xml");
[code]...