Flex :: Spline For Non Differentiable Function?
Jun 16, 2009
I have a function that sometimes is non-differentiable at a point. When I now use a spline (Bezierspline in degrafa) for interpolation the interpolation at this point does not work as expected (at this point my function has a kink). Now when interpolating with a spline it draws some kind of loop around this point. I think this happens because the spline needs the derivatives of the functions which is not unique at this point.
View 2 Replies
Similar Posts:
Jan 20, 2011
I am trying to create a similar effect to what is used in CityVille for dropping coins and experience icons, they do a custom move animation and it first moves a little bit up and then down. It looks like it is following a spline or a sine function.
View 2 Replies
Jun 8, 2009
I want to insert a bezier spline into my Canvas by this code
<mx:Canvas
id="graphCanvas"
width="100%"
[code].....
View 1 Replies
Aug 26, 2011
I was hoping someone could help me working out some advanced data reformatting. What I'm hoping for is a function where I can input a value along with an array of key positions like so:
function remap(percentage:Number, keypoints:Array) { ...
The array would start with the minimum and end with the maximum point, with nested key points along the way. For example, I would input something like remap(0.25, [0:0,80:50,100:100] ) and the function would 'imagine' a spline curve graph from (0,0)-(100,100) with a key point of (80,50), then return the y value that is 25% along that graph.
View 1 Replies
Aug 27, 2011
My Flash application receives B-spline data from an external application but the Flash drawing API only allows quadratic bezier curves using the Graphics#curveTo() method.Is it possible to convert a B-spline into a series of curveTo() calls?
View 1 Replies
Jun 18, 2011
Attached is a mockup of what I'm after. Notes:
1. Spline appears smooth
2. Spline does not necessarily go through the points
3. The start and end point of the spline is not important
I'm sure there are ways to calculate this, but without knowing the proper terminology searching isn't turning much up,
View 5 Replies
Nov 25, 2010
I have five dots(MovieClips) in my stage. I want to draw a curve which should touch all the five dots. The x position of dots are incremented by 50 px and y position is random.I can do this using lineTo. But it has not got any curve effect.
Here is the code using lineTo
Code:
_root.createEmptyMovieClip("circle",1);
with (_root.circle) {
clear();
[code]...
I tried curveTo to achieve this. But it is not working.
View 2 Replies
May 22, 2009
Let's say I have a Custom Event Class, and it has several Event types stored in static Constant:
[Code]...
Is there an easy way to validate that the type passed to the Constructor is one of the Static Constants of the Class, without having to check it against each value?
View 5 Replies
Jan 10, 2012
I have an AS3 program that calls a function multiple times. The function must return multiple variables, so I created a class for the function to declare an object containing all of these variables. For example, here's my class:
package
{
public class PER
{
[Code].....
Let's say the calling program calls the function, which returns the variables into data_set1 (where data_set1 depends on input variables arg1, arg2, arg3) using:
var data_set1:PER = function_name(arg1, arg2, arg3);
The calling program does some stuff, then calls the function again, but returns the variables into a new variable name, data_set2:
var data_set2:PER = function_name(arg4, arg5, arg6);
My intention is that data_set1 and data_set2 are different (e.g. not linked together).
My question is, given that arrays are passed by reference, will data_set1 be modified to agree with data_set2 upon the 2nd function call? Why or why not?
View 1 Replies
Aug 4, 2009
Given a Function object, can you get its name as a String? See example:
function doThingWithCallback(callback:Function):void {
trace("i'm going to run " + callback); // outputs "i'm going to run function Function() { }"
}
[code]....
This example is sort of arbitrary, but it would be very useful to get function names for debugging, particularly when passing around Function objects.
View 1 Replies
Aug 11, 2011
I have a TabNavigator, and each tab is a Module. One of the modules is labelled Units and the full code of the module is posted in this post. There are several problems:
1) Forms are not populated with data from the datagrid selection.
2) Selecting a row and clicking delete gives the very-common error: TypeError: Error #1009: Cannot access a property or method of a null object reference.
A trace on the valueObject unit within the selectionChangeHandler function gives NULL. Why? Note: In other modules (other tabs of the TabNavigator), I have DropDownLists populated with units. This means that the valueObject Unit is defined in the other modules. However, valueObjects should be private to modules, and not shared.
[Code]....
View 1 Replies
Mar 14, 2011
I have a small question. I am probably misunderstanding something, but when I do :
[Code]....
View 1 Replies
Sep 1, 2010
I want to call an App function inside a (I know about the Component scope already).What I mean is this:
<mx:Script>
<![CDATA[
public someFunction():void {
[code]......
View 1 Replies
Nov 1, 2010
I've got a Vector of ViewToActionMap objects, which have following constructor:
public function ViewToActionMap(_forModule:eModule,
_forAction:eViewAction,
_toFunction:Function,
[code].....
View 1 Replies
Aug 11, 2011
OK, from what I know actionscript in Flex runs asynchronously. I need the ability to run a method in a loop synchronously. Consider this code:
public class CustomerContainer extends VBox
{
public function CustomerContainer ()
{
[Code]....
This is not my exact situation as it is a bit more complicated to explain here. There is an abstract class and several custom view objects derived from it. Some of the views are dependent on others being completed first but I cannot seem to order them in the correct order. TIMERS are not an option. Probably not explaining this correctly.
View 2 Replies
Oct 8, 2009
I've been banging my head against the wall with this one. I have the following set function in Flex. [code]If I set the periodChangeAmount to -1 or 1 the set method gets fired. If I set it to zero it doesn't get fired. What's the deal? Does anyone know why it wouldn't get called when setting it to zero. If I change the object type to a number or even an object it still doesn't work as expected.
View 2 Replies
Dec 22, 2009
I want to export some of my functions to external so that other people can embed my SWF into their's and invoke the function, how can I achieve that?
View 1 Replies
Mar 24, 2011
I am trying to add a button to a group in a Flex 4 application from within a function like this[code]...
View 1 Replies
Apr 16, 2011
I want to call a function only when the air application is run on a system for the first time after installation. Is there something I can check to determine this?
View 1 Replies
Feb 29, 2012
I want to replace the tags "<" with < and ">" with "'>" in following xml:
<HISKPI>
<HISKPIValues StrategyID="0" PrimaryKPI="103" MonetaryBenefit="Yes"/>
<HISKPIValues StrategyID="0" PrimaryKPI="104" MonetaryBenefit="Yes"/>
<HISKPIValues StrategyID="0" PrimaryKPI="105" MonetaryBenefit="Yes"/>
</HISKPI>
How it can be possible.
View 1 Replies
Jul 27, 2009
package asas
{
public class main extends EventDispatcher[code].....
I have this class and a MXML file... how will i call the function doCheck in button. When i call like this, it throws me an error.
<mx:Button
styleName="LoginButton"
id="loginButton" [code]...
View 2 Replies
Sep 4, 2009
I have a component that I hand over a function
public var func : Function;
Now the function is a function that has parameters in its signature
public function myFunction(s : String) : void {
doSomething(s);
}
from my component I can call the function with
func.call();
how to invoke the function with its parameters?
View 1 Replies
Sep 21, 2009
I want to make a Flash or Flex front end for my R code, I want to call an R function from a website (using Flash) what is the best way to go about connecting Flash and R?
View 2 Replies
Nov 11, 2009
How can I pass a 'set' function as the Function Object argument of another function?eg:
public class IdModel
{
private var _id:String;
[code].....
View 1 Replies
Dec 21, 2009
Say I have four sub-classes of 'Car'. One for each color. I want to have one function that can build and return a 'color-car' sub-class based on the passed value. This is a dumb example, I know, but it is precisely what I am trying to do only on a smaller scale.
public class Car
{
}
public class BlueCar extends Car
[code]....
Ok. You get it. This doesn't work for a reason unknown to me. I get 1118 errors which complain about conversion of BlueCar into Car, etc...
View 4 Replies
Feb 1, 2010
I'm a complete Flex/Flash noob, running Adobe Flash Builder 4 Beta 2. I have a main component that needs to be able to call several popups, each mostly the same except for one function and a few labels. Obviously, I'd prefer to be able to define this function and change those labels when calling the popup instead of having tons of .mxml files with nearly the same code, I just don't know how to do it. I figured out how I can change the labels, but not sure how to redefine the function.For simplicity's sake, let's say my code looks like this:
main.mxml:
<?xml version="1.0" encoding="utf-8"?>
<mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" :s="library://ns.adobe.com/flex/spark"
[code].....
View 2 Replies
Feb 6, 2010
I can't seem to get this right and everything I read is kind of like my problem but not quite. This seems like it would be pretty easy. All I want to do is set the value of a datafield using a function. I call in an xml file and can set the value of a datafield from that xml (in this case it's a category id as a number). But then I want to translate that number into a name by correlating it with a different data array.
so basically i just need to pass the catId into a function in the datafield but can't get it to work.
<mx:DataGridColumn color="0x00101F" textAlign="center" editable="true" id="categoryField" headerText="CATEGORY" dataField="getCategoryName(@catId)" editorDataField="text"></mx:DataGridColumn>
[Code]....
View 1 Replies
Feb 20, 2010
I'm just wonder if its possible to change States via a function in flex?
View 1 Replies
Mar 3, 2010
I've got a flex project that I'm working on. Currently I've got a popup that consists of another mxml file containing a form.
Once the form is filled in and submitted I'd like to run another function then the popup closes on the main mxml file, but I'm not sure how to go about doing this?
Here's my popup code
private var weightadd:weight_add; //POP UP ADD WEIGHT FORM
private function weightAdd():void {
weightadd = new weight_add();
[Code]....
Currently in my weight_add.mxml file I'm using a button to close the popup, I'd like have this button close the popup and then call a function in my main.mxml file - I'm just wondering how I go about doing this.
<mx:Button x="186" y="83" label="Cancel" styleName="formbutton" id="cancel_button" click="PopUpManager.removePopUp(this);"/>
View 1 Replies
Jun 6, 2010
I have a set of data (in ArrayCollection) and I need to fit a power function { f(x)= B + x^alpha } to it, before display in LineChart. As result I need the alpha and B paremeter.
View 1 Replies