Copy link to clipboard
Copied
Ive something similar, and cant get it to work.
im trying a simple code i got of flash for dummies, and it may be old :
its a movie clip box , instance is ball1, and a button called go, and and text input called size,
it said :Click the Character button on the Property inspector to open the Character Options dialog box and choose Specify Ranges. Then choose Numerals [0–9] and click OK.
on (release) {ball1._width = size;} does work so i tried
sepete layered objects each written on the timeline, as follows
size._visible = true;
ball1._visible = true;
go._visible = true;
go.onrelease = function(){
ball1._width = .size;
}
i cannot set character options as theres no option to do so, what can i do ?
i need it in AS 2.0 as the above is not functioning
if i add another text input box for the height what would the code be ?
when go is clicked to what do you want change ball1's width? the number in your textfield?
if so, use:
go.onrelease = function(){
ball1._width = Number(size.text);
}
Copy link to clipboard
Copied
can anyone or a few comment please,
Copy link to clipboard
Copied
when go is clicked to what do you want change ball1's width? the number in your textfield?
if so, use:
go.onrelease = function(){
ball1._width = Number(size.text);
}
Copy link to clipboard
Copied
Hi thank you i was at the adobe site and said thank you, and that it was
helpful, i asked how to get the tab button to scroll through text inputs
and the "return/enter button to press the submit button.
Copy link to clipboard
Copied
use the tabIndex property of display objects to order the indexing.
Copy link to clipboard
Copied
Okay ill do so tomorrow, its 10 pm here in south africa . thank you so much
, i wanted to ask tomorrow if the duplicates will have new instance names,
is it tfy, or tf or is that code ?
Copy link to clipboard
Copied
the duplicated textfields will all have different names (eg, tf_<somenumber>).
Copy link to clipboard
Copied
how do i keep a record of the all the "new filled text input fields" ?
Copy link to clipboard
Copied
you could store them in an array:
var tfA:Array = [];
.
.
this._parent.createTextField("tf_"+d,...);
tfA.push(this._parent['tf_'+d]);
Copy link to clipboard
Copied
I have a code that has helped me to take a text input field and replicate it, is this array code the same as this :
go1.onRelease = function() {
var d:Number = this._parent.getNextHighestDepth();
this._parent.createTextField("tf_"+d,d,enter._x,enter._y + next_tfY + 40,150,40);
this._parent['tf_' + d].text = size.text;
this._parent['tf_' + d].border = true;
size.text = '';
next_tfY += 40;
};
does this code have an array already? or does it need extra coding to beable to retrieve the entered data by a button
Copy link to clipboard
Copied
no array is used in that code. this code stores the created textfields in an array:
var tfA:Array = [];
go1.onRelease = function() {
var d:Number = this._parent.getNextHighestDepth();
this._parent.createTextField("tf_"+d,d,enter._x,enter._y + next_tfY + 40,150,40);
tfA.push(this._parent['tf_' + d])
this._parent['tf_' + d].text = size.text;
this._parent['tf_' + d].border = true;
size.text = '';
next_tfY += 40;
};
Copy link to clipboard
Copied
okay thank you, so without the array code as above is the results still traceable and able to be used in further functions, or does an array need to be used to do further functions ?
Copy link to clipboard
Copied
the array would be used outside the go1 onrelease to reference, move, remove etc the created textfields.
Copy link to clipboard
Copied
i googled array and got this :
For example, a search engine may use an array to store Web pages found in a search performed by the user. When displaying the results, the program will output one element of the array at a time. This may be done for a specified number of values or until all the values stored in the array have been output. While the program could create a new variable for each result found, storing the results in an array is much more efficient way to manage memory.
The syntax for storing and displaying the values in an array typically looks something like this:
arrayname[0] = "This ";
arrayname[1] = "is ";
arrayname[2] = "pretty simple.";
print arrayname[0];
print arrayname[1];
print arrayname[2];
The above commands would print the first three values of the array, or "This is pretty simple." By using a "while" or "for" loop, the programmer can tell the program to output each value in the array until the last value has been reached. So not only do arrays help manage memory more efficiently, they make the programmer's job more efficient as well.
im not sure if its code for dreamweaver or adobe flash, but the other way with without using an array can i also do functions, will it use alot more memory in adobe flash
Copy link to clipboard
Copied
oh okay,
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more