ActionScript 2.0 :: If Statement On Blank Data From XML

May 11, 2008

it worked once but stopped working when I added more information into the XML database. Anyway, I have a section of my xml that has a URL it pulls in, but for some, there's not website to link to so I wanted to leave it blank. In XML, it looks like this: <url></url> I have my statement set up in the following code. The else statement works fine, but the if statement calling for nothing doesn't. Here's the code:

[Code]....

View 1 Replies


Similar Posts:


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

Media Server :: Xml.send() Sending Blank Data?

Sep 22, 2010

I am attempting to send XML data to a PHP script from my server-side app using the following code:
 
var my_xml = new XML("<highscore><name>Ernie</name><score>13045</score></highscore>");  my_xml.contentType = "text/xml"; my_xml.send("http://www.server.com/temp/fms_post.php");
 
I am logging anything that the outside server receives at $_REQUEST, $_POST, $_GET. I can see that my server-side app is reaching out to the external server, but the data is always blank.

View 3 Replies

ActionScript 2.0 :: Dynamic Text Fields Are Blank After Loading Data?

Aug 19, 2006

In my AS I load XML data into an array for titles which will be used later in dynamic text fields. I trace this, all of the titles load fine into the array. I use a for loop to attach a movie which has a dynamic text field inside of it. The movie attaches just fine, in a verticle menu just like I want it. The dynamic text field has the right instance name inside of it. I set the text field instance name to the array, but it didn't show anything in the text field. I knew it was there since it was Selectable and the selection cursor pops up whenever I hover over where it should be. So I create a string variable like so to try and go around whatever is messing it up:

[Code]...

View 2 Replies

ActionScript 1/2 :: Get Incremented Xml Data In A For Statement?

Aug 9, 2011

I am importing data using xml and getting incremented data that looks like this

peopleObject.name0
peopleObject.phone0
peopleObject.image0
peopleObject.name1
peopleObject.phone1
peopleObject.image1

And now i am trying to use that information using a for statement but i do not know how i can add the incremented number at the end. I tried to add a "+i" like this

[Code]...

View 3 Replies

Data Integration :: Checkbox Statement Using Variables

Aug 24, 2006

Using Component Inspector, I can control input dynamically. But I can't find a way to control checkboxes.

[Code]...

View 5 Replies

AS3 :: IDE - URLLoader Data Not Being Recognized By Conditional Statement?

Jun 1, 2009

I am loading data from php using the echo method into flash via the URL loader:URLLoader method. The data then gets assigned to an objectMy problem is that the loaded data is being imported in fine and I can trace it and even display it in a text box, but if I try and use this data in a conditional statement - the statement just won't recognize its value?

My PHP---v
$row = mysql_fetch_array($query);
echo "result=success";

[code].....

View 1 Replies

ActionScript 3.0 :: URLLoader Data In Conditional Statement Not Recognized?

Jun 1, 2009

I am loading data from php using the echo method into flash via the URL loader:URLLoader method. The data then gets assigned to an object.My problem is that the loaded data is being imported in fine and I can trace it and even display it in a text box, but if I try and use this data in a conditional statement - the statement just won't recognize its value?[code]My problem is in green above. The variable/data being imported in is indicating which measuring unit the user preferred - "inchs" for inch's or "cms" for centimeter's.The statement never seems to recognize this data and always proves false and 'else' is executed.However if I instruct the data to be displayed in a text box eg."display.text = n.unit;" The text box displays the correct result as if the data has came across fine?

View 3 Replies

ActionScript 2.0 :: First Requirement Of The If Statement When Type In The Proper Input And Go Straight To The Else Statement

May 14, 2009

Having a few problems with what I thought was a simple if statement. Here is the code:

[Code]...

I can't quite figure out the small problem with the code. It seems to just bypass the first requirement of the if statement when I do type in the proper input and go straight to the else statement.

View 7 Replies

ActionScript 1/2 :: Execute Code In Previous If Statement If Second If Statement Is Executed?

Aug 31, 2011

if (variable == 1){
//code
//Execute this code.
} else if (variable == 2) {
//code

[Code]...
 
I dont want to copy the code from the first into the second and the first and second into the third.
 
My mind isn't working and there is probably an extremelly simple way to get this working.
 
I know I could used functions but for some reason it stops the instance referencing working: _root["bullet"+j] doesnt work in a function.

View 7 Replies

ActionScript 2.0 :: If Statement Inside If Statement Won't Work

Mar 30, 2011

why this code won't work

[Code]...

I'm sure you can put if statements inside other if statements, seriously I can't figure it out

View 4 Replies

ActionScript 3.0 :: Another 'if' Statement Inside An 'if' Statement?

Sep 22, 2010

I need to write an if statement inside an if-else statement. But no matter how I write it it keeps giving me a syntax error.The syntax error is "1083: syntax error: else is unexpected".[code]No matter how or where I place the braces, it keeps giving me errors.

View 13 Replies

ActionScript 3.0 :: Use A For Statement To Create An If Statement

Jul 12, 2010

what I'm trying to do is create an else if argument for each object in an array based on a user set number

Code:
for(var i:int=0; i < numberOfElseIfs; i++){
GENERATE AS3 CODE
}

to which I want it to GENERATE THE FOLLOWING CODE:

Code:
}else if(baskets[i].used == false){
baskets[i].used = true;
drawButton(i);
}

the problem is obviously that the compiler reads this code rather than understanding I'm trying to regenerate the code within the for loop...does that make sense :S? So basically I need as3 to read the code between the for statement as if it is going to echo that out later. Is this even possible?

View 4 Replies

ActionScript 3.0 :: Write Another "if Statement" Inside Another If-else Statement?

Sep 22, 2010

I have a script which is giving me a lot of trouble since I have no idea how to write another "if statement" inside another if-else statement. I keep getting errors, I guess I don't know where to put the braces exactly...

example:
if(bla == bla) {
<------------how would I write another if statement here?
}else if (bla == bla){
}

View 3 Replies

Flash :: "IF" Statement, Within A For Statement, To Control Movieclip Within Movieclip?

Dec 18, 2011

I have a movieclip on the screen called "mc_bg". Within this movieclip are 7 movieclips called "barrier1" through "barrier7".From main.as I want to be able to do this call:

for (var i: int = 1; i < 3; i++ ){
trace("got here")
trace(mc_bg["mc_barrier" + String(i)])

[code]....

View 1 Replies

Flash8 :: Blank When Exporting To .avi?

Mar 25, 2009

So I made an animation a while ago and exported it no problem as an .avi. Recently I've needed to make changes, but whenever I try to export it, it is a blank video.

There is no sound, so I'm not sure whether or not that is working, but the video turns out as just a black movie with the proper length.

When I test it in flash or export it as a .swf, it is fine, only the .avi is the problem.

View 1 Replies

Swf Shows Online As A Blank Box (CS4, .xml)?

Mar 15, 2010

I'm trying to make a simple Flash application to be placed on a web site. It is intended to take data from an .xml file and display it in the Flash movie. There are a number of buttons that display different nodes of the .xml file when clicked. (Not all the buttons are functional yet in this code; I know that.)It runs just fine in Flash. It even runs fine when I publish it and then run it by clicking on the html file on my computer.When I upload the html and swf files to my server, the html file works fine (gives me a solid colored background) but the swf is just a white box, nothing in it and no functionality.Something needs to be declared, imported or linked, I think, but I do not know what or how to do it. (Most irritating is the fact that the code is substantially taken from an online tutorial, with nary a word about this issue.)

ar chineseSentence:Array=new Array();
[many other Array vars deleted for space]
var loader:URLLoader = new URLLoader();

[code]......

View 7 Replies

SWF Movie Showing Blank?

Aug 14, 2009

I have a problem with one of my swf files, for some reason is showing up blank. This is the url: [URL]

View 2 Replies

Open A Blank Window?

Jun 22, 2011

I have some script I am using for a flash menu. Each button opens to the html file and has script telling each page the down state for each button when clicked. I am trying to use the function below to open a new window and it won't work with the other scripting.[code]...

View 3 Replies

Flex :: Blank Swf After Printing From Another App?

Jun 12, 2010

where i developed an app that uses the webcam, adds an image and then takes a picture, well, i implemented textbook style the printjob, and well everytime after printing my swf goes blank. http:[url]...........But now i have been continuing testing, and i found out, that if i print from another application and then comeback, my video stream from the webcam is blank, this has no sense at all, since i am printing from another app. http:[url]....What is going on here i mean, this must be a flash player issue right.

View 1 Replies

Flash 10 :: Blank Screen Between FLV?

Jun 30, 2010

I have a playlist of flv in my pc (not on web) and when i make then to play to make a blank screen between then, that is very ugly.

How can i make this like a flow playlist to each flv play next to each other with no screen between then?

View 1 Replies

ActionScript 3.0 :: Stage Is Always BLANK?

Feb 21, 2011

I have had this problem for a week now. I keep making code but when I export to .swf it is 99% of the time blank. I do the addChild and stuff but still nothing. Here is my code:

--------------------------------------------------
package
{
import flash.display.MovieClip;
import flash.text.TextField;

[code]....

View 3 Replies

ActionScript 2.0 :: Loading SWF Into Blank MC?

Jul 8, 2005

The site im building has one blank MC container that I call the other swf's according to the appropriate link selected. If I click one link:

on(release){
this.Container.loadMovie("Mov1.swf");
}

[code]......

View 14 Replies

IDE :: Fill In The Blank Interaction?

May 29, 2009

The following are two screenshots of something I'd like to create:

Notice how each 'blank' is a drop-down menu. If a user selects the correct one the text in the drop-down becomes green and a box appears at the bottom that tells them they got it right. As soon as they go to select a new one the box disappears and re-appears with a message saying either they got the next one right or wrong. If they get it wrong it turns red. There is no backend data that needs to be processed; it's just the interaction I want to create.

how I might go about doing this in Flash/ActionScript?

I know how to create the interface itself I believe with the drop-down component but I have no idea how to program this.

View 7 Replies

IDE :: Blank Page After Preloader

Jul 29, 2009

I'm having an issue with my preloader - After it's finished loading, most of the time it goes on to the rest of the content fine. But occasionally, it goes straight to a blank page.

[URL]

It doesn't seem to happen on every browser. Refreshing the website, it happens maybe 1 out of every 5 times it's refreshed. Sometimes it works and sometimes it doesn't. It's driving me insane.

View 1 Replies

ActionScript 3.0 :: TextField Comes Up Blank

Jul 9, 2010

I have a Textfield that I have drawn on the stage. I have another TextField that I have created in AS3. The TextField I created in AS3 appears on the stage without an issue. However, I am later setting the TEXT of both TextFields to the same variable, the TextField I drew on the stage, it shows no problem, the one I created in AS3, it comes up blank. The two calls to update the text are right under each other, so the variable cant be unsetting between them (at least I dont see how it would be).

[Code]...

View 3 Replies

ActionScript 3.0 :: Just Get A Blank Screen

Apr 24, 2011

I dont get an error but nothing loads. I just get a blank screen and I have really struggled to find an example for loading an obj file. I am using flashbuilder4 AS3 project.

private function initAway():void
{
_camera = new Camera3D({zoom:20, focus:30, x:100, y:50, z:-500});

[Code].....

View 4 Replies

Possible To Add Blank URL Window Dimensions To Button?

Sep 25, 2010

I've just finished working on an extensive HD intro for my website, which is in 1280x720 resolution.

At the moment, my site has a splash page with 3 buttons on it:
B1) opens the site in fullscreen mode
B2) opens the site in normal window mode
B3) opens a new browser window linking to my intro

Here's the AS code I'm using for my intro button:
Actionscript Code:
intro_btn.onRelease = function() {
getURL("[URL]", "_blank");};

I'm wondering if there is a way to somehow specify in that code segment what dimensions I'd like the new window to have? I know this can be accomplished in JavaScript with something like this:
Actionscript Code:
<a href="javascript:void(0)"onclick="window.open('[URL]','height=1280, width=720,scrollbars=no')">intro</a>

I've already tried putting the intro on it's own separate HTML page, but because of resolution and other background contrast issues, I've found that it undoubtedly looks best in a window that is resized to its specific dimensions, rather than having extra space around the edges, top, and bottom.

View 3 Replies

ActionScript 1/2 :: Create A Blank Line?

Apr 16, 2009

I have a XML files that is being read in to Actionscript and as it runs the script and collects the results I want it to go to the next line for the next result. I am not sure how to do this. (See code). RIght now it create the items in the list like thisitem1, item2, item3, item4I want the result to be

item1
item2
item3

[code].....

View 11 Replies

Swf Runs A Blank Stage In Testing?

Dec 7, 2009

I added a bit of Action Script 3.0 code into a premade flash file that came with my website template.I wanted to link a navigation button to an external url, heres the code:

stop();
home_btn.addEventListener(MouseEvent.CLICK, gotoURL);function gotoURL(event:MouseEvent):void{navigateToURL(new URLRequest("http://www.knirv.com"));}

[code].....

View 3 Replies







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