ActionScript 3.0 :: Unable To Click Some Words In The Text And Based On The Selection Clicked?
Mar 8, 2011
I have a simple TLF text box on stage. i want to be able to click some words in the text and based on the selection clicked got to some other place on a timeline or set a variable (not a link to an external web page).
sounds like it shout be simple but i cannot seem to find any information about it.
i seem to remember having done something similar years ago in as1 or as2.
View 3 Replies
Similar Posts:
Nov 11, 2009
I m stucked on this problem. I am not able to highlight text at second click. it's not reassign when i m trying to clear it next time. to check exiting problem please enter "hot" in text box and click on button , you ll see highlighted text. but next time whent you try to click on that it ll not show any result.
[Code]...
View 6 Replies
Feb 20, 2009
i've a problem with my setFocus. i will use [n] to identfy the line in the code. this is a MouseEvent.CLICK - function from an other dynamic,non-selectable textfield. the textfield in work is one with an embeded font and some text in it.if i use line [3], i'll get the no blinking courser and no possibility to enter some words. also if i mark some other and click after that in the input-textfield directly there will no courser anymore.but this only happens in the first time using the swf. if i first click into the input-textfield, then set the focus to something else and trying the steps i wrote over here, everything works fine.
View 7 Replies
May 29, 2009
I am wondering how I would keep the focus/selection on a TextArea even when a button outside is clicked. Like how the RichTextEditor does it.
View 3 Replies
Sep 14, 2011
how I would go about to accomplish the following:
There should be 3 dropdown menus with predefined words
1. First menu has 3 predefined options
2. The second dropdown has 5 options.
3. The third dropdown has 3 options
--> Depending on which word is selected in dropdown #2, an img (of a total of 5 possibilities) is being displayed
In addition there is a dynamic textfield, where you can enter a name, which should then be displayed along with the img.
View 1 Replies
Dec 21, 2010
I have a spark List defined as:
<s:List id="symbolList" dataProvider="{symbolListCollection}" change="symbolNameChangeHandler(event)"></s:List>
With the change handler defined like this:
protected function symbolNameChangeHandler(event:IndexChangeEvent):void {
symbolList.validateProperties();
changeSymbolView(symbolList.selectedItem);
}
and symbolListCollection as an ArrayList filled with Strings.
At first, the change event works fine, and I get what I expect.
However, if I Ctrl-click on the selected item, to de-select it, i am unable to ever select an item again.
When I click on something to try to select it, the change event DOES fire, however, the ItemChangeEvent has both oldIndex and newIndex set to -1
View 1 Replies
May 28, 2009
Here is what I'm trying to do. I have a sunroom product that is available with several different options. I have created images of every possible combination of options, and named the files like this:
DeckFurniture_NoVisor_ClearGlass_View1.jpg
Hot Tub_Visor_TintedGlass_View3.jpg
I want users to be able to choose their options, and have the appropriate picture be displayed. So to get the above image, they'd have to choose "Deck Furniture" "No Visor" "Clear Glass" and "View 1". Or to get the other one they'd choose "Hot Tub" "Yes Visor" "Tinted Glass" and "View 3"
It's not necessary to have it auto-update the image, so I was thinking they could choose their options and then click "Update", and that would in a sense pull up the correct filename from the options they've chosen. I'm not exactly sure how to tell Flash to change this master variable (the filename) whenever one of the sub-variables (pieces in the filename) change. Would I have to put a script on each option button telling it when it gets selected to change the master variable?
View 5 Replies
Jan 3, 2011
I am in the process of learning AS 3 and Flash on my own and currently using the Actionscript 3.0 Adobe Classroom in a book CS4 version. Having a problem with the Lesson Adendum if anyone has done it. This lession requires you to create two buttons. They both draw shapes on the stage. When one is clicked, it draws Rectangles on the stage following the mouse movement. When the other is clicked, it draws Ellipses instead. The problem I am having is that it just draws rectangles and not ellipses when the 2nd button is clicked. Would be greatful if someone could tell me what i am doirng wrong. Here is the code that I have so far. Apologize for the commented out code, I left it in to show what I have tried:
[Code]...
View 4 Replies
Jun 14, 2010
how do i change the item selected in a combobox selection based on a selection of a datagrid object?
View 2 Replies
Apr 6, 2009
I'm trying to allow users to download a song based on a radio button selection. And I've succeeded in getting the "save as" box to pop up, but for some reason, the file does not actually download and save after you hit the save button.
[Code]...
EDIT: Someone informed me that if the variables weren't defined OUTSIDE of the function then they would be garbage collected. I moved them outside but it is still behaving the same.
View 1 Replies
Oct 22, 2010
I'm trying to make a little program. It works right now by drawing the top shape to the dark gray area, where it then copies itself and changes color. The new shape can be re-dragged as well. What I want to do now is add a dynamic border when I click on the new object, I want the box to adjust to an appropriate size. And on mouse release I want the selection border to disappear on the new shape. I want the selection border to be dashed much like you find in many of Adobe's programs, if at all possible.
Attached is my .fla file
View 1 Replies
Mar 29, 2012
Is it possible to show or hide a comboBox based off the selection made in another comboBox. I have been looking for documentation on this to no avail.
View 2 Replies
Jun 25, 2010
is there a way to remove those buttons that are found when we right-click while the SWF file is running? those buttons such as 'play','loop',etc thx
View 2 Replies
Jan 31, 2010
so i search for keywords ofc, but...doing this isn't really my thing:input.text.indexOf("spam") != -1 && input.text.indexOf("more") ! -1 && ... etc
I'd like to make it some what like:input.text.indexOf(<database>) != -1
View 0 Replies
Jul 21, 2010
How could i disable the selection color on single click and enable it just to double click.
View 1 Replies
Mar 30, 2009
I looped my buttons just fine. However, I am trying to load a movieclip based on what button is clicked. the code loads the same movie everytime though.
View 13 Replies
Nov 2, 2010
I'm trying to build a minimum payment calculator and am having a problem with the minimum payment not being able to calculate based on the current monthly value. What I think should work...locks up the browser. I've commented out the line that is giving me a problem in the code below.
<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
View 3 Replies
Dec 18, 2011
My input text already has words in them. When i click on it, i want all the words to disappear. How do i do it?
View 3 Replies
May 12, 2010
How can I change color of text on certain words?My animation plays the text animation of THIS SALE IS RED HOT!!! I want RED HOT it to be red. It seems the array can be indexed in such a way to switch the color from Blue to Red.MY BANNER ADD
var myArray:Array = ["THIS","SALE","IS","RED HOT!!!",];
var tm:Timer = new Timer(500);
tm.addEventListener(TimerEvent.TIMER, countdown);[code]....
View 1 Replies
Jun 3, 2010
I have a scenario where I want to dynamically add words of text to a container so that it forms a paragraph of text which is wrapped neatly according to the size of the parent container. Each text element will have differing formatting, and will have differing user interaction options. For example, imagine the text " has just spoken out about ". Each word will be added to the container one at a time, at run time. The username in this case would be bold, and if clicked on will trigger an event. Same with the news article. The rest of the text is just plain text which, when clicked on, would do nothing.
Now, I'm using Flex 3 so I don't have access to the fancy new text formatting tools. I've implemented a solution where the words are plotted onto a canvas, but this means that the words are wrapped at a particular y position (an arbitrary value I've chosen). When the container is resized, the words still wrap at that position which leaves lots of space.I thought about adding each text element to an Array Collection and using this as a datasource for a Tile List, but Tile Lists don't support variable column widths (in my limited knowledge) so each word would use the same amount of space which isn't ideal. how I can plot words onto a container so that I can retain formatting, events and word wrapping at paragraph level, even if the container is resized?
View 1 Replies
Jan 4, 2010
I'm making a project in which I have a input/output text box. I'm trying to restrict the words that are able to be said in the input box, but I can't seem to figure out how I'd do that. I'd think that I'd use .replace, and possibly an if function which tells it that if a word used does not equal the allowed words, to replace it with something such as ###.
View 2 Replies
Feb 2, 2009
I am creating a dynamic text box, defining it as html, and reading a text to it from xml file. is there a way for me to pick some words in the text and color it in a different color from the one defined when creating the text box?
View 2 Replies
Aug 9, 2009
For some reason I am no longer able to select any of the movie clips I have in my 1-Frame game. I've tried all the different mouse tools, and none have worked. Flash seems to think that they have all become part of the background. The biggest problem is not being able to put more symbols in the game
View 2 Replies
Mar 4, 2010
Is it possible to count the amount of words in a dynamic text field in flash 8?
View 2 Replies
Aug 4, 2009
I have a website template in which I am trying to change the header text words and menu text words to customize the template. How do I do this in Flash CS4?
View 4 Replies
Jul 18, 2010
I just need to display Numbers as well as in Words also in the Text field.
For example
99999 - NINETY NINE THOUSAND NINE HUNDRED AND NINETY NINE
for this i plan to use Array
like seperate the given numbers to array ([9][9][9][9][9])
then convert these number in words
View 1 Replies
May 1, 2011
I'm planning to make a game that gives players the choice to search a word when selecting a character, and if that word is found, they get to play as them. I don't even have a clue what, where and how I am gonna put the list in the game for something to search it. I'll try to give an example:
A user puts "horse" into the input field, presses the "Search" button, and Flash searches the word "horse" in a list of maybe 30 or so words. If it returns no results, a message says, "keyword not found". If it is found, a picture of a horse comes up in the character preview box.
View 4 Replies
Jan 9, 2011
I have a question about textfields and I'm wondering if it is possible to change text styles of single words or lines within a textfield with actionscript.I use an empty textfield and add my text to that field in actionscript with the following code:
myTfield.text = "insert text here"the text contains multiple lines and I want some of them to be bold, italic or a bigger font size. The reason why I am adding my text to my textfield this way is because I need the text in the textfield to change when some buttons are pressed. Text will be added or removed from the textfield if buttons are pressed by the user and the current way I'm changing the text is by simply re-using the code above with new text in it. (it makes the code quite long though, but I guess I'll have to deal with that)But because I'm adding text this way I am not sure how to change the style of different parts of the text.
On a related note, with CS5 there are now a number of options for textfields. There is TLF text and classic text. I've searched around for the differences but I don't find the awnsers very clear. What option should I use for my textfield if I want it to look sharp like the text I'm typing here (its just regular text, no headers or anything). Some options just give blurry text because of the anti-alias and some settings don't seem to change a thing. And at times embedding fonts looks nice but sometimes it makes it worse. There are so many options to choose from, but it is unclear what would work best for regular text. (my text won't animate, it does move with a scrollbar, but I only care about how it looks when the scrollbar is still)
View 2 Replies
Apr 14, 2009
I'm trying to use the double click event, but its not working. I found one thread on Kirupa where Krilnon said you have to use doubleClickEnabled = true When I use it like this:
[AS]
_play.doubleClickEnabled = true;
_play.addEventListener(MouseEvent.DOUBLE_CLICK , function(e:Event):void {
trace('huh?');
vs.play(flv);
[code]....
Double clicking just doesn't do anything and the event doesn't seem to register (trace doesn't happen)....
View 2 Replies
Aug 19, 2009
When using the class listed below, I am unable to add a CLICK function that will not break the piece. I want to add another tween on CLICK that clears all mcs off of the stage except the e.target, which will have a zoom applied to it... I get my trace fine, but then I am unable to CLICK again on that particular mc, and the proximity begins to break.
Code:
package {
// Import Flash classes
[code]........
View 1 Replies