ActionScript 2.0 :: Clicked Text To Be Red
Jan 29, 2009when i click some mc in the list it shd be red and the rest white and on rollover it shd be black and on rollout white the clicked mc shd be disabled and all other enabled
View 0 Replieswhen i click some mc in the list it shd be red and the rest white and on rollover it shd be black and on rollout white the clicked mc shd be disabled and all other enabled
View 0 RepliesI've had this problem even in AS2 - what is going on? Why does text in a dynamic text box jump up a line when you click on that text box?
Is there no way to have selectable dynamic text without the text jumping around when clicked?
I have a button which opens a gallery when clicked .. this is the code:
Code:
on (release) {
ssp.toggleGallery();
}
I also have a dynamic text box and I want that exact same action to be performed when the text inside the text box is clicked. This is what I have in my txt file but it's not working,
Code:
article=<font size="11" color='#FF0000'><a href='asfunction:ssp.toggleGallery()'>Open gallery of current projects</font></U></a>
I have created a box with 5 buttons with their corroesponding color names beneath them at the left. When you click on a button it will change the box to that color. How do i get the color name that is clicked to show up under the box?
View 8 RepliesI have an issue with a web gallery that i am building and i was hoping for some help?
1. I have a stage and I add some title text to my stage and align it right and height centered.Im preview it looks fine but when i publish its in the center of the screen
2. I have menu items that are loaded from a XML file. I have added two test lines to this file that get added to the menu one text displays as "Contact me" and another called "Links"when this text is click I want to activate a Links movieclip/ wepart and a Contact for the other.I see the logic something like If clicked.text in menubar = "Contact Me" then run contactform else If clicked.text in menubar = "Links" then run Linksform End if.I am a vb.net programmer not flash any help would be great on both questions
Hi, I'm making a simple target shooting game in Flash CS3, and need to know how to make it so when you click on a movie clip, it adds 1 to a dynamic text box reading 00.
View 1 RepliesI have a textfield that has a mouse click event, and when the user clicks on the text field, I would like to make the text bold, but the following code doesn't work:
ActionScript Code:
private function onTxtMouseClick(e:MouseEvent){
var el = sng.getChildByName(e.target.name); // The text field[code].........
I have created a delete button and have linked it to a text box along with another button that displays "1" in the text box when clicked. I need a button that will then delete this "1" out of the text box when clicked.
View 2 RepliesIn Flash, is there any event when the user clicks a hyperlink in a TextField?
View 4 RepliesI have a TextField, containing some characters. The TextField is bigger though and containes some empty space. Now I need to determine if on a mouse click on this TextField, the user hit the text or if he hits the empty space.
View 4 RepliesI have a code that clear textfield when you click inside. My problem is that I have to many text fields so i am trying to write some function that can be used for all the text fields.
What I can't do is to add some other property to the textfield like I can do with any variable. So my code is:
// nome is a textField
var nome:TextField;
nome.text = "ol�" // text displayed inside the text field
[Code]....
I have a button that when clicked it displays a few lines of text. Some of the text is large, bold and some of it is normal and smaller size. The first time I click the button the text displays properly but if I click on it a second time then the text is messed up. I am new to flash and have tried several different things.
View 3 RepliesI would like to know how can i appear an image when i clicked on sublink?
I have 3 MCs: sub_bg, ImgMc and bg.
the code's sub_bg is :
function linkF(s:String):Void
{
_root.bg.txt.htmlText = s;
}
[Code]....
I posted a question like this yesterday but I was not clear in the description....i have an app i'm making in flex and I'd like to have a button's text change to a random entry within an xml when the button is clicked....the xml is in the assets folder and is titled games.xml. I would like to have a random game name be selected from the XML when the button is pressed.[code]...
View 2 RepliesI have a movie clip. Inside that movie clip, I have an input text with an instance name of text. I also have 2 frames of actionscript.
How can I make it that the 2 frames are disabled, and only enabled once you click on the input text?
I want this to happen so you can type in the input text with all capabilities. I already used setFocus, however it doesn't grant me the ability to backspace.[code]...
I have some text that is scrolling across the page like a news ticker you would see at the bottom of your TV screen on a news channel.This scrolling text has anchor tags on it (clickable links). It is a dynamic text box inside a movieclip. Problem is, I'm using the build in AS3 Tweener to animate the text across the page and 99% of the time I cannot click the links. The mouse cursor turns to a hand when I hover over the scrolling text but clicking does nothing. If I click really fast and randomly it just might work but it hardly ever does.Do I need to apply a 'display: block' type style to it?Should I use a different tweener?
View 9 RepliesI've been trying to convert and AS2 project to AS3. I've been able to load all the static items from the library and been able to get the buttons to load different text. However when I select a previously clicked button it doesn't remove the old text. here's a section of the code.
ActionScript Code:
//Add the FactFind button
var factFind_btn:factFind = new factFind();
addChild(factFind_btn);
[Code].....
Im trying to load up images as well as text when an item is clicked on the 3D carousel. How do i go about doing this?
View 1 RepliesI have a simple input text box that has some text pre entered into it eg Put your email address here.Now when the user clicks into this box I would obviously like to clear that.
View 1 RepliesI have 4 navigation button and like home, about us etc.... And i want to disable home when it is click and cannot clicked it until the user click another button first. means if a visitor is at home page then home navigation is disabled, and all other are active, and when they click at aboutus button then the pages goes to the about us page and the about us button is disabled and other get active. I want this solution in AS3 with oop concept.
View 6 RepliesI've got about 6 buttons laid out, one on top of the other in a list format. In their normal state the buttons are grey in colour, when I rollover them, the buttons flash and turn to orange. Now, what I need to happen is this: I want the buttons to stay orange once clicked and only roll out back to grey when the user has clicked on another button in the list. I've been told that the best way to do this is via adding a listener, however I am a little unsure as to how to go about this. I've checked the flash help file and have a basic understanding of how listeners work...but can't really wrap my head around applying it to this situation. Perhaps I will need to have all the buttons as separate broadcasters?
View 2 RepliesI have parent movieclip and in that many different children movieclips
What i want to do is when i CLICK, i want to detect which movieclip it has clicked and call corresponding function (defined by onpress event) of that movieclip.
What does the code look like if I want the user to click two specific buttons then go to a new frame. I've been trying different methods, but I am honestly not brilliant with conditional statements. This is what I've got so far...
about_btn.addEventListener(MouseEvent.CLICK, clickAbout);
home_btn.addEventListener(MouseEvent.CLICK, clickMain);
if (function clickMain(event) && function clickAbout(event))
[code]....
how to create a image gallery that uses arrays from a text file rather than xml (this is because the project I have now generates alot of html coding and stores it within a DB, it doesn't have any set html pages so using flash and xml is out of the question as it needs to be relative to the html page).
I have got as far as including my own way to get captions to be displayed as well....but here comes the problem, no matter what loop i have tried the captions seem to stay on the 1st caption and not change as the different thumbnails are clicked..
here is my code
Code:
var locVar = new Array();
locVar = imgLoc.split(",");
var tmbVar = new Array();
[Code].....
i have this code below that i made using a tutorial....it loads vars from txt file splits it then puts it into an array....once in an array it the brings the pics in from the array to create thumbnails and a larger image. my problem is i have captions to go with it and when i try to load the captions nothing happens or can be seen to be happening. i dont know where i am going wrong as i have no output or compiled errors
[Code]...
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.
I've got a canvas within which I have a list. The renderer for this list calls upon a "Text" field, with the "link" element of this field set to a function. The "htmlText" of the field is set dynamically to a mixture of words and links. Basically the function checks to see which tag within the htmlText has been clicked and performs an event accordingly.However, you have to click the link twice for anything to happen. Whilst debugging the code I noticed that the function referenced by the "link" element isn't actually even called until the 2nd click.
<mx:Text
id="textCanvas"
width="100%"
color="0x323232"
selectable="true"
link="{lbl_link(event)}" />
I've changed the code a little bit to make it easier to follow, but the ActionScript is roughly as follows:
private function creationComplete():void {
textCanvas.htmlText = "Hello <a href='event:username'>" + username + "</a>";
}
[code]....
The code runs fine, but the problem I'm having is that the text box that is suppose to go onto of my answer buttons is behind the button itself... however, if I change two lines of code around, the answer validation code doesn't pick up the which answer was clicked (it returns undefined). This is infuriating!Look for the line "//INSERT HERE." If I take the line, "var answerField:TextField = createText(answer,answerFormat,answerSprite,0,0,450);" and put it there instead, it returns the right answers (doesn't return undefined), but I can no longer see the text. I've included the createText function as well.
private function askQuestion()
{
trace("asking question...");
[code]......
I haven't been able to find a solution that fits my project. I am working on a 50 state map, where I need each state to stay down once clicked, but go up when any other state is clicked. [code]...
View 9 RepliesI want to create a custom LinkBar in which the item which is selected shown with some space before the text or anything else as shown in the Image below.
when second item is selected then Two is having some effect and move slightly to left side.
when third item is selected then Three is having some effect and move slightly to left side and Two move at its original place.