ActionScript 2.0 :: [FL8] If / Else Loop Fails When Loading Variables From .txt File

Jul 18, 2006

I am trying to load two variables from a text file testi.txt Heres my file (test1=here is some text&test2=OK)I have no problems loading test1 -part to dynamic text field but the second variable (test2) is giving me troubles.

[Code]....

View 5 Replies


Similar Posts:


ActionScript 2.0 :: Loading Variables In A Loop?

Apr 26, 2002

I've a .txt-file containing variables. The variables are structured like this:

aaa_301, bbb_301, ccc_301
aaa_302, bbb_302, ccc_302
...

[code]....

View 9 Replies

ActionScript 2.0 :: Loading Data From XMl File And Uses It To Run An If Statement. If Statement Fails?

Oct 10, 2008

The Flash movie contains 2 Text files, one Component button, and 1 component checkbox.The purpose of the application is to load an XML file(works)Populate 2 text fields with information from the XML file(works)Compare the two text fields, if they contain the same information then the checkbox, via AS is told to be selected. (Heres the problem);

Heres the code:

Code:
runCode_btn.onPress = function() {
data_xml = new XML();
data_xml.ignoreWhite = true;
data_xml.onLoad = function(success) {

[code]....

The idea behind this app is that its an electronic form. The user fills it out, the information is then sent to a newly created XML file, months later the open the XML file in flash, and Flash fills out text fields and check and or unchecks Checkboxes based on the XML data.CheckBoxes are mandatory.But I don't see how I'll be able to use them if i can't create and condition statements based on the loaded Data.

View 1 Replies

Multi File Preloader - File Start Loading Files But Does Not Loop?

Jan 6, 2010

what I'm trying to do is make a preloader that will preload about 20 external SWF files before it lets you get to my main file. I want to do this because my main file needs the SWFs to be ready to go once its done loading. I have looked around and i found a few ways to do this with the "if (loadedBytes>=totalBytes)" and the code loops back till the files are done loading... this would be just what i need but i cant seem to get it to work. the file just seems to start loading my files but does not loop and just runs the time-line even once i state what frames i want it to loop.

View 6 Replies

ActionScript 2.0 :: Js Window.open Fails When Passing A Lot Of Variables?

Aug 3, 2005

I need to pass a lot of big variables to a browser window, but that window must be opened with Jscript, so it haves fixed size, no scrollbars, no menu and so on.Well, the Jscript window.open fails when i pass too long variables or too many of them. (I think it's for the querystring length, seems to be ok if I pass less variables or shorter ones);here it's my code

on (release) {
/*set lot of variables to send*/
jid_artista = _parent._parent.ida;

[code].....

View 7 Replies

ActionScript 2.0 :: Loading Variables From PHP File?

Nov 13, 2009

I am currently helping make a project which needs to load variables from a PHP file into Flash. What I want is the flash movie to go to a frame if the PHP variable in the PHP file equals some text, say "hello".For my PHP file I have this:

Code:
<?php
$dataForTxtbox_1 = "hello";
print("&name1=$dataForTxtbox_1");
?>

I have tried several bits of actionscript, but with no luck. Basically, I want the movie to go to a frame if the variable in PHP equals "hello". Which it currently does, I have tried using the if statement in several ways but with no luck.

View 0 Replies

ActionScript 2.0 :: Loading Variables From A Txt File?

Oct 24, 2002

I'm trying to load some variables dynamically from a text file, when a button is pressed. They will not load on first press , but on second or subsequent presses they will.

numCatalog=0;
portf4.onRelease = function() {
loadVariables("images/cg.txt","");
trace(numCatalog);
};

View 1 Replies

ActionScript 3.0 :: Dynamically Creating TextFields - When I Copy The Code Into The Loop It Fails?

Oct 15, 2009

I'm currently creating an app which allows users to select blocks of text from a List and dynamically create a TextField on the stage.I'm calculating the height of the TextField and positioning the next TextField beneath.I'm also recording the total heights of the TextFields so that I know when the total height exceeds the available height, at which point I move the x position and reset to y position to zero.

When the next TextField will exceed the available height I want to split it into two, so I'm calculating the remaining height, making the TextField.height into the remaining height.when I try to get the position of the last visible line.If I have the TextFieldAutoSize as LEFT, then I can dynamically generate the heights of the TextFields.For the final TextField in the column I need to set TextFieldAutoSize to NONE so I can change the height of the TextField. i.e. I don't want it to autosize.However, bottomScrollV returns the total number of lines, not the last visible line.

I can create the required behaviour in a separate doc but when I copy the code into the loop it fails.Here is the code.

Code:
public function buildTextFields() {
3 columns (I'm calling them TextBlocks)
// so the first is 0;[code]....

View 1 Replies

ActionScript 3.0 :: Loading A CSV File And Accessing The Variables?

May 6, 2009

I'm new to AS3 and dealt with AS2 before (just getting the grasp when the change it). Is it possible in AS3 to load an excel .csv file into Flash using the URLLoader (or ???) and the data as variables?I can get the .csv to load and trace the values (cell1,cell2,cell3 but I'm not sure how to collect the data and place it into variables. Can I just create an array and access it like so.... myArray[0], myArray[1]? If so, I'm not sure why it's not working.
 
I must be on the completely wrong path. Here's what I have so far..

[Code]...

View 2 Replies

Actionscript 3.0 :: Loading Variables From Text File?

Apr 20, 2009

the variables from the text file are loaded in swf and in dreamweaver the swf throws an error

Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.
at Error$/throwError()
at flash.net::URLVariables/decode()
at flash.net::URLVariables()
at flash.net::URLLoader/onComplete()

I understands this is because of flash player security and need to place crossdomain.xml file. but the my doubt is where to post my crossdomain.xml file in the local machine(to check the swf) and also in my website for the rest.

View 1 Replies

ActionScript 3.0 :: Loading Variables From Text File

Apr 21, 2009

I want to get some leaders name from text file as variables using URLLoader.load() the application is working fine while testing TestMovie from flash but it's not working in html page and throws the following error even i read articles about crossdomain policies.;[code]

View 2 Replies

ActionScript 2.0 :: Loading Variables From A Text File?

Jan 28, 2009

I'm trying to load a single string from a text file, but I can't seem to get it to work.Code (Placed On Top Level):

PHP Code:
var Items:Number = -1;
var variable:String ="test";

[code]....

View 1 Replies

ActionScript 1/2 :: Loop Fails To Execute Code But List Of Commands Works - Baffled?

Jan 19, 2011

I've got 13 movieclips that all run a function (setNames) contained in a child object (namer) it contains. The function displays text in a dynamic text boxI've set them up with the instance names mark0 > mark12 so I can target them with a loop and array notation which is something I often use. But the loop sometimes doesn't work, however a list of 13 separate lines of code works fine. Am I overloading Flash with too much code commands at once, and is there a way around this?This doesn't work...

for(i = 0; i<13; i++) {
//sets names
this["mark"+i].namer.setNames();

[code]......

View 4 Replies

ActionScript 3.0 :: Dynamic Loading SWF File Getting Slower After Two To Three Loop

Aug 1, 2011

I am running 3 swf files for loop. Problem is after compiling the flash file swf file is getting slower and slower after two or three loops and stopping with one content finally. I don't know why it is happening my guess is "due to memory increasing causing flash file to slower".

package com {
import flash.display.Sprite;
import flash.display.Loader;
import flash.net.URLLoader;
import flash.net.URLRequest;
[Code] .....

View 5 Replies

ActionScript 3.0 :: Loading An External Swf File And Passing It Some Variables

Oct 30, 2010

I'am trying to load an external swf file and passing it some variables. He is my code:

[Code]...

When i load a simple swf, it work fine, but when i try to give him some variable it does not work anymore.(i'am also muting sound)

View 1 Replies

ActionScript 3.0 :: Loading Variables To A Batch File And Then Executing It?

Sep 18, 2009

I know you can run a .bat file through flash , but can you "load" a variable from a text box in flash ( for example a URL ) to a .bat , and then run the batch file ? have an input box in flash , enter a URL , and then , through a batch file , open this URL in multiple browsers.

View 4 Replies

ActionScript 2.0 :: Loading N Number Of Variables From Text File

Nov 6, 2005

I need a AS that will load n number of variables from a txt file, which will have string values assign to them, and then in fla, it will fade in - wait - fade out in a dynamic textbox all of them one by one, and at the end it will loop it. I know how to do certain parts of this code, but I am not really good with array's yet.

View 12 Replies

Ampersand - Loading Variables From External Plain Text File

Sep 25, 2009

I have a Flash movie that loads variables from an external plain text file, that a client updates themselves (from a web site which generates the file). A problem occurred when they used an ampersand symbol in the text field. Is there a way around this? I haven't seen a way to escape it that works.

View 4 Replies

ActionScript 2.0 :: XML Loading Fails 1st Time?

Nov 13, 2009

I have a flash file that loads 3 straight XML files, one after other.And in every single code I have the sucess condition, like this:

ActionScript Code:
if (success){
doRightStuff();[code].........

Later, I added a function and an Interval to do the verifying:

ActionScript Code:
goBack = function () {
gotoAndPlay("untilItWork1");[code]..............

Didn't work also. Las try was a completely stupid addition: a variable counter that increased it's value 100 times (doing the XML calling and loading everytime), to check if the problem was some delay issue. 5 minutes later, it didn't work also.The second time I load the f**king page, it works like a charm.

View 1 Replies

ActionScript 3.0 :: Loading AS2-Content In Fails

Dec 7, 2010

I have a SWF-Movie written in AS2(I call it AS2-Bridge), which loads another SWF2-Movie. Now if I run the AS2_Bridge.swf everything works fine.But if I load the as2_bridge into the as3-movie - then the as2_bridge fails to load the other content.[code]

View 3 Replies

Flash App Loading Crossdomain.xml From App Server Fails?

Aug 2, 2011

I'm writing a web application using three tier architecture. I have three Amazon EC2 ubuntu servers. The first server handles the presentation of the application and includes my main flash file. The second EC2 instance represents my application server. It contains the AMFPHP files and corresponding web services. Finally, the third instance handles persistance and is running a MySQL database. Both the presentation and application servers are running an apache web server. I created security groups specific to each tier such that the presentation layer will accept all incoming traffic on port 80 while the application layer will only accept incoming traffic from the presentation server. This should allow anyone to request my web application from the presentation server but prevent anyone from accessing the web services on my application server.My flash application cannot make web service calls to my application server. When a request is sent, I never receive a response from the server and eventually receive a security sandbox error.[code]It seemed odd that I wasn't receiving a response, so I decided to try a couple of things:

1. I connected to my presentation tier via ssh and attempted to use lynx to connect to my application server's gateway.php. I was able to connect without any problems.

2. I used Chrome's developer tools window to observe network traffic when loading my site. I found that it is attempting to load the crossdomain.xml file (which resides in the root of my web server [/var/www] on the application tier) using a GET request; but strangely, it times out and fails. This is where I am confused. How come I can use lynx on the same machine to connect to the web server on the application tier but yet the flash app can't access the same file?

While running some tests, I decided to open up the application server instance's firewall such that it can receive http requests from my IP. As soon as I did this, the application being hosted on the presentation tier immediately began working (Received a response from the web service)! However, this means I would have to force my application tier to accept http requests from the internet in order to work, which is not something I want to do. I don't understand why making this change would allow the application to grab the crossdomain.xml file. If the application server's security group is set to accept incoming http requests from the presentation security group, it should have no problem acquiring the crossdomain. xml file residing in the web server root of the application server right? I've spent more time than I would like looking into this issue. I really would like to setup a three-tier environment for my application in which the flash application will be able to send web service requests to my application layer. The most confusing part about this is the fact that when I add my computer's IP address to the application server's firewall, everything seems to magically work as intended. Please correct me if I am setting my application up in the wrong way. I am basing my architecture off of the following:URL..

View 1 Replies

ActionScript 1/2 :: FlashPlayer10 To Run Slowly - Loading Variables From A Text File To Populate An Array

Feb 15, 2010

I'm loading 6 variables from a text file to populate an array, then using setInterval to populate two textfields every 5 seconds. IE7 gives me the "A script in this file is causing Flash Player 10 to run slowly do you want to abort this script?" It runs fine locally, but when I upload it, it won't work. Files are in the same folder in each case. Here is the entire script.

[Code]....

View 2 Replies

ActionScript 3.0 :: Array Of Variables - Make A Bunch Of Variables From A For Loop

Feb 21, 2009

How can I make a bunch of variables from a for loop. for example for (var i=0; i<total; i++) {var bunch(i);}. that i make a bunch of variables named bunch1, bunch2, bunch3. I keep getting errors. I program and use so many different languages that I dont know if that can be done with AS3. my only other alternative i can think of is to create some sort of event dispatcher object array. but I dont know how to get them all to send events to one listener with there index number.

View 5 Replies

ActionScript 3.0 :: Accessing Loop Variables Outwith Loop

May 5, 2011

Say, I had a loop in a function...

[Code]....

How would I refer to a in another function

View 8 Replies

Professional :: Flash CS 5.5 - Loading Recent Item Fails

Dec 22, 2011

Flash CS 5.5 (11.5.1.349)
Mac OS 10.6.8

Situation: Work on a file, save it, and close it (example file is stored on local drive). Attempt to reload the file using the recent items list from the splash screen:
File does not load, and output screen message appears:
The following JavaScript error(s) occurred:
Cannot find file /Volumes/users/mt/Desktop/Working Files/TMK2079_HI/Flash/TMK2079_HI-SQ.fla.
This is the file just saved by Flash... and it cannot locate it. I can browse with File > Open, so it is not a critical work loss or stoppage issue, but it is annoying that it happens. It only seems to affect Flash as InDesign, Illustrator, and Photoshop behave as expected with the recent files. It seems to be able to find files saved to a network location, but not to the local machine (in this case a folder on the desktop). I tried renaming the "Working Files" folder to remove the space, but the issue persists. I tried a search but didn't get any hits that seemed relevant.

View 4 Replies

ActionScript 3.0 :: Loading External Swf Fails With Stage Access?

Mar 2, 2009

My problem is simple and annoying:

I have two swf files, where one (lets call it A) is supposed to load and display the other(B).

The first swf (A) is using the Loader class in AS3 to load the other. In fact the loading code in A is an exact copy of the Adobe example code from the livedocs for Loader.

The other swf (B) just spins some meaninless graphics in a loop, and has a document class that has one line of code in its constructor:

trace("B's stage is: " + stage);

When I start swf A, the loading of swf B starts fine. The progress is reported as traces all the way up to 100% before swf B's constructor is called and the following is traced:

B's stage is: null

THEN the complete handler is triggered (yes. AFTER the constructor was called for B with no stage).

The problem is that I really need B to have a stage for my project to work, as I will actually use stage, instead of just tracing it. I have really tried everything to get this working. Is there no way so soothe B into having a valid stage before its constructor is loaded?

[URL]

View 4 Replies

Flex :: Loading A Module Fails The First Time Load() Is Called, But Succeeds After?

Jul 19, 2011

I have a Button that when clicked loads a Flex module in my AIR application. However,occasionally the Module fails to load the first time the button is clicked, but it works the second time it's clicked. When I debug it in the debugger the READY event is not fired so the remaining logic is never called.

var moduleInfo:IModuleInfo = ModuleManager.getModule(managedModule.url);
moduleInfo.addEventListener(ModuleEvent.READY, function(event:ModuleEvent):void {
trace("ModuleEvent.READY called.");

[code]....

View 2 Replies

Actionscript :: Local Loading Of Images In It Fails In A Browser Works In Flash Player

Apr 6, 2012

When I run the flash player (from flashdevelop) the images are loaded and everything is fine.But when I run the swf from a browser the requests are sent (using chrome's tools for programers - network tab) but nothing is loaded. The size/content column shows 0/actual size of the file

View 1 Replies

ActionScript 2.0 :: Import Some Variables From A Txt File And Treat Them Like Normal Variables In Fla File?

Oct 27, 2009

How can I import some variables from a txt file and treat them like normal variables in fla file? something like in txt file

Code:

&variable1=2&
&variable2=8&

[code]...

View 2 Replies

ActionScript 3.0 :: Fails To Save The File To The Server?

Aug 20, 2009

I have AS3 browsing using the .browse().it then sends to my PHP script and that should be fine.The AS3 tells me that it is working.The PHP tells me that it is receiving the file.So there should be no problem.... But it seems to think that the file I am trying to upload already exists and then it fails to save the file to the server. When I use HTML instead of .swf it works fine.My PHP works fine when I interact with it using HTML.So my AS3 looks like this:

[AS]package
{
import flash.display.Sprite;[code]......

When I use the .swf it writes "PHP file alreadyExists" into the log.txt and there is no files in the upload directory what so ever (and the browser cache is clear)When I use the .htm it writes "File move" into the log.txt and copies the file

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved