ActionScript 3.0 :: How To Group Several Vars
Mar 20, 2010noobish question, i have several variables, say var1, var2, var3. In as2 we simply write:
[Code]...
noobish question, i have several variables, say var1, var2, var3. In as2 we simply write:
[Code]...
I've got some MC's in my library that have radiobuttons in them -- all of this created at design time -- and pull them onto the stage dynamically. My question is how do I get the selectedData from the group? The setup is like this: In a MC called pageOne, I have a group of buttons with a group name of Q1, Q2, etc. I pull the MC onto the stage like this:
[Code]...
Do I need instance names on each of the buttons and add listeners to all of them?
I have some code here for some falling leaves. I was wondering how it can be altered so there is a delay between a group of leaves falling and the next group falling? also to slow down at the end of the fall? [code]
View 9 Repliesi am trying to load vars from a text file into a load vars object.
var kitchentext = new LoadVars();
kitchentext.load('moccastext.txt');
Once in the object, i thought i could reference them like so
kitchentext.name
kitchentext.style
but i am having trouble doing this.
i have a textbox called displytext.
_root.displaytext.text = kitchentext.name;
doesnt work
for example i've a set of instance name
[Code]...
can i group them and only call once btn_group.gotoAndStop(1);
I'm trying to parse xml into a dictionary based on a group id.[code]...
View 2 RepliesI'm trying to parse xml into a dictionary based on a group id.[code]the above is just dummy xml. The group ID could be anything. So I can't do if item.@group is == to "group a" and elseif and so on. Any ideas on how I could make it as dynamic as possible but still be able to access each group through a dictionary.
View 2 RepliesFinding descendants are easy. But how do you find an ancestor? Consider the attached XML. How would I find the group whose ancestor is subitem(@id=1)? I can get subitem easily, but I don't know how to determine what group it's in.
I would imagine a syntax something like this:
xml.group..(@id==8)
or
var subitem = xml..subitem.(@id==8)[0];
xml.group.(contains(subitem))
But I can't find a way other than to iterate the tree upward from subitem using parent().
I have lots of buttons on the stage but they all do the same thing, ie. CLICK & DOUBLE_CLICK.How can I group these functions so that if a button in a certain group is clicked then the functions of buttons in all other groups are disabled?
View 2 RepliesI have a code:
import fl.controls.RadioButtonGroup;
rb1.label="C++";
rb2.label="ActionScript 3.0";
[Code]......
How can I import a group of prepared jpg's into flash 9 as a sequence of key frames so I don't have to do that manually?
View 2 RepliesI have a panorama picture and I can move this picture using my arrows I have made. I would like to put the buttons on the specific place of the picture. I want to make the buttons move with the picture while I scroll the panorama.
View 1 Replieshow to set the tabIndex for the RadioButton of a same group.
View 5 RepliesI have a DataGrid with info like this:
Associate AmountTimeCustomer
John Doe 29amSam Smith
John Doe 210amBerry Cooper
Bill Ace 19amSandy James
Repeating the name and amount gets redundant so I would like it to look something like this:
Associate Amount
John Doe 2
Bill Ace 1
Then when you select one, it expands to show the times and customers for the selected associate. I hope this makes sense...I am currently just using a DataGrid but I can use an AdvancedDataGrid if thats needed...I am pretty sure something like this can be done, I just don't know how.My data is in xml and looks like this:
<stat associate="John Doe" date="08/12/09" amount="2" time="9 am" customer="Sam Smith"/>
<stat associate="John Doe" date="08/12/09" amount="2" time="10 am" customer="Berry Cooper"/>
<stat associate="Bill Ace" date="08/12/09" amount="1" time="9 am" customer="Sandy James"/>
if I place a Border with width and height of "100%" inside a Group with width and height of 10 pixels the Border looks bigger than 10 pixels, why?
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"
>
[Code].....
I have a Group that I want to do a wipe effect when it shows and hides.
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
<s:Wipe id="wipeUp" direction="up" duration="2000"/>
<s:Wipe id="wipeDown" direction="down" duration="2000" startDelay="2000"/>
</fx:Declarations>
[Code]....
The group is being hidden and shown on change of the group's visibility, but the effect doesn't do anything. When I set the visibility to false, it takes 4 secs for it to hide (delay+duration), but again, no effect.
I need to recalculate the max value of lineChart according to the visible lineseries. In the application I have the ability to make visible or not the lineseries of the graph and if I make not visible the lineseries with the actual top value I want to zoom in and change the top value of the graph.
View 1 RepliesI am trying to automatically resize the children within an s:Group. The children are another s:Group and a H:Group. Each have a percentage width of 10% and 90% each. The problem is that when one of the groups is resized (using a transition and rotation combination in the Skin), the other group does not automatically resize to fill the space?
Shouldn't Flex do this automatically? or do I have to code this?
<s:Group
id="listsGroup"
width="100%"
height="255"
[Code]....
I have a SkinnableContainer class called: 'GroupNavCustomContainer' that uses a skinClass called 'GroupNavCustomSkin'. The GroupNavCustomSkin is the default one Flex creates for you: (The default skin class for a Spark SkinnableContainer container). Now, I have to add buttons to the GroupNavCustomContainer dynamically from outside the class which is not a problem. However, I can't seem to figure out out to make my skin behave as a HGroup so the buttons are spaced evenly. I tried: modifying the Group container to no avail:
[Code]....
when i press my button i then need to show a group of around 15 buttons so the code would be something like....
ActionScript Code:
function but1Click(eventObject:MouseEvent) {
button2.visible=true;
[code]....
I am having a problem looping a group of tweens. What happens is, a sprite is tweened on the y axis from 490 to 240, there is a Timer delay of 3 seconds then a second tween is activated taking the sprite from 240 to -20. The problem I am having is when it gets to -20, I want it to start the whole tween process again. I have tried using the yoyo() function but this does not work.
Code:
var creditsTextTween:Tween=new Tween(CreditsContainer,"y",None.easeIn,490,240,5,true);
creditsTextTween.addEventListener(TweenEvent.MOTION_FINISH, stopFor3Seconds);
[Code].....
how to tween the buttons separately.
View 1 RepliesI have this code to load photos
var caricafoto1:URLRequest=new URLRequest("foto1.swf")
var caricafoto2:URLRequest=new URLRequest("foto2.swf")
var caricafoto3:URLRequest=new URLRequest("foto3.swf")
var caricafoto4:URLRequest=new URLRequest("foto4.swf")
var caricafoto5:URLRequest=new URLRequest("foto5.swf")
[Code] .....
Is there a way to group the functions?
[URL]
how they create that mouse effect where it moves to the nav and turns to the arrow, and the go back where you had the courser originally?
I've got a flash document using AS3. It dynamically reads data from an XML file, and creates a bunch of single line textFields. Could be like this:
<XMLdata>
<Line>this is line 1</Line>
<Line>this is line 2</Line>
<Line>this is line 3</Line>
</XMLdata>
So, for each node, it would create a new TextField, and change the textField.y value so that they are "stacked" on top of each other.
All this if fine, except that if you hae so many "lines" (or textfields) that the "stack" is taller than the Flash Document size. What I would like to do is have a scroll bar or something so you can scroll the stack of TextFields. Doesnt' even need to be a scroll bar. Maybe an arrow button at the bottom, and when you click on it, it scrolls down. One for up too.
I have a set of button for moving the movieclips up, down, left and right. And I wonder how to make it so that I can move the three movieclips together at the same time when I press the moving button .
View 3 RepliesI need to be able to click and drag multiple objects at the same time I can make it drag 2 objects but when I add another one it doesn't work?
View 2 RepliesI'm still very much a newbie when it comes to AS3. I need to create an external image scroller. That's simple enough, but these images are of people of different ethnics groups, roughly divided into four categories. So, the pictures need to be randomized two-dimensionally. The first random factor is which of the four groups to choose from. The second random factor is which image in that group to display. That way, no ethnic group is favored over another.
I've gotten fairly far...when I test my Flash file and click the Start button, you'll see the first random image. Wait a few seconds, and the second will appear. All well and good...but the logic for how to randomize and automatically display all 15 images eludes me, despite days of research.
Can anyone point me in the right direction? I tried to upload the test files but they're too big, so the code is below.
[Code]...
I know how to set the style for a radio button in AS3, but is it possible to apply a text format style to a radio button group, rather than each individual button?
View 2 Replies'm writing an application using FMS in which I'm supposed to create a audio/video meeting between two or more people. I need to record this group session over FMS but unable to get an idea how to do it?
View 1 Replies