ActionScript 2.0 :: Changing Values In Dynamically Generated TextFields
May 25, 2004
I have a few dynamic generated buttons, and I need on their action to change values in some dynamic generated textfields. The part of the code we're interested is this:
Code:
nr_rinduri = 20; // number caming from somewhere else
this["mc"+j].onRelease = function() {
num = Number(this._name.substring(2))+1;
nrInceput = (num-1)*nr_rinduri;
trace("NR inceput=" + nrInceput);
[Code] .....
So... : if I put codice0.text = ..., codice1.text = .... it's working, but when I am trying to do a this["codice"+contor].text = .... it's not working.... Is this because we are inside another this[] ... the one for the button and when I am referring to this["codice"+contor] the flash see that I want to do something at the button and not at the textfield...
View 5 Replies
Similar Posts:
May 25, 2004
I have a few dynamic generated buttons, and I need on their action to change values in some dynamic generated textfields. the part of the code we're interested is this: CODE:
[Code]....
View 5 Replies
Mar 18, 2011
how to compare the text of dynamically generated textboxes with xml value. the instance name to the textboxes are assigned at runtime.
View 3 Replies
Jun 3, 2011
I have a main mxml and 2 AS classes.In the main mxml I have a slider.I want to get the slider values in AS classes as I move the slider.
Main.MXML
import First;
import Second;
[Code]...
I could get the values from trace(dat)....I mean the date's as the slider changes. How could I use this changing values in function visualization()
View 1 Replies
Feb 19, 2009
Im attempting to display xml generated text in 2(or more) dynamic textfields. One textfield under the thumbnail and 2 or more textfields next to the large image that loads.Ive posted an example where I put text in the dynamic text fields just to show location and how it should work:[URL]
I keep getting undefined errors. I've made minor adjustments from the original source: [URL]I think the error might be a typo. Ive pasted the AS and you can click the link for the zip if any want to take a crack at this issue: [URL]
----------------ERROR I KEEP GETTING----------------------------
1120: Access of undefined property arrayThumb.
1120: Access of undefined property arrayThumb.
1120: Access of undefined property thumbsDescription.
[code]....
View 1 Replies
Apr 2, 2010
[Code]...
That's the correct syntax for this? I want to be able to dynamically write to several textfields that exist on the stage but have not been dynamically placed there.
View 3 Replies
Jun 9, 2009
I have 10 text fields set-up (not sure if these should be dynamic or component), below that I have 30 separate CheckBoxes setup. When a user clicks a CheckBox, it places the value of the selected CheckBox into the first TextField. The second CheckBox selected places that value in the second TextField, and so on.
View 11 Replies
Sep 2, 2010
I want to have each text identified as marketLocation1, marketLocation2, etc up to 150 and I wanted to use a 'for loop' to place the value of that XML node into each labeled textfieldHowever, the only issue is... each individual text field is buried inside a button so that the button displays on mouseover an associated XML fields data.Meaning, I mouse over a dot on a map (button) and it pulls up a statistics balloon about that location specific to our companies needs. I'm a total AS3 noob, so I'm not sure if I should be calling to the XMLdata loaded for a specific set of values on entry to that mouseover, or if I can preload the data for that button into it's specific text fields.Specifics are for the xml/flash file
Code:
<market MarketID=1>
<marketLocation>Raleigh-Durham-Chapel Hill, NC</marketLocation>
[code].....
View 4 Replies
Sep 20, 2010
Changing the highlight/selection colour for selected text in a text field? At the moment with white text on a black background it seems impossible to discern what text is selected.
View 2 Replies
Jan 7, 2004
When using the "textFormat.selectable = false", the text which I send to the freshly generated text field still is selectable. How to turn the selectivity of a dynamic generated link?
Note: .selectable is not documented in the property summary for the TextFormat object. But does turn blue in the editor.
View 2 Replies
Sep 30, 2010
I added this to my document class:
Code:
private var title_txt:TextField;
private var artist_txt:TextField;
private var myFormat:TextFormat;
myFormat = new TextFormat();
myFormat.align = "center";
[Code] .....
The problem now is that changes of myFormat (in size or color) don't have any effect on the text in the text fields. Why is this and how can I improve this? Did I forget to import a certain class again?
View 3 Replies
Dec 21, 2011
I'm working on my first real Flex app and i have learned a lot by it. Now I'm trying to understand the basics of working with classes. I have a function that asks information from the LastFm API. This is the base function:
[Code]...
View 1 Replies
Jul 1, 2009
I wish to have a 3d carousel much like a flash one in the below link : [URL] however, i wish the images to be dynamically generated and at the same time txt 'beneath' (to be added) the picture to be dynamically updated also...through a database. I wish to get it connected to a back end and probably use a content management system.
View 1 Replies
Nov 1, 2006
ok, here's the deal. We are creating an ecard that will be customized by the sender, and sent to soldiers in Iraq. There are about 5 different things that the sender can customize, as well as write a message. The goal is to have their choices sent to a database and then inserting those variables when the receiver watches the movie.Now, instead of creating possibly thousands of XML files (one for each sender), we decided it would be better to just generate the XML on the fly from the info in the db. But my question is, how do I handle loading that XML? Since this won't just be a static page on the server, I'm not sure how to go about it. I'm wondering if you can use variables when loading XML, for example:
Code:my_xml.load("senderData.xml?user=LyndaSmith");Basically, how can i create an XML file on the fly with the values from the DB, that can then be loaded into Flash?I have virtually no experience with db's, so this is the method I came up with because I do have some experience with XML. I have a developer who will actually insert the values into the database with ColdFusion, and he can also generate the XML, I just need to be able to load the dynamic XML in flash when the receiver watches the card.
View 2 Replies
Oct 4, 2008
way to remove the clips generated by the following function.
Code:
function loadClips() {
for (i = 0; i < Urls.length; i++) {
var mov:MovieClip = attachMovie("numClip", "numClip"+i,
[Code].....
View 2 Replies
Feb 26, 2009
I've been trying to write AS3 that can read xml which is dynamically generated by php.i've generated the xml in several ways all of which seem to work but i keep getting the error,Error #1088: The markup in the document following the root element must be well-formed,when i try to load the xml into flash. however the xml (as viewed when you go to "view source" in your browser) is indeed well formed.i have 4 versions of the php.the first just uses echo. the second uses echo but i wrap it in {start_ob(),ob_end_flush()}; then i use simpleXML and finally i use domdocument.[code]
View 6 Replies
Aug 6, 2011
I have a movieclip that I am adding to the stage dynamically. The movieclip has to be placed at specific coordinates to match the current text field.The coordinates that show on the INFO tab are x=264 and y= 365. However, in order to get the movieClip to match those I have to set x to 398 and y to 200.If I set the coordinates to those in the INFO tab then the movieclip does not show; it appears off stage.
View 2 Replies
Oct 26, 2006
My company has a database-driven system of web forms, each ofwhich consists of many questions in various layouts (2-columnradio, 1 column checkbox, etc). The forms are never hard-coded.Each HTTP request causes Java code to perform DB queries todynamically generate the various questions and answers.Thosequestions are then rendered through JSP and Struts tiles into HTML.The HTML also contains JavaScript functions to hide/showconditional questions on the web page based on answers to earlierquestions. Now we're trying to figure out the best way to adapt thissystem to use a Flash front-end instead of HTML/JavaScript.My preliminary research suggests at least two possibleapproaches:
1. A pre-compiled SWF could send a request with certainparameters, and the server could respond with an XML description ofthe form to build. Then the SWF could parse that XML andynamically generate the form using attachMovie for each formelement (with a lot of math to determine relative positions ofelements with variable sizes, like text labels). 2. Flex might reduce the code for placing elements, by usingMXML to describe the form structure as well as visual arrangement.I haven't used this yet, and I'm wary of Flex 2 simply because itrequires Flash Player 9 which is only at 50% browser penetration
View 1 Replies
Dec 3, 2008
I'm currently reading in data from an XML file. Each attribute of a child is assigned as a property of a movieclip as shown in the code attached. However, what i'd like to do is not have the property names already decided as i don't necessarily know how many attributes a child in the xml file will have. Is it possible to dynamically name the properties depending on what number attribute they are...?
View 2 Replies
Mar 3, 2011
I've tried to generate movieclips dynamically the method I have used does the following:
Uses a loop runs depending on how many movieclips I want to generate e
Each time the loop cycles it creating a new movieclip instance
Adds the new movieclip to an array
Uses method addChild to put moveclip on the stage then draws a rectangle
begins fill
ends fill
Adds it to that movieclip
I then use a conditional statement checking if the movieclip is the first item in the array if so it sets the current MovieClips x and y position to a chosen value. the first movieclip is used for a starting point to align the rest of the generated movieclips to. If not the movieclips x and y position are set to the previous array items x and y position + current movieclips width or height + the gap I would like them to have. Then the cycle repeats. I've coded this using timeline code and it works fine the shapes appear on the stage no errors. I tried to move this code off the timeline to an as file and the code has no errors but when run I just don't see the objects even if I trace there x and y positions I don't see them on the stage.
Timeline Code
var mcArray:Array = new Array();// DEFINE ARRAY FIRST
var randomNo:Number;
var colorStr:String;
var currentColor;
var movieClip:MovieClip;// TEMPORARY VARIABLE
[Code] .....
View 5 Replies
Nov 10, 2009
I have a Flex application which references a separate MXML file as a template for a custom component. I create instances of the component dynamically several times in my program, but I need to get a handle that will allow me to modify that instance of the component as desired. I pass specific information to this component on instantiation using bindable public variables in the component's MXML file. I add it to my main program using addChild().
I want to update the component's progressbar as necessary and I want to remove it from the box to which I addChild'd it. What's the easiest/best way to get a variable that will give me predictable access to each component so I can easily manipulate the components as necessary? Some research suggests creationComplete, but I decided it was faster to just ask than to go through lots of different experiments and come up blank.
View 1 Replies
Feb 26, 2010
I'm not quite sure how to describe the problem I'm having but I'll do my best. I have an image gallery built in AS3 that loads content via an XML file. Nothing mind blowing here... When testing locally on a static XML file, the gallery works as intended. The purpose of this gallery is to function within a CMS and load dynamically generated XML files to display the appropriate images/info for each particular gallery. All this functions fine, to an extent...
[Code]...
View 2 Replies
Nov 26, 2009
I'm trying to target a movieclip inside another movie clip which I have dynamically generated the name.
ActionScript Code:
firstText = "text" + randomNum;
_root[firstText].gotoAndStop(9);
[Code]....
The first part works, I can "firstText" and I can make it go to frame 9 and stop but I can't manipulate the movie clip "title_txt" which is inside "firstText"
View 2 Replies
Dec 30, 2009
i have a bezier curve that is generated dynamically now i want to mask an image with it to produce a cut of face functionality just like in elfyourself.com or in jibjab.
View 0 Replies
Apr 24, 2011
I am dynamically generating MC using this code:
Code:
var _root=MovieClip(_root);
xPosition = 0;
yPosition = 0;
for (i = 0; i < 5; i++)
[Code]...
View 1 Replies
Jul 19, 2009
So basically my file is a photo gallery. There are two ways to click through the photos - the previous/next buttons or the camera icons on the floor plan diagram. The cameras are dynamically generated from XML, into a cameraHolder mc.
I have the controls working independently, but I need to have them working together (ie: if you click the previous/next buttons, the camera icons would change state) I don't have all the over/selected/visited states working yet, but I don't really need help with that.
What I really need to be able to do is figure out how to call the camera icon clips. See line 138 for where I tried to trace one: trace(cameraHolder.camera0); It returns as undefined.?
Also is is possible to call a mc where part of the name is a variable? For example, you'd call something like "camera" + whoIsOn instead of camera0?
FYI: this file is definitely a work in progress. I kind of slapped together two examples to get what I currently have...
View 2 Replies
Mar 27, 2008
As part of a preloader, I've placed a blank movie clip on the stage and attached the following code:
Code:
onClipEvent (load) {
for (i=0; i<50; i++) {
ranx = Math.round(Math.random()*1000)+1;
[Code]....
The bats generate fine, but I can't get them to move about.
View 8 Replies
Jul 27, 2008
I'm trying to make a flash widget that loads thumbnails from an xml document and have each thumbnail link to a different web page. So far everything works fine but I don't like using _root incase the widget gets loaded into another swf. In my expereice _lockroot dosen't always work.the line highlieted in red will only work if targeted through root as opposed to all my othere reference to ["placeHolder"+i] which use this.["placeHolder"+i]. I've tried _parent, this._parent and adding lots of other _parents. Nothing will work this is the file structure _root.placeHolder'N'.tn_mc. how I can substitute _root for a relative path.
widget_xml = new XML();
widget_xml.ignoreWhite = true;
widget_xml.load('flashWidget.xml');//path to document
[code].....
View 1 Replies
Jun 22, 2010
I am loading several images from XML to dynamically generated movieclips (mc_1, mc_2, mc_3...etc.). Then adding all of them into a parent MovieClip - imageContainerMc. So now, imageContainerMc holds mc_1, mc_2... etc. What I want to do next, is to Duplicate the imageContainerMc, and add both the instances on Stage-- addChild(imageContainerMc), addChild(imageContainerMc_duplicate).how can I duplicate a dynamically generated MovieClip?
View 1 Replies
Jan 16, 2011
I've got an object in the library that's a basic rectangle with an outline. A for loop creates a grid dynamically. I want to create a mask that goes over this grid. I'm using "my_object.mask = my_mask", but to no avail
View 1 Replies