Flex :: Variable "id" To Grab The "letters" Value From The Tag In The XML Code?
Apr 8, 2010
I've created a simple Flex application to fetch an XML file. I need a Flex variable "id" to grab the "letters" value from the tag in the XML code, then show the id in an Alert window. When I run this code now (with the full code), the Alert box is blank.When I run the application in Flex Debug mode, this is what Flex sees: http:[url]....Below is the Flex and XML code (edited to only show what's not working):
// Flex
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication ...[code].....
View 2 Replies
Similar Posts:
Mar 12, 2009
I'm trying to access Flashvars that I declare in my HTML from a SWF that gets loaded after an intro animation.
I am able to access one of my Flashvars in the opening SWF just fine, but when the next SWF loads, I'm unable to access my Flashvars.
HTML Code Snippet: Code: Select all<script type="text/javascript" src="js/swfobject2.1.js"></script>
<script type="text/javascript" src="js/swffit.js"> </script>
<script type="text/javascript" src="js/swfaddress.js"> </script>[code].......
Am I not targeting it properly?Alternatively, I've tried storing the flashvars URL in a variable in my root SWF and accessing it from the loaded SWF, but I can't seem to grab it. How would I grab a variable that is declared in my root SWF?
View 1 Replies
Mar 4, 2010
I'm starting using the CS4 version of flash, and in my codes, every word is "missing" the last letter. It's not really missing, we just can't see it, or see only half of it. Did it ever happen to you? If so, how can I fix this?
View 4 Replies
May 17, 2011
im trying to grab the instance name of something on stage, set it to a variable then remove it.
iv tried:
Actionscript Code:
var something = object1something.removeMovieClip();
that works. problem is im setting variables at runtime depending on a user click.tried this too..
Actionscript Code:
var myvar;object1.onRelease = function() {myvar = this._name;}
tracing this out reveals that it is actually _level0.object1.also tried adding the string "_level0." + object1. still dosen' work.what im trying to do is click on objects. store there instance names into an array then remove them all when i do something else. such as press space.
View 1 Replies
Jul 12, 2004
the direction, or throw me some code on how to grab a certain number of characters, or words from a variable
View 4 Replies
May 7, 2009
is it possible to script in flash so that you can have smoething like the enigma machine?ike have an input text box where you input a letter or words then have another output box where the translated work or letters would come out? and if so, can anyone provide me with the actionscript?or would i have to venture into Dreamweaver?
View 6 Replies
Jul 26, 2006
I have an xml doc that has 6 categories that are colors and 4 questions that fall under each category. My question is I'm trying to create a quiz that will grab a question/answers based on a variable between 1-6 from the (6) categories in the xml doc. But the kicker is I want the user to have to choose from a different category if the 1-6 variables are different. And I need to walk down and grab a different question if they have been to blue before or maybe just a random question from the blue or green section.
[Code]...
View 2 Replies
Oct 26, 2011
I need to append 4 letters to my variable name when referencing it to get either spanish or english XML data. I am trying to reuse my functions without writing an if statement.
like so:
//two options for
var spa_my_videos:XMLList;
var eng_my_videos:XMLList;
[Code].....
View 2 Replies
Jul 28, 2010
How do I change the application state in code, using a variable? when I provide a static string it works fine, but not with a variable.
[Code]...
View 2 Replies
Aug 7, 2009
The entire box at the top is a Flex application. The box on the left with the list of pinball machines is a VBox. As you can see, if you try to scroll with your mousewheel, it doesnt respond. The reason this is shut off is because I found that if it's turned on, when you scroll up/down, the whole page goes with it. So if you scroll down four or five times, the application goes out of sight.I tried finding a solution to this when I programmed this last year but wasnt able to find any answers.if there's a way to make Flex grab the focus of the mousewheel and not let the browser move as well?
View 4 Replies
Jul 11, 2010
I am trying to grab a webpage with actionscript, but keep getting this error
[Code]...
View 1 Replies
Jan 27, 2011
I have a parent node and I'm trying to get each child node under that parent and store it into an arraycollection? How could I go by doing this?
View 1 Replies
Mar 13, 2012
How are you able to grab the Window NT Logged User Name using Flex/Actionscript. I have worked with attaining these credentials in ASP.NET, but I am new to the realm of Flex and need some assistance
ASP.NET code looks as follows Getting the User Name : using three ways we can get the User Name using C#
[Code]...
View 1 Replies
Oct 3, 2011
I'm trying to pass the contents of variable playnoyes to the long line of code below to decide whether or not to autoplay the flash movie, but doing it as I have below, the resultant line of code has the variable in quotes and therefore the code doesn't execute it as expected. My question is, how can I pass the variable so that the resulting line of code doesn't have the quotes around the variable value.
var playnoyes='true';
var testtext = "<script type='text/javascript'>AC_FL_RunContent ('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.[code]....
View 3 Replies
Oct 7, 2010
Is there a way to embed only a few letters from a font instead of embedding the whole thing?
View 2 Replies
Mar 28, 2011
I was wondering how you can make variable code within code, for example, normally, you can use this["blabla"+variable]; to make the code say blablavariable. But now i want to make new variables by using this code, within a for loop [using teller1 as the increasing value] this["var ringsegment_mc:Ring_"+teller1+"=new [Ring_"+teller1+"]()"]; which i basically want to have say:var ringsegment_mc:Ring_1=new Ring_1();
but this doesnt work, it doesnt make a variable called ringsegment_mc. why I want to do this, is because i need to make an add child which makes 16 parts, from 16 different movieclips.
[Code]...
View 16 Replies
Oct 15, 2010
I have this line of [code]...
MOBNAME is the variable that contains the name of the monster that attacked me, and I need to know what I need to put to use the value and not the name of the variable.[code]...
View 2 Replies
Sep 12, 2003
Well basically what I want to do is have my code figure out that a variable has changed value and then call a function to store that value in my class.I have a component with a text box in it that displays a value gotten from either typing in the box or moving a slider. I then need the last value (where they stop sliding or typing) to be stored in my class
View 4 Replies
Apr 8, 2009
I've been trying all morning to figure this out but I'm really not the best when it comes to actionscript. I've looked around and I just simply don't have a clue how to adopt other code to fit my own .I have the following code
Code:
function reActivateTopMenu() {
_root.top_nav.btn1.gotoAndStop(1);
_root.top_nav.btn1.enabled = true;[code]....
I just can't figure out the exact way of writing the code in "flash" talk and not "dave" talk!
View 10 Replies
Nov 23, 2009
Flash CS3, AS 2.0 so I have an XML file containing the number 72, and this script:
Code:
var imageNumber = new XML();
imageNumber.load("imageNumber.xml");
Then later, this script:
[Code]...
The problem is, the variable doesn't carry into my second bit of code. I can add a button and use trace to display the correct variable in the output box, so I know it's getting into Flash. The problem is that it's not applying itself to the second piece of script. Triple checked that the code with by putting in the number manually and using a normal variable, only when I use the XML file as a variable does it refuse to work. I'm very new to Flash so sorry if I've left any important information out, but can anybody shed some light on this?
View 6 Replies
Dec 11, 2011
In other language I can use this kind of sentences:
[Code]....
How can achieve this? because the above code does not work.
View 1 Replies
Mar 27, 2004
I am having a big problem with some drag and drop code I am trying to write. Basically I have two lists of draggable components, the components and their symbols. The user has to drag the correct component with its matching symbol on drop area which are labelled.When the user gets the right component in the right drop point it has a counter which keeps track of which single part is in the right place.I am having trouble in making a counter which increases when two matching components are placed correctly and to decrease when either of the components are taken out of their correct place...my problem is that it will decrease when a components is just picked up and dropped back into the correct place.If anyone understands my problem and can have a look at the code below Code fr one drag object (in this case a off switch)
Code:
onClipEvent (load) {
this.dropped = 0;
[code].....
View 3 Replies
Nov 28, 2010
I run a demo code,it extends Sprite,like follows:
public class Vehicle extends Sprite{ protected var _position:Vector2D; public function Vehicle(){ _position = new Vector2D(); draw(); } protected function draw():void{ graphics.clear(); graphics.lineStyle(0); [code]....
I don't understand following code,because I only define _position and don't define position variable,why I can use position.x? x = position.x; y = position.y;
View 1 Replies
Jun 13, 2006
all I want to do is add a variable to a getURL line of code.EG:getURL("/index.asp", "_self");I need to add a variable (_root.myvariable) to the end of the link so that it goes to:index.asp?myvar=thevalueofmyvariable
View 3 Replies
Jun 7, 2010
For a site I'm developing with a user login that uses cookies to store the session ID, a separate section of it uses Flash to provide content and such. Is there some way it can access the cookies that were set the by login? The name of the cookie will not the be same every time, as it is randomly generated, as well as its value. I then need to send the name and value of the cookie back to a page on the server to do additional stuff. Anyone know how to do this? Note that I didn't write the Flash interface, an the person who did doesn't know how to do this.
View 1 Replies
Oct 4, 2006
Is it possible to add code (...html or php?) to an html link (i.e the link will be featured in an html website) that passes a variable into the flash site it links to (just something simple like '_root.pageChoice = "home3" '? So when the site opens the swf turns to a certain page?This will be necessary as there will be links to the site from different html sites and each will need to see a different version of a certain page.
View 4 Replies
Feb 8, 2010
I have 2 movie clips, one being loaded into a container MC via "loadMovie();"In the main movie there is a variable with no value, in the external movie there are 5 frames, each with a value to update the variable in the main movie.
IE: if on frame 1, global value = 1 / if on frame 2, global value = 2 / etc etc I'm familiar with passing variables INTO an external swf, but am stumped on how to do it the reverse way.
View 1 Replies
Dec 11, 2009
I would like to store a hex colorPicker value in a variable and then cast the value of the var backout to a textInput. The textInput is just to see witch hexcolor i have choosen.
thus meaning seeing 0x000000 in the textInput.
what i've done now is pretty simple i have bound the flex colorPicker directly to my textInput. but i want to store the value from the colorPicker in a var first and than spit it backout to the textInput to see the value that i have picked.
When i pick a color value that begins with the number 0 it drops the 0's at the beginning of the number and only spits out the numbers greater than 0. (000033 becomes 33, FF0000 stays FF0000). I want to catch the whole value or write some kind a function to figure out how many 0's got dropped and concatenate it together with 0x. Store that all into a var and bind it to the flex TextInput.
This is what i've got.
<?xml version="1.0" encoding="utf-8"?>
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
[Code].....
View 1 Replies
Mar 18, 2010
I have some buttons named bt1, bt2, bt3 etc
They have a common function for when each is clicked called buttonclicked.
Within the function buttonclicked, I'd like to grab the number off the end of each button name so that I can compare the number to a global variable I have called global.data.clicker
so...
if (number at end of event.target.name == global.data.clicker) {take action...
Is it possible, and if so, what code do I need to put in the first part of the if statement to make it work?
View 2 Replies
Jan 8, 2012
How to create a script of some kind to grab a still picture from a live stream and save it as a JPG file?
In this way a cron job can tricker the script and thereby grab a picture fx every 10'th minute and the picture can be shown on a website so people that are not attending can have a look into what is happening in the live stream.
View 3 Replies