Flex :: How To Change Facial Expressions
Jan 21, 2011I need to change photo of a person in different face expressions of that person(smile, sad, ...).
View 1 RepliesI need to change photo of a person in different face expressions of that person(smile, sad, ...).
View 1 Repliesis there any documentation on the FlexBuilder "expressions" tab, and what expressions it can accept?As far as I can tell, it can show the value of variables, but that's it: comparisons, function and method calls all fail: [code]this is specific to FB3 Flex Builder. Apparently FB4 Flash Builder is slightly less incompetent.
View 2 RepliesI'm writing a HTML parser in Flex (AS3) and I need to remove some HTML tags that are not needed.
For example, I want to remove the divs from this code:
<div>
<div>
[code].......
How i write the inline conditional statement in Flex with two expressions(case) [code]...
Flex compiler only check the first expression and on behalf of that give result.But i want to check both statement and show result.
PHP Code:
var ten:uint=10;var twenty:uint=20;var thirty:uint=30;trace(thirty>twenty>ten);//falsetrace(thirty<twenty<ten);//true
I'm coding in AS2 using CS4 if it matters.Can I use regular expressions in this environment?
View 3 RepliesI need 3 different regular expressions one that finds at the beginning of the string a 'D' and a space then a name, so 'D patrickgates hello there' would return 'D patrickgates', or if all possible would return just 'patrickgates' one that will find the @ sign and a name together anywhere in the string so '@patrickgates hello, world' would work and return '@patrickgates' or if at all possible would return just 'patrickgates' one that will find 'RT' and a space and then '@' and the username at the beginning of the string so 'RT @patrickgates' would work if returning just the username and also being true isn't possible with one regex, then I could use one to match to, and one that will delete the 'D' or the '@' or the 'RT'.
View 2 RepliesWhat is the best (highest-performance/lowest memory-usage, etc.) way to compile a regular expression in AS3? [code]...
View 2 RepliesIs it possible to save more complex expressions in variables and use it later/in an other object?
For example:If i want to store the expression (not the value) of in a variable, for exampe type something in an input textfield and then use it during runtime.
Say i type "mc._x +100" (without "-marks) into the textfield myText on stage (while the movie is running)
[Code]...
I'm not very good at regular expressions, but I would like my script to replace
Code:
<a href="somepage.html">
by
Code:
<a href="event:somepage">
I have several custom functions that I import as .as files, but I frequently have to modify them to suit projects, which makes standardization and version tracking harder.Is there a way to pass arbitrary expressions to a function when it's called? For example, if I write the function,
Code:
function foo(){
for(i=1; i<=1; i++){
trace(i);
}
}
would there be some way to attach an additional expression after the trace function during the function call? As in,
Code:
foo(do_stuff_here);
where the function would act as if it had said,
Code:
function foo(){
for(i=1; i<=1; i++){
trace(i);
[code]....
but without modifying the original function?I realize I could add an expression to the original function within a conditional, and toggle it via an argument within the call, but since I don't know what I'll add next, or whether I'll need it next time, this would become impractical quickly.
i am experimenting with parsing textfiles into different formats, and found the regular expressions in AS3 which should do the job. The problem is, i dont understand how it works.The examples below are just to show the sort of function i am looking for (to start with).[code]
View 10 RepliesI need to convert Java regular expressions into Actionscript regular expressions. There apparently aren't any premade converters, so I'm trying to write one myself. Is there any resource that'd list all the differences? I'm aware of regular-expressions.info, but there doesn't seem to be a comprehensive listing of differences there.
View 2 RepliesI have two strings.One looks like this.
Code:
[12] => Array ( [type] => 2 [name] => Width [value] => 3 )
The other looks like this.
Code:
[13] => Array ( [type] => 7 [name] => Blocks [value] => Array (
[0] => 4
[1] => 4[code].....
In those two strings, I need the Width value and the Block id value. Since the Width only has one value, I am going to put it in an int while the Block values are going into a Vector. Now...how in the world do I get the necessarily information out of this mess.
I'm trying to use regular expressions with the String.replace() method to manipulate a string to replace all instances of a forward slash "/" with a period "."
So for instance, if I start with this String:
"things/stuff/cheese/yum"
I want to convert it to:
"things.stuff.cheese.yum"
Easy enough if I want to replace a letter... let's say I wanted to replace all instances of the letter "e", I would do this:
Code:
var str:String = "things/stuff/cheese/yum";
var myPattern:RegExp = /e/g;
trace(str.replace(myPattern, "."));
// returns: "things/stuff/ch..s./yum"
... but how do I replace all instances of "/"??
I am trying to find if a substring (pattern) is included in a string (path). I use the search method of String class, but if my pattern string includes regular expressions special characters (i.e. ()$), the search function returns (-1). How can I escape these characters?
Code:
// with path="hello$world" and pattern="hello$" this returns -1
function checkPath (pattern:String):int
{
var reg:RegExp = new RegExp(pattern);
return path.search(reg);
}
I have to parse out color information from HTML data. The colors can either be RGB colors or file names to a swatch image. I used [URL] to develop and test the patterns. I copied the AS regular expression code verbatim from the tool into Flex Builder. But, when I exec the pattern against the string I get a null. Here are the patterns and an example of the string (I took the correct HTML tags out so the strings would show correctly):
[Code]....
I'm using regular expression to search word in a string, for example
var patrn:RegExp = new RegExp("\bit's\b");
var str:String = "Heres my problem in it and it's so help me guys.";
trace(patrn.exec(str)); //result is null
My problem is I can't search the data in a string which has special character like ('/,/.). What regular expression string is capable solving my problem?
I am looking for a watch expression debugger for Flash AS3 (not flex). I have found this: demonsterdebugger but the refresh is not in real time (like the trace does), it has a lag of 3 seconds. It is important because i am developing a flash box2d game so I need the coordinates while playing.I've tried also KapInspect with the Digiex pluging, but it gets down the framerate and it is embebbed. So it is not good for me. Can you please tell me one good debugger? I am using Flash Builder 4 (it has not whach expression inspector)
View 1 RepliesI've gotten stuck on some issue using AS3 and RegEx. I'm trying to use a RegEx var to match out the ends of a mathematical expressions out of a string. But for some reason, the RegEx only matches the first expression and ignores the one after the conditional.
[Code]....
I want to alter the text color inside a string that has some HTML tags using regular expressions.My question is how can I alter the letters only of the text between html tags and not inside the html tagsI am using something like this:
ActionScript Code:
var exp:RegExp = new RegExp(textfield.text,"i")
str = str.replace(exp, "<font color='#FF0000'>$&</font>");
[code].......
I am displaying a combo box in something of a WYSIWYG preview. I want the user to be able to click on the combo box and see the options inside, but I don't want them to be able to change the value. I tried using preventDefault() on the change event but it doesn't work. I don't want to disable it because I do want the user to be able to "look inside" the dropdown.
So I'm trying to block the change, but can't. My next resort is to change the selected index back to what it was before the change, Is there any way to do this within the scope of a ListEvent.CHANGE event listener?
Current Workaround is to basically re-assign the controls selected item the same way I am defining the selected item when I originally build it (a default selection). So a user sees their change then it immediately changes back to the default selection.
I've got a whole bunch of data being displayed in different Labels, now I'm adding an edit state. I'd like all the labels to "transform" into TextInputs. I was just wondering if it possible to uses states to change
View 1 RepliesIs there any way to concatenate E4X expressions? If I store "half" a path in a variable, can I concatenate the way I do with Strings?
View 3 Repliesi need to change the automatically generated index.html flex output to admin.anotherExtension. I understand that if i change the index.template.html the changes in html level will be preserve when the file is generated, however i need to change the name of the file also, and the extension.
View 1 RepliesI create an HBox, fill it with a grid of buttons, and set the scroll policy. When I resize the window, the stage changes size, and so does the HBox ... to a point. Once it reaches the height of the Grid it contains, it stops shrinking, like it has a "min-height". This ruins the scrollbar that I'm trying to establish in this case.
I've set the height to 100%, shouldn't it always take the height of the stage, it's parent?[code]....
I have a button with a click event of "currentState='someState'". Is there a way to tell component to do some function like for example "Function()" when the state changes to "someState"? So execute a function when the state is changed.
View 1 RepliesHow do I change from <forward></forward> to <backward></backward> without delete in actionscript?
View 2 Replieshow do you change the text inside of a text control when a user has clicked a button. I could not find a way to do this. I used an event handler to input a .xml to a string and then to the text control. This doesn't seem to work.
View 1 RepliesI'm developing a flex application with 4 tabs. When the user switches a tab I want to reset the previous tab to its initial state. Also I need to alert the user, if he hasn't saved the changes he made if any, will be lost.I'm planning to set a variable in the Model, and set/reset it if any change happens in a field under a tab. But how do I monitor this? Is there any listener available for this?Also how do I check and reset the state of the previous tab? The contents that come under the tab is from components only.
How do I check if the user has made any edits in the current tab? Some fields are generated dynamically too.I'm calling a function in the onchange event of TabNavigator and asks the user if he really want to switch the tab.I want the other tab to load its contents only if the user clicks Yes to the Alert box I'm popping up. But now the confirmation box pops up, and the contents are loaded into the other tab and if the user clicks No it goes back to the other tab. How do I prevent the action of loading the contents of the other tab at all till the user presses Yes?