ActionScript 2.0 :: Find Minimum Of X Values?
Jun 2, 2002Does anyone know a fast and simple algorithm to find the minimum of X values?
View 4 RepliesDoes anyone know a fast and simple algorithm to find the minimum of X values?
View 4 RepliesI'm puzzled I can't find a constant for the minimum value of int in actionscript.
There's Number.MIN_VALUE, but, as the name implies, that's for Number, not for int.
I'm having a little difficulty getting to grips with the getBounds() Movie Clip function. I assumed the getbounds() method simply got the boundary coordinates for the movie Clip, that one could use to draw a rectangle. This is what I'm trying to do;I'm trying to get a movie clips coordinate bounds, and use the min and max values of x and y to draw rectangle around the object. Simple right? But in my case, I'm getting some unexpected results. I wonder does ther registration point of the object determine the coordinate values? Also are the coordinate values local to the clip instance or global to the stage?
[Code]...
here is my xml example:
Code:
<data>
<page>
<type>carrot</type>
[code]....
as you can see you have these type tags (either on page level, or sub page level).what i need is to find any repeated values (regardless of level) and append counter to those which repeat.So in this example 'corn' repeats 3 times, 'tomato' 2 times.I want this values to be changes in:
corn, corn_02, corn_03
tomato, tomato_02
so append counter to ones that repeat in order.
I want to push into someFonts ONLY fonts which start with certain letter(s) (if they are any)possible?
Code:
var systemFonts:Array = new Array();
var someFonts:Array = new Array();
[code]........
I'm struggling with something that shouldn't be too difficult but I can't figure it out I have a number of Arrays with different values and I want to find the common values all of the Arrays have, see example below:
var arrayOne:Array = ["1","2","3"];
var arrayTwo:Array = ["1","2","7"];
var arrayThree:Array = ["1","2","9","12"];
_resultArray = ["1","2"];
find a random number that is not equal to two specific values? ex:
1) find random number (let's say from 0 to 5)
2) check if the result is not 4 or 5
3) If it is, run the random function again and again until the condition is met.
Or maybe there's a way to set up that at once (find random number that is not equal to 4 or 5).
Basically there's an object in a movieclip. I want to find the location of that object in relation to the movieclip, not of the object's symbol. So when i look at the x and y of it, it wont show 0, it will show the x and y location in the movieclip it's in.
View 2 RepliesA LOT cause I would know how to change things ... right now Im dependent on tutorials and forums and such...
View 2 RepliesThis information must be on the Adobe site, but I've not had any luck tracking down the information... When creating a Mac and Windows projector in CS4, what are the minimum system requirements to open the created files on a Mac or in Windows?
View 5 Replieshow can I output the lower value inside an array of numbers? I have this but it is not doing the work, it is always returning the very first number in the array.
[Code].....
I have a string in XML format and I want to use this string as flex XML type as following : This is my string :
<Graph>
<Node id="1" name="1" nodeColor="0x333333" nodeIcon="center" x="10" y="10" />
<Node id="2" name="2" nodeColor="0x333333" nodeIcon="center" x="10" y="10" />[code].....
I cant pass this to an API, it complains that this is string and it expects an XML type. How can i convert this string to XML with minimum effort, ie: without iterating the string and the nodes etc. Is there such method as : var data:XML = new XML(str:String);
How do you set a max and min value for a variable? I have defined a variable, myVar, to have a default value of 10 at run time. The user can then use buttons to increase and decrease the amount. How do I set the limits?
View 1 RepliesI created a movie that is 39px in height and does not play. It seems as though any movie that is under 40 pixels in height does not play. I have tested this on miultiple computers with CS5 on them.
View 7 RepliesI have a really basic question using the pen tool in Flash. Is there a minimum amount of segments (or something that I'm not doing) that need to be drawn in order to close a polygon shape created with the pen tool. I've found in many instances I seem to be closing the polygon and yet when I go to fill the object it won't fill. I then discover that the beginning and end points are not "joined" together (as in Illustrator).
View 4 RepliesI have an advancedatagrid that displays a table of values from an arraycollection coming from a webservice. I am wanting to highlight either the maximum or minimum value in a row or column.I'm not bothered how they are highlighted - be it the backround changed, the font colour changed or just making it bold - I just want that particular cell to be different to the others.What I'm struggling with is finding the cell with the maximum (or minimum) value and then changing it's appearance.In one grid I want to compare across the row, in another accros the columns.
View 1 RepliesI was wondering if by using AS3 a browsers window can have a minimum size lets say 700px x 550px and that it cant be made any smaller?
View 4 RepliesI want to set Maximum and minimum value for X axis in bar chart in flex action script 3 file.
Following line in working in MXML file but I want these code in actionscript 3.
I have created a spark ButtonBar which is dynamically populated with XML and skinned to look like a standard TabBar. When I used the TabBar in Flex 3, the width of each Tab would shrink or grow to the size of the Label, plus a little padding either side. When using the spark ButtonBar in Flex 4, I find that no matter how short the label (even an empty string), the Buttons will be at least 70 pixels wide, and will expand for longer labels. I have tried setting the minWidth to 20 in various places, including on my ButtonBarButton skin, but this has no effect.
View 1 RepliesI need to change the starting and ending dates, so that the earliest date that can be chosen is January 1, 2011 and the latest date that can be chosen is April 30, 2011. Also, the user should only be able to select 30 days at a time.
View 1 RepliesI am trying to build my portfolio which is coming along fine.
I do however have a problem.. I want the site (SWF) to scale according to browser size.But, I want to implement a maximum and minimum width and height.
I dont want it to scale so that it is bigger than my stage size (1365px x 845px), and I dont want it to scale so that it can be smaller than for instance (800px x 600x). And I also want the SWF to be centered at all times.
If you need to see a working example you can see what I am trying to achieve on this site: [url]....Take a look at the slideshow when you enter the site, and try resizing your browser window. You'll notice that the pictures will shrink, but won't scale above their obvious 100% size. I tried looking at the page source, but I didnt understand much. Looks like they have used Actionscript for the resizing/aligning.
I'm building a photographer's gallery website and I need it to resize to fit in browser window. So far so easy...What I would really like to achieve is a maximum and minimum size that the gallery will go to.
So, if the images I am using are 1400x1000 (for example) when this size is reached by the user expanding the browser window i don't want the gallery to expand any more, just sit in the middle of the page.
Similarly I don't want the gallery to go below say 800x600... how to set a max/min?
I understand liquid layouts and I've built many liquid layout projects, but how do I set a minimum height to lock to, that will use scrollbars.I know I can set a minimum height by putting an if statement in the resize function, but how do I apply scrollbars when the website is that size i.e. under 600?
View 1 RepliesI´d like to know if it´s possible to find a minimum y point (where the shape ends) of a shape, in a given x coordinate.
Example: I have a complex shape like a big "S". Suppose the "S" minimum x coordinate is 0. How can I find the minimum y point of the "S" (again, where the shape ends) in the x coordinate of 14?
Here is the image: I need to find the y coordinate (or point) of the blue point in the image.
I've noticed that AS3 doesn't seem to contain a way of defining a minimum amount of characters required but does have a maximum.Any way to do this with a textfield?
View 2 RepliesI am showing a stacked bar chart with Flex, and I am dynamically changing the data of the dataprovider. However, the minimum and maximum for the y-axis do not get reset with the new data. So if one dataset had a value of -100,000, but the next dataset has only positive values, the y-axis still starts at -100,000. How can I force the chart to redraw. I tried myChart.validateNow(), dataprovider.refresh(), etc.
[Code]...
On MouseDown I start a repeating timer to position the Scrollbar-Button(Slider).When it reaches minimum/maximum it jitters (switching between min/max and stage.mouseYŚ)
How can I prevent that?
private function onTime(e:TimerEvent):void
{
if(this._scrollBtn.y < min)
I'm trying to set the minimum size of the window of a creative suite extension. I don't want the user to be able to resize the window to a smaller size than the one I define.
Here is what I've tried to do:
var instance:CSXSInterface = CSXSInterface.getInstance();
var extension:Extension = instance.getExtensions([instance.getExtensionId()]).data[0] as Extension;
extension.minHeight = 350;
[Code].....
I need algorithm ideas for generating points in 2D space with defined minimum and maximum possible distances between points.
Bassicaly, i want to find a good way to insert a point in a 2D space filled with points, in such manner that the point has random location, but is also more than MINIMUM_DISTANCE_NUM and less than MAXIMUM_DISTANCE_NUM away from nearest points.
I'm using a typical full size website that proportionally scales on browser resize.
I would like to set a minimum dimensions so the user cannot squeeze the website more than 600x420 for example. The page will then start to crop if you go beyond these dimensions.