RemoveTextField And Components Bug
Hi there Back again... Just when I thought my problems were over, i realized they have only started!
My removeTextField command doesn't work. I've noticed that it does work when i delete all components from my project. I've heard that it could be due to a bug in Flash and that I somehow could go around the problem by swap depths, but i don't understand how.
In this thread they talk about the problem, and it seems like thery have a solution, but i don't really get it :
http://www.actionscript.org/forums/s...emovetextfield
Here is the code that creates my textfield:
ActionScript Code: this.createTextField("loaded_txt", this.getNextHighestDepth(), 439, 294, 600, 118);loaded_txt.textColor = 0xFFFFFF;
Here is the code that is supposed to delete my textfield but doesn't:
ActionScript Code: this.Home_btn.onRelease = function() { this.getNextHighestDepth()-1 ns.close(); VideoClip_B6.clear(); progressBar_mc.bar_mc.clear(); progressBar_mc.stroke_mc.clear(); loaded_txt.removeTextField(); clearInterval(loaded_interval);};
Can someone help? 1000 thanks/ WTK
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 05-12-2006, 11:48 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
RemoveTextField And Components
I am creating several text fields dynamically using createTextField, then, when I no longer need them, I'm using removeTextField to delete them. The problem I'm encountering is that, as soon as I add a component to the stage (such as the UIScrollBar) - even to a totally different part of the movie - removeTextField no longer seems to work. Even if I then delete the component, removeTextField still doesn't work. I have to revert to the last saved version of the movie for removeTextField to (somehow) work again.
Has anyone else encountered this? Any work arounds? Thanks!
Bill
[F8] RemoveTextField
Hey, I'm feeling kinda stupid here. I can't get the [textfield].removeTextField function to work. The field I'm trying to delete was created with the ".createTextField" function. I even tried executing the code in the Flash help files, but it's not working. Any ideas?
RemoveTextField Problem
Hi All
Having a problem removing my text fields that were created with createTextField.
The code to set the text field up is -
_root.form.createEmptyMovieClip("myscroll",500);
// Create the background movie clip, and draw a rectangle outline in it with alpha of 0.
_root.form.myscroll.createEmptyMovieClip("bg", 1);
_root.form.myscroll.bg.lineStyle(0, 0, 0);
_root.form.myscroll.bg.lineTo(w, 0);
_root.form.myscroll.bg.lineTo(w, h);
_root.form.myscroll.bg.lineTo(0, h);
_root.form.myscroll.bg.lineTo(0, 0);
//LOOP TO CREATE HORSEFIELDS
for(i=0; i<20; i++){
horseField = "horseField" + (i);
_root.form.myscroll.bg.createTextField(horseField, i,5,myy,88,18);
_root.form.myscroll.bg[horseField].variable = horseField + "_var";
_root.form.myscroll.bg[horseField].embedFonts = true;
_root.form.myscroll.bg[horseField].setNewTextFormat(myTextFormat);
_root.form.myscroll.bg[horseField].setTextFormat(myTextFormat);
_root.form.myscroll.bg[horseField].border = true;
_root.form.myscroll.bg[horseField].type = "dynamic";
myy+=18
}
and the code I'm using to try and remove it is -
_root.form.myscroll.bg.horseField.removeTextField( );
or
_root.form.myscroll.bg[horseField].removeTextField();
neither work, can anyone help?
Thanks
RemoveTextField() Problem...
Hi guys ive got a dynamically created textfield but for some reason i cant remove it when i want to , although i CAN make it invisible (thus confirming, paths, instance names etc are correct..basically its like this:
Code:
//lots of irrelevant code
trace("should remove now");
loadingList_txt.removeTextField(); // THIS DOES NOT WORK
loadingList_txt._visible = false; // THIS WORKS
ANyone got any idea why this is happening? Thanks a lot in advance...
(btw in it just me or cant we see which users are browsing the forum now?)
Cheers
Unexpected Result After Applying RemoveTextField
Hello,
According to actionscript, when dynamically creating a textfield, and then removing it by using removeTextField method, the removed textfield equals "undefined" when calling by using trace.
simple example :
_root.createTextfield("test_txt",1,0,0,100,20);
//outputs "_level0.test_txt"
trace(test_txt);
test_txt.removeTextField();
//outputs "undefined"
trace(test_txt);
=> all is ok, it works as stated in the actionscript manual..
BUT, let's using it within a class, the behaviour is not the same :
simple example :
class Test {
public static var test_txt:TextField;
function Test() {
trace("test 1 : "+test_txt);
test_txt = _root.createTextField("test_txt", 1, 0, 0, 100, 20);
}
public function remove_text() {
test_txt.removeTextField();
trace("test 2 : "+test_txt);
}
}
//Under _root :
test=new Test();
test.remove_text();
It displays the following in my output panel :
test 1 : undefined
test 2 : _level0.test_txt
test 3 :
why is test3 empty? It proves that test_txt is not equal to undefined but it should be, shouldn't it? Is it a bug?
I don't understand. thanks for your explanation
Pascal
Use FCS Components In Flash MX 2004. Components Already Installed. Help
Hi,
I have Flash communication server 1.5 insatlled and Flash MX 2004 too. When I create new fla file and want to use Flash components, I don't find them to use. I dont see any panel etc to use them. Some one tell me how to list the components to add them in my Flash fla file please
Thanks
Removing Components From The Components Panel
This seems like a stupid question, but I can't seem to get my old components out of my Components panel!
I put some custom made components, just for a try, into the folder
C:Program FilesMacromediaFlash MX 2004enFirst RunComponents,
found them in the Components Panel, but wanted to get rid of them immediately. Deleted the components from the folder, but they don't seem to disappear from the panel! I have no idea where they come from, since I should not have them even on my hard disk anymore!
Cheers!
Flash Components Vs. Flex Components
I know almost nothing about Flex. Just wanted to establish that at the outset.
A client sent me an API component - an swc file - to use in a project I'm doing. I installed it in my Flash folders, but it didn't show up in the Components panel when I launched Flash. When I queried the client about it, he said that it was actually a Flex component.
My question is, what's the difference between a Component written for Flex and one written for Flash ? Can a Flex component be adapted for use in Flash ? In that what I received is a .swc, I'm assuming it has to have been written in ActionScript.
Any help would be hugely appreciated. Many thanks.
CS3 Missing Components Or How To Use Flex 2 Components In CS3
Does anyone have a good resource for how to use Flex2 components in CS3?
I found an install that said it would install Flex2 components in CS3, but all it added waas the UIMovieClip for packaging Flash MC in swc's for Flex.
Right now I am specifically trying to solve the missing dateField component in CS3.
But I would like to find out if anyone has found a good resource for alternatives to all missing components in CS3.
I'm hoping the answer is not to build them from scratch.
Thanks,
Hunter
Components Inside Components (Flash 8)
Hi,
I have an Accordion component which needs to contain a number of small forms, each of which is built as a MovieClip containing TextInput, Button, ComboBox, etc.
So, I build my little forms in Flash, make them into MovieClips, give them a linkage identifier and assign them the AS2 class "mx.core.View", as the documentation says.
Then I use ActionScript to attach these to my Accordion control, using my_accordion.createChild(). OK, fine. Works nicely.
The problem is that in the next few lines of code I also want to be able to populate the TextInput and ComboBox components which reside inside my accordion. I can't do it. Trying to do so fails silently. Tracing out the path to the Components shows that they are "there", but if i put some content into, say, one of the TextInputs up-front (i.e. in the Properties panel inside Flash) and then try to trace... my_acc.my_form.my_textInput.text... i get undefined.
So, it looks like the components inside the form inside the Accordion aren't yet "initialised" when I am trying to get/set their values. I've seen similar behaviour before, but it's not clear in the documentation how to get around it.
Anyone help? What is the correct way to use components inside components like this? I don't want to have to call a second function or put any code on the timeline or anything like that!
Many thanks,
Andy
Components Inside Components (Flash 8)
Hi,
I have an Accordion component which needs to contain a number of small forms, each of which is built as a MovieClip containing TextInput, Button, ComboBox, etc.
So, I build my little forms in Flash, make them into MovieClips, give them a linkage identifier and assign them the AS2 class "mx.core.View", as the documentation says.
Then I use ActionScript to attach these to my Accordion control, using my_accordion.createChild(). OK, fine. Works nicely.
The problem is that in the next few lines of code I also want to be able to populate the TextInput and ComboBox components which reside inside my accordion. I can't do it. Trying to do so fails silently. Tracing out the path to the Components shows that they are "there", but if i put some content into, say, one of the TextInputs up-front (i.e. in the Properties panel inside Flash) and then try to trace... my_acc.my_form.my_textInput.text... i get undefined.
So, it looks like the components inside the form inside the Accordion aren't yet "initialised" when I am trying to get/set their values. I've seen similar behaviour before, but it's not clear in the documentation how to get around it.
Anyone help? What is the correct way to use components inside components like this? I don't want to have to call a second function or put any code on the timeline or anything like that!
Many thanks,
Andy
Flash Components Vs. Flex Components
I know almost nothing about Flex. Just wanted to establish that at the outset.
A client sent me an API component - an swc file - to use in a project I'm doing. I installed it in my Flash folders, but it didn't show up in the Components panel when I launched Flash. When I queried the client about it, he said that it was actually a Flex component.
My question is, what's the difference between a Component written for Flex and one written for Flash ? Can a Flex component be adapted for use in Flash ? In that what I received is a .swc, I'm assuming it has to have been written in ActionScript.
Any help would be hugely appreciated. Many thanks.
Communication Components Do Not Appear In Components Panel
Hi! I've installed Flash MX and Flash Media Server. I would like to use the communication components in flash MX however, I can not see it in my communication components panel in flash MX. I've already added the communication components.fla to my ---Flash MX/First Run/Components directory under the
Macromedia Flash MX installation directory and updated the ASC files
in my /scriptlib/ directory.. But after adding this, only four components (audio conference, av presence, chat and connection light) appeared in my component panel. I need to use other components but its not available. What should I do? Any help will be appreciated.Textcommunication components
Add On To Using New Built Components Or For Building Components?
My version of Flash won't even let me use components created by other people... Is there a plug-in or an add-on that I have to get to use components that didn't come with Flash? Is there something else I need to get to build my own components? If so.. Where can I get it? Is there a homepage I may purshase it from? Where? How much?
Can Components Be Put Inside Components?
Does anyone know if components can exist and function properly within other components??
For example, I have a large form with radio buttons and checkboxes that is in a movie. This movie then shows up in a scrollpane and doesn't function at all.
Just curious if that is a limitation.
Thanks.
MX Components V MX2004 Components
Appreciate any help to this problem.
I'm working on a project using MX2004 and my business partner is working on the same project using MX only. I design and he codes. He has created a form in MX using a few components such as the Combo Box. However, when I recieve it, although it works fine I cant seem to swap the components to MX2004 - when I try I get a blank box/boxes!
Is this a known issue? He can't afford to upgrade to MX2004 at this stage or else we probably wouldn't have this problem!
Thanks, Steve
FMX Components Vs. FMX2K4 Components
Hi,
I would like to export movie clips as components and let other developers use those to create applications.
I have very little experience with components; I did use FMX components in the past.
I would like to let users change the components features, for instance, totally redo the animation of a button's components rollover effect.
1.Can this be done with FMX2k4 components (I think not).
2.Can this be done with FMX components?
3.Can I export FMX components with FMX2k4 IDE?
4.What effect will components have on file size and performance?
Thanks in advance,
DMZ
UI Components V/s Flash MX UI Components
I am having a problem with traceing a combobox using UI Components. I am tracing the value of the selected combobox using a combobox with the UI Components. I prefer the UI Components because they have the glow, rounded corners and are more attractive. the code works fine with the Flash MX UI Components. However, when I use the UI components it doesnt. The combobox populates however I can not trace. Does anyone have any suggestions? I use the following code to trace the value of the combobox:
myCombo.setChangeHandler("myFoo");
myFoo = function(myCombo){
trace(myCombo.getValue());
I also used this code:
myCombo.setChangeHandler("myHandler");
function myHandler(obj)
{
trace (obj.getValue());
trace (obj.getSelectedItem().label);
}
The code for the entire section is:
function getStateArray(){
myStates ="AL,AK,AZ,AR,CA,CO,CT,DE,FL,GA,HI,ID,IL,IN,IA,KS,KY,LA,MA,MD,ME,MI,MN,MO,MS,M T,NC,NE,NV,NH,NJ,NM,NY,NC,ND,OH,OK,OR,PA,RI,SC,SD,TN,TX,UT,VT,VA,WA,WV,WI,WY";
myStatesArray = new Array();
myStatesArray = myStates.split(",");
return myStatesArray;
}
myArray = getStateArray();
myArray.unshift("--");
myCombo.setDataProvider(myArray);
myCombo.setChangeHandler("myHandler");
function myHandler(obj)
{
trace (obj.getValue());
trace (obj.getSelectedItem().label);
}
Please help. Thanks in advance for any help.
Justice
Components Inside Components
I have built a custom component which I call 'VComboBox'. This component is composed of a single label and an instance of Macromedia's builtin ComboBox 'FComboBoxSymbol'. I named the instance of the FComboBoxSymbol to 'comboObject'.
Now when I drag a copy of my component onto the stage and in ActionScript I use the following code:
_root.myVComboInstance.comboObject.addItem("red", 0);
It works and adds the item into the combo box inside my custom component. However when I dynamically create an instance of my VComboBox it does not work at all, like below:
_root.attachMovie("VComboBox", myNewCombo, depth++);
_root.myNewCombo.comboObject.addItem("red", 0);
The combo appears but however no item is added. And when I click on the arrow for the combo to drop-down nothing happens. I am trying to find out what I am doing wrong? Is there a way to make this work? Also why is my custom component acting completely different based on whether it was created at design-time, or whether it was created dynamically at run-time? Any assistance would be greatly appreciated.
Flash UI Components V/s Flash MX 2004 Components
I am using Flash MX 2004 Professional. I am having a problem with traceing a combobox using UI Components. I am tracing the value of the selected combobox using a combobox with the UI Components. I prefer the UI Components because they have the glow, rounded corners and are more attractive. the code works fine with the Flash MX UI Components. However, when I use the UI components it doesnt. The combobox populates however I can not trace. Does anyone have any suggestions? I use the following code to trace the value of the combobox:
myCombo.setChangeHandler("myFoo");
myFoo = function(myCombo){
trace(myCombo.getValue());I also used this code:
myCombo.setChangeHandler("myHandler");
function myHandler(obj)
{
trace (obj.getValue());
trace (obj.getSelectedItem().label);
}
The code for the entire section is:
function getStateArray(){
myStates ="AL,AK,AZ,AR,CA,CO,CT,DE,FL,GA,HI,ID,IL,IN,IA,KS,KY,LA,MA,MD,ME,MI,MN,MO,MS,MT, NC,NE,NV,NH,NJ,NM,NY,NC,ND,OH,OK,OR,PA,RI,SC,SD,TN,TX,UT,VT,VA,WA,WV,WI,WY";
myStatesArray = new Array();
myStatesArray = myStates.split(",");
return myStatesArray;
}
myArray = getStateArray();
myArray.unshift("--");
myCombo.setDataProvider(myArray);
myCombo.setChangeHandler("myHandler");
function myHandler(obj)
{
trace (obj.getValue());
trace (obj.getSelectedItem().label);
}
Please help. Thanks in advance for any help.
Justice
COMPONENTS
I am trying to work on a ticker tape component, but there is absolutly no documentation or examples I can find, and I understand how to make it work, but I am trying to use advanced features and methods. If anyone has or knows of where I can look for an example, please let me know.
Thanks
Mx Components
Hey guy were could i find some good flashMX components. I went to flashcomponents.net but i need more. help me please
MX Components
I have Flash MX installed in my machine but whenever I am trying to install any MXP file it is giving me a warning "You require Flash 6 or above".
Please advice what to do
UI Components 1 & 2
Am I just an idiot or is there no real documentation of how to configure the resource menu, the progress bar, the tree and such. Is there any real documentation on how to get these components to work?
Please advise,
Moshin
Components Within Components
Whenever I put a component within a component weird things happen. I was using the splitview for the first time and loaded a dictionary search MC. The component buttons were not displaying properly and the scrollbars on my text field were not showing up at all. Even a normal button wouldn't display. The other weird thing is I was using dynamic text boxes with HTML and the SHOW BORDER feature. These items would display outside of the actual component. Has anyone else experienced any of this? Is there any way of getting around this?
Components
I am using one of the flash UI components (the combobox) in Flash MX, but I am having trouble with the action script side of it. I am trying to use an 'If' statement that goes something like this (this is in human terms) --
"if this is selected from combobox1 then goto frame two."
Can anyone help me with the appropriate commands??
Thanks
Components
Anyone who knows how to implement the components from Flash UI Components Set 2?
Components In Components....
ok guys i got two swf files one is a news box whit dynamic text whit a scroll bar and i have a calendar whit scenes for each months.. can i put a split view components to see only one of them and drag if i whant to see the other swf files..?
Components
can anyone help me , and list down the properties of
combo box components.
thanks!
Components
Hi,
is it possible to expand the FlashMX Components window with my own controls?
So I can access my special button like the FlashMX PushButton ?
Thanks,
David
Components
Hi,
is it possible to expand the FlashMX Components window with my own controls?
So I can access my special button like the FlashMX PushButton
Thanks,
David
Components Help, Plz
i would like to have several items in a combobox each having a different value...now, the selected item/label should fill a variable and then show that value in a dynamic txt field after the user has clicked on an item
how do i do that. i mean what code should i write... thanx
UI Components
Alright, I was OK at 5 but I just got MX. I think the components are a wonderful addition except they make ZERO sense to me. I would like to find out a CLEAR tutorial on how to use them.
I am using Scrollpane and I want t ocustomize the way it looks, meaning the arrows and the actual bar. Could anyone help me out?
Components 2
components are blowing my brain apart
what can i say.
here's the sceene:
on the stage i have a dynamic txt box
varable name: NEWinfo
which uses the
loadVariables ("NEWinfo.txt", _root);
command to import a txt file called NEWinfo.txt in the same file on my server as the flash file.
then i have taken the components scrollbar that comes with flashmx and attatched it to the txtbox...no scrolling action happening.
nothing is being imported.
any ideas why?
thank you
slimpixi
oh my brain is being blown appart by these components!
New Components?
I heard there are some new components (obviously for Flash MX), I don't look around the net often but I'm wondering... where do you find them.
Don't get angry at me either, if you're angry wiff me asking this question, dont even bother answering!
I'm sick of those ignorant dudes complaining they read the same posts over 5 times a day.
MX Components
Who knows how get the sizing of components to work. I have a listbox called conversation_lb that I want to size to fit a specific layout. I'm using this.
conversation_lb.setSize(280,175);
What happens is the listbox comes up short. The object itself becomes the right size, but visible list box is short. To illustrate take a list box from the components and manually size it to 280,175 and you'll see what I'm talking about.
Secondly I'm having trouble with fonts and how they view. I'd like to embed the font I'm using but can't get the code to work. This is what I'm trying.
buttonStyleFormat = new FStyleFormat();
buttonStyleFormat.addListener(send_pb);
buttonStyleFormat.addListener(load_pb);
buttonStyleFormat.textFont = "Arial Rounded MT Bold";
buttonStyleFormat.textSize = "12";
buttonStyleFormat.embedFonts = true;
buttonStyleFormat.applyChanges();
with embedFonts the font just disappears. Without it is, well not embeded.
Help
Components + PHP
Hi,
I'm making a contact form in flash mx and have used some of the components, namely a checkbox. I have a php code to turn the rest, standard input text boxes into a email that is sent, but what can i do with checkboxes. Give them an instance name and use that or ??
Thanks in advance
Also is it possible to change the design of the component, like the colour etc easily
UI Components
Whats the general thought on this
Do you think its a way for new users
to take short cuts instead of actually learning
to improve their skills in flash
What do you guys think?
Brood......
MX Components
Ive producted an application form using components from the flash MX panel which has a simple percentage preloader at the beginning and is around 150kb, but when I test movie with the bandwidth profiler on, It shows that it takes around 35k before the preloader even kicks in, now if I remove all flash components from my library and retest the preloader kicks in straight away.
anyone now why is this?
Thanks in advance.......
j....
Components
i want to create a infoemation form which the user fills in and their results appear on the next page, but i want to do it using components but i dont know how to!
Could sum1 help me?
Thanks
Des
Components
Hi there, i have been using MX for a few months now and i am learning alot about actionscripting. Currently i am making a site for a friend and i chose to us the pill component button. And i have no idea how i can make it link to another scene.. Can someone please help me out with this.
Thank you.
MX Components (URL)
Hi,
I am new to Flash MX. I did a menu with some itens (could be buttons, but I used a component with diferent parameters (many intances with Names, Variables and diferent Values), each for an item which should be a link to diferent htm files) and would like to know how to assing a URL for each mc (component). I donīt know how to epxlain very well and my English is not so good...
I tried to put something like
onClipEvent (mouseDown) {
getURL("test1.htm", "_self");
}
and change according to the instance, changing the "test1.htm" to test2.htm" etc, but it didnīt work (always opens the test1.htm). I believe that it would be better to use the "parameters definition", but how could I use it?
Hope to have explained well? Thanks,
Andre
Components
Does anyone know of a website with a number of good components? One that i am looking for is a movable window component that loads after a button is clicked.
And how do you add a component to the components panel?
Ui Components
Okay, I am sure this will sound naive, but I am having major trouble getting the Flash MX scroll bar UI component to work with my dynamic text box that is grabbing the text from an external .txt file. This is the first time I have done this and am getting frustrated. Thanks in advance.
Components
Hi guys, does anyone know where I can download some free components?
Thanks in advance
Components, Components....
Hi flasher types,
Do any of you know where I could find a tutorial on the fTree component from Macromedias UI components 2 set?
I have a tutor who insists we use it in a flash site and I haven't been able to find ANYTHING on Macromedias website since they "improved" it!
Any pointers would be Greatly appreciated!!
Thanks,
Jon 8o(
V2 Components
I have tried searching over the internet, but no-one knows how to do what I want to achieve
I have the V1 code
// Init //
function init() {
style = new FStyleFormat();
style.arrow = 0x000000;
style.check = 0xffffff;
style.background = 0x000000;
style.backgroundDisabled = 0x000000;
style.shadow = 0x000000;
style.darkshadow = 0x333333;
style.foregroundDisabled = 0x000000;
style.face = 0x999999;
style.highlight = 0xCCCCCC;
style.highlight3D = 0x000000;
style.scrollTrack = 0xCCCCCC;
style.selection = 0x333333;
style.selectionDisabled = 0x000000;
style.selectionUnfocused = 0x000000;
style.textFont = "Verdana";
style.textSize = 10;
style.textColor = 0xffffff;
style.textDisabled = 0x000000;
style.textSelected = 0x00ccff
}
init();
how do I make this work for a v2 textarea component?
If you could please include an example it would be much appreciated.
I NEED HELP PLEASE
New Components Available
Several new Flash 2004 Components are available for sale at http://www.livewireis.com/Store/store1.cfm. Components available:
- Flash 2004 States Drop down Menu - A great time saver!
- Flash 2004 Country Drop Down Menu - Another great time saver!
- Calendar Component
- Flash Templates for business presentations
|