ActionScript 3.0 :: ImgLoader - How To Group Function
Feb 22, 2012
I 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?
View 9 Replies
Similar Posts:
Nov 10, 2006
i am working on small project where i find my self stopping at this rateMmm.. this project is dealing with buttons placed in MC name = main.ButtonCon the main i am programing those buttons as if
Code:
_root.main.ButtonC.b5.onRollOver = function() {
this.swapDepths(11);
[code]........
View 3 Replies
Aug 19, 2008
I have a movie with 5 movieclips named section1_mc, section2_mc, section3_mc, etcI want to advance to frames 1 - 5 by clicking in each of the movieclips. Do I need to add the onRelease to each of them, or is there a way to do it once for everybody. I tried the code below, but when I click on any of the movieclips the timeline goes to frame 5, the last one.
Code:
for (i = 1; i < 6; i++) {
_root["section" + i + "_mc"].onRelease = function(){
[code].....
View 3 Replies
Aug 14, 2009
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?
View 4 Replies
Oct 17, 2010
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 Replies
Jun 6, 2010
for example i've a set of instance name
[Code]...
can i group them and only call once btn_group.gotoAndStop(1);
View 3 Replies
Aug 24, 2010
I'm trying to parse xml into a dictionary based on a group id.[code]...
View 2 Replies
Mar 20, 2010
noobish question, i have several variables, say var1, var2, var3. In as2 we simply write:
[Code]...
View 5 Replies
Aug 23, 2010
I'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 Replies
Oct 9, 2008
Finding 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().
View 1 Replies
Apr 22, 2009
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 Replies
Jan 15, 2010
I have a code:
import fl.controls.RadioButtonGroup;
rb1.label="C++";
rb2.label="ActionScript 3.0";
[Code]......
View 3 Replies
Jul 1, 2010
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 Replies
Nov 29, 2010
I 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 Replies
Oct 11, 2011
how to set the tabIndex for the RadioButton of a same group.
View 5 Replies
Aug 12, 2009
I 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"/>
View 1 Replies
Mar 17, 2010
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].....
View 1 Replies
Dec 30, 2010
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.
View 1 Replies
Jan 19, 2011
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 Replies
Apr 19, 2011
I 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]....
View 1 Replies
Nov 30, 2011
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]....
View 1 Replies
Aug 14, 2009
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]....
View 3 Replies
Dec 5, 2009
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].....
View 0 Replies
Mar 11, 2011
how to tween the buttons separately.
View 1 Replies
Jan 6, 2005
[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?
View 14 Replies
Mar 17, 2009
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.
View 1 Replies
Oct 23, 2003
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 Replies
Apr 9, 2009
I 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 Replies
May 19, 2009
I'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]...
View 18 Replies
Apr 27, 2010
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