ActionScript 2.0 :: Keep Values Inside Components When Flicking Between Frames?
Jul 12, 2010
Say i have a UI with check boxes, text fields etc on 1 frame, and again a different layout on another. If i type values into boxes and click radio and check boxes. is there a way to keep these values on there when i flick to another frame then back again?
Is it bad practice/design to nest components inside components using Flex 4? Should I simply be creating components and inserting them into my main application as below, or doesn't it matter?
I have a form in my flashdocument with two textinputs and one button. User, pass, and submit. Yeah, as you might have understood by now, it's a login-form. Anyway, my question is - how can I submit this information to 'actions.php' through POST?
How can I stop this slideshow flicking through the images automatically? I just want it so that people click next or previous and then it goes to the next or previous.[code]...
How do I provide values from the dataprovider (which is an array of objects) to these individual numeric steppers. dataField cannot be mentioned in the NumericStepper tag it seems.
I have a Flash 'application' that is all on one frame and has about 2000 lines of AS 2 code. Works fine if it's all in Frame 1, but when I move everything (that's every layer and all the code) to Frame 3, for example, my menu bar component (which gets its data from xml files) doesn't load the data. I want to be able to do this so as to put a pre-loader on Frame 1 which would jump to Frame 3 when the SWF has fully loaded.
xml values are stored in 'arr' array collection. depending on the length of the array stored, the below described components are created and assign those values to relevant components dynamically. For Example:
Indeed, i would like to inrease the RGB values of my radial gradient of my shape every 1 or 3 frames. I did it manually, but its very long. So i would like to know if anyone can help me to make it with code, it's will be most efficient and fast. I've already created my shape with a radial gradient. Now i would like just to increase the RGB values of my radial gradient.[code]
I'm just trying to have a textbox on my main stage display certain values depending on what frames are being played. So having not done actionscript in a LONG time, I would assume is it something like this:
I am working on a page which mainly consists of Charts and Grids. Thought that Flex would be the best fit with some cool effects. But however, I now feel that ExtJs grid looks better than Flex data grid.
My question is whether there is any possibility / mechanism to embed Ext JS grid into a Flex page. Lets say my main page has a Flex tab panel. In first tab, I would like to see 'Flex Chart' and in second tab I would want to see 'ExtJS grid'.
I would also want to know of any Flex Data grid plugin (if exists), which looks/works just like Ext Js grid.
I have an mxml panel in which I'm using a repeater. The panel can be resized horizontally and I would like for the repeated components to resize together with panel. Here is a simplified example of how things look like:
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" ...> <!-- scripts and some controls --> <mx:VBox width="100%">
It's interesting. If you set stage.scaleMode = StageScaleMode.EXACT_FIT; all components are resized when you resize the window, BUT there is a grey stripe at the bottom of the window that is not.By the way, is it possible to take that grey line/stripe off from the window?Try to resize this window and you'll see what happens:
This doesn't work. creationComplete is not called until the repeater has finished instead of (as I expected) when the creation of the button is complete. I'm not sure how to accomplish this.
BTW - I also tried placing the creationComplete on the parent component to the repeater, but it would only be called the first time the component was rendered (the data inside the repeater sometimes changes) so that didn't work.
Ok, this is a somewhat complicated issue dealing with SWCs and compilers. I've outlined steps to reproduce the problem below. I'm using the method outlined here to bring in Flash content to my project. I have 15-20 SWCs already, and it's working fine for those assets, the problem is specifically related to Flash's components (ComboBox, RadioButton etc.) If anyone has *any* advice on this, please let me know as we are completely stumped at this point!
The issue we're having involves using multiple external SWC files which contain AS3 components from Flash CS4. When two SWCs are linked to an ActionScript project (using Flash Builder 4 Beta (build 4.0.0)) there are collisions in the referenced classes which cause the most recently published SWC to knock out any duplicate classes in the other SWCs. A simple way to replicate this is as follows:
I have a class that instantiates a movieclip from the library, eg: myBar:MovieClip = level0.AttachMovie("debugbar", "debugbar_mc", 999);
myBar is an instance variable in the class.
Now the important part - debugbar in the library is a movieclip that contains some components - buttons and textInputs. The problem comes when trying to access these components.
I would have thought that this would work: myBar.input_txt.text = "hello";
in order to set the text of "input_txt", the instance name of a TextInput component on the timeline of the movie clip (frame 1 of a 1 frame mc).
This does not work. Infact, I cannot access any specific "component" properties - they come back undefined. I cannot added event handlers for the component events either.
I can however set and retrieve MovieClip properties for the "input_txt", such as _x. However there is one added strange thing with this too - setting _visible to false doesn't seem to work (however perhaps a component by default overrides this).
I tried casting it to a component, such as: var temp:TextInput = TextInput(myBar.input_txt); trace(temp);
which gave "temp" as null. Without casting, it gives the path to correctly.
It almost seems like the components are somehow broken when trying to access them this way - or that they cannot be accessed this way?
The thing is, I was able to access all of this before, when the code to do it was placed on the timeline (frame 1, the only frame) of the debugbar itself, where the components were placed at authortime.
I need to have it in a class though, as I need to pass in certain objects that need to be accessed by the mc. I am rather baffled as to why all this doesn't work.
I have a MovieClip symbol created with flash in a fla file library. There is a textfield in frame one of this movieclip's timeline . There is another frame in the movieclip timeline. There is a custon class definition for this symbol. It is a flipping card in a memory game.
I access the textfield by going to frame 2 (gotoAndStop(2)) and setting the textfield's text property ( this.field.text = "hello" ). However if I go to frame 1 and then return to frame 2, the text becomes the original one in the library's symbol. I have to modify the text propery again in a showFace method I've written.
Besides, I cannot pass parameters in the constructor because it is a symbol in the library and that would give errors.Is there a way I can set properties inside frames permanently?
I'm just trying to nest buttons one on each of two frames inside a mc. I've tried everything. Here's basically the script I used.
[Code]...
I've tried adding _root infront of screen name and even tried just having the button go to the second frame in the same scene. I'm just trying to get this first button to work and then I will add the other button.
is it possible for the same actionscript 2 script to be working if its inside the frames frame frame when you get down to the point where it says LEFT RIGHT UPP DOWN?
I have two InputText boxes (Flash CS5 AS3). I will perform calculations with the values that are placed inside the boxes. How can I turn their values into numbers? I will eventually restrict the boxes to numeric values only.
I need an application to test the accelerometer values on my mobile phone. I need the values on my system so that I can manipulate that info for something else.
If I write an Android application, the values will be inside the Mobile phone, which is not what I want.
I have written an app in Flash, n tested in Adobe Device Central. Only catch is that instead of simulator, I need to test it on my mobile. How do i do this?
I have a simple FOR loop which runs through an array of MC names, which runs fine, but I'm trying to use these names inside this array as hittest values. So, I have one MC, and the code in this MC runs through an array and checks for any collisions between it and the mc in the array.
My intention is to have an array with several variables, each one with a different name, all of them of the type 'Number'. This I can do.What I can't do is to access the variables using the array's index.
Paste this on your frame 1:
Code: trace("======at frame 1======"); //objects// var objects:Array = new Array();
[code]....
As you can see, the code is changing the value of the array element and not the value of the variable inside the array element.