ActionScript 3.0 :: Why Concatenation Instead Of Add

Oct 20, 2009

trace(_thumbArea.getBoxHeight()); // 108
trace(_xml.verticalThumbSpacing); // 4
var shiftValue:int = _thumbArea.getBoxHeight() + _xml.verticalThumbSpacing;
trace(shiftValue); //1084

View 2 Replies


Similar Posts:


ActionScript 3.0 :: String Concatenation Onto Variable Name?

Aug 21, 2009

I've got this nasty 'switch' satement bugging me, not an ideal solution by any means.

I would like to refine it into a function, but I am stumped with an issue. My code is as follows:

[Code]...

View 4 Replies

ActionScript 2.0 :: Scooping Using Slice Concatenation?

Mar 19, 2011

When I trace the variable it comes out fine. But when I try to toggle the visibility with it, it doesn't work. I can toggle visibility when I manually type the path name. What am I missing?

[Code]...

View 3 Replies

Flex - Dynamically Setting Xml By String Concatenation?

Jul 2, 2010

I'm trying to read xml fields (with actionscript 3), but the problem is that I choose which field to read dynamically. For example, I may need to read test19 or test39 or test12 or anything else.

var value:Number = event.result.test19;
var value:Number = event.result.test39;
var value:Number = event.result.test12;

Is there a way to construct that event.result.test19 part dynamically? Something like the code idea below

[Code]...

View 1 Replies

Actionscript 3 :: Dynamic Instance Variable Name / Concatenation?

Feb 18, 2011

I have an array of project type codes like this:

project_types_array[0] = "p"

project_types_array[1] = "exp"

and a corresponding set of movie clips, exported for actionscript, with names:

type_p
type_exp

I want to somehow dynamically attach a movieclip on the stage according to the project type that exists in the array. I could just do something like this:

[code]...

View 1 Replies

ActionScript 3.0 :: Reference A Variable By String Concatenation?

Feb 7, 2011

I want to reuse these two functions for about 10 items that need to be dragged and dropped. I need to reference 10 Boolean variables on the main timeline by building strings in the functions to make up the Boolean names so I can reuse the functions. Check the coded in red. [URL] Fla is above

[AS]
stop()
var startX:Number;
var startY:Number;

[Code]....

View 1 Replies

Actionscript 3.0 :: CurrentTarget And Concatenation - Control A Movieclip With The Name Of "SuboneNav"

Jun 20, 2010

I was wondering how I can use something like: var mc:MovieClip = MovieClip(e.currentTarget); as part of another instance name. For example if the currentTarget was a move clip with an instance name of "oneNav" and then I wanted to control a movieclip with the name of "SuboneNav", how could I do it? All the variations of concatenation I'm familiar with weren't working (different variations of ["Sub"+mc]). I tried getting e.currentTarget.name instead but there are issues with using what it returns to reference a movieclip etc...

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved