ActionScript 3.0 :: Dynamic Links In Textfield?
Dec 17, 2009
I'm building a website which includes a news section that is updated via a CMS by my client.Each news article basically consists of a textfield made up of several paragraphs. was wondering if anyone knows of a way of "auto-detecting" any links within the textfield. Basically what I want to do is whenever the client enters a string within the textfield that starts with "http://" I want to dynamically add an eventlistener to that string and make it function as a hyperlink.I have tried several ways but as far as my knowledge goes one can only add a listener to a display object and a string within a textfield is not a display object, and even if I would change the url string to display object of its own, aligning it within the original textfield will be a nightmare.
View 4 Replies
Similar Posts:
Dec 13, 2010
I have developed a rolling credits style movieclip in Flash using Actionscript 2. Text is loaded from an XML file and parsed into a dynamic textfield. This text includes hyperlinks to webpages defined by a url node in the xml so Flash can add the appropriate a href to the dynamic text field and make the link clickable.
In my first attempts to do this the textfield stayed still and all the links worked fine both testing locally and when I run it in a browser on my website.Then I wanted to make things move ... which I achieved easily enough and tested locally (from within Flash Professional) and the links remained clickable, a browser window opened and the webpage i was expecting to see opened... great
However, when I export the swf, upload it and run it from my website suddenly the links are not working. So I tried to test the movie in a browser from Flash Pro - same problem, it must be something to do with Flash Player and the moving dynamic textfield.
a couple of observations - the cursor will change to a hand icon when over the links as you would expect, and if I right click on the link and click open in a new window the link works ok, just not when I left click. If I stop the scrolling then the links become clickable again, it is only when the textfield is moving... actually its not technically scrolling, im moving the whole textfield.
View 1 Replies
Jun 16, 2010
Is there a way to disable links in a textfield(i.e. you press on a text with a link and nothing happens)?
View 3 Replies
Nov 16, 2011
Is it not possible to tab to links in a TextField?
View 1 Replies
Oct 5, 2011
I parse an xml file that his content is:
Code:
<?xml version="1.0" encoding="utf-8"?>
<operators>
<operator><name>OPerator1 </name></operator>
[Code].....
I display the name of operator in a TextField after parsing the xml file my problem is to loop through this different TextField with a fade effect.
View 0 Replies
Jul 29, 2011
Is there any way to create links inside large textfields without setting the textfield as an HTML textfield? I don't want to set the link to all the text in the textfield, only to some words in the text.
View 1 Replies
Aug 13, 2009
When i put a dropshadowfilter on a dynamic textfield with html-content, the links (a href) stop working.The textfields rotate in flash 3D space so they have a transformmatrix applied to them. Could this be the reason? Anybody had problems with html-links and dropshadowfilter applied to the textfield? it makes no difference if you put the filter on the textfield itself or the movieclip container around it.
View 2 Replies
Feb 7, 2007
When a user clicks on a URL, I want the new page to open up in a new window (or tab),instead of always in _self, which of course replaces the movie. I've trace'd the htmlText contents, and see TARGET="" where it's building the clickable links, which I assume the browsers interpret as the same thing as _self. Is there some better way to change the target for any URLs, short of doing a search and replace of the htmlText field
View 9 Replies
Jun 12, 2011
What I have is a dynamicly created row of movieClips. In which TextFields are added with text that's received from an Array. What I would like to be able to do is click on the movieClip that's visible and have the code understand I clicked array[3] for example and it will show the 4th array item in another textfield.
Current development: [URL]
and code:
Code:
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.events.Event;
[Code].....
View 5 Replies
Nov 25, 2010
Have an Input textfield and write e.g. 123 in it (This is on frame 1).Then later in frame 3 I want that number to be shown in a Dynamic textfield.How do I do that?
View 0 Replies
Sep 28, 2010
I have 2 input textfields on the stage and 1 dynamic textfield.
-input1 is for quantity
-input2 is for page count
When a user enters a number into the page count it makes a calculation and places the outcome into the dynamic textfield. This textfield is for the individual price.All of this so far works. What I want to do now is create another dynamic textfield for the total. So the individual price is multiplied by the quantity and this result is put in the new dynamic text field. I have the code for that working but here is where it gets tricky (for me anyway).The total price is to start off invisible. When I roll over the individual price the total price is to appear (For a test lets just say when I roll over an area the total price appears).To stop cursor flickering this should be done inside a movieclip. So... I have create a movieclip and placed a dynamic textfield inside it. They all have instance names BUT how do I reference it in script?I need to tell the resulting calculation to be placed inside the textfield which is inside the movieclip. If it isn't inside a movie clip I can do it. But how to I reference it when inside one?
View 1 Replies
Oct 14, 2009
I have built a 3dcarousel off a tutorial from this great site [URL]...There are some things I just cant work out after many hours of Googling and scratching my head I thought I would ask some more experienced peeps.
Firstly I need to add some links to the dynamic text field. Secondly I need to add a simple preloader as the carousel takes a while to load especially when all the text is in Japanese which it all will be eventually.
I am actually looking for skilled flash programmers to be able to use on a freelance bases as I run a small website business.
View 2 Replies
Jun 18, 2009
Im trying to create same MCs and create a textField inside each MC created, then I am trying to apply onRollOver event into those MCs created and change the textField.textColor.
From my code Im resulting and trace with "undefined" how can I manipulate the dynamic created Textfield inside the dynamic created MC
Here is my code:
for (var i = 101; i < 103; i++)
{
if ( i != 115 and i != 116 or i != 126 or i != 127 or i != 134)
{
[Code].....
View 3 Replies
Aug 11, 2009
I'm creating a playlist for a music player, and I've got the song names displaying correctly in my songTitle holder MC, but there's limited space for the song names to be shown in, and I'm going to eventually have it inside a scrolling movieclip. Problem is, the text inside the textfields disappear when I try to add a mask to the movieclip they're being loaded into. I've tried adding all combos of embedFonts, antialias, and blendModes I ran into, to no avail.how to mask dynamically created textfields with a non-dynamic (Flash IDE-made) mask.
Code:
for (var i:int = 1; i <= _size; i++) {
var pl_artist:TextField = new TextField;
//all embedFont = true and antiAlias commands no workie
}
View 4 Replies
Jul 23, 2009
How do I make my email address and URL linkable
This is the copy on my actions layer[code]...
View 3 Replies
Aug 18, 2009
Okay I'm trying to make a navbar which is dynamically created when the flash movie starts, and the number of buttons and their links are defined by XML.So far, I've got the navbar making itself correctly and taking button names and number from the XML page.What I cant seem to figure out is how to have actionscript 3.0 take the link address for a button from the XML and use it to make the appropriate button navigate there when clicked.My XML is layed out like this;
buttons spacing="2"
button label="MOTION" path="www.google.com"
path="www.google.com"[code].......
Using this returns this error message; ReferenceError: Error #1065: Variable navigateToURL is not defined.at app.gui::MenuButtonMain/golink()
View 1 Replies
Aug 25, 2009
Here is what I'm trying to do: recreate the news ticker from [url]...
HEre is the trick: The client wants to be able to change the news themselves via an external .txt file, the also want each piece of news to link and the link will change..
I've got the text loading into the .swf just fine, but I have no idea how I can make the news pieces hot to a dynamically changing link that will be changed by them
View 6 Replies
Oct 26, 2009
I'm trying to make a twitter application for an assignment I have for uni. It's going to basically be a word association game of sorts, where a user enters a word to search for, and the latest tweet with that word gets displayed; this is where I'm up to: I want to make it so that the user then clicks on one of the other words in that tweet, and then the application searches for that word. I can't figure out how to get the text to refer back to itself so that it, for example, returns a string that I can pass back into the code and re-search for it.
View 1 Replies
Dec 16, 2009
I am working on an e-commerce site at work. The html pages are dynamic and created by a server. When a visitor logs into the site a session number is created for them and it becomes part of every link in the html page. This happens so the visitor doesn't have to keep re-logging in every time they hit a link. I have a Flash movie on one of these pages.This movie has button links that I want to lead to the dynamic html pages of the siteIs there anyway the actionscript for the buttons that link to the dynamic html pages of the site be updated within the .swf to include this dynamically created session number when a user logs in to the site? Can this happen automatically? In other words can links in a swf be created dynamically by a server?
View 0 Replies
May 8, 2011
I'm currently working on a flash website. On the homepage I'd like to incorporate a dynamic list of links similar to the one found in the main content area of URL.. (you will need to visit this site for my post to make any sense)Due to my low level of experience, I do not expect myself to accomplish this in the near future, however I would like to work towards it. What i'm looking for are pointers of what areas of AS3 I should begin researching to achieve this?
- The links are taken from an XML file, and the site is updated through this.
- When a new link item is added to said XML file, they're pushed into an Array.
- The position of the object in this array is somehow referenced in the XML file, and this provides the appropriate link.
- There is some sort of conditional statement that sees if the link added is text or an image, and based on this a different tween is used for the rollovers/outs etc of each link.
- There is a maximum character limit set to each page of links, and when it is exceeded the links are pushed to the next page, and the dynamic text is updated accordingly, specifying # of links etc.
Is there a more efficient way to go about creating a list similar to the one found on ogilvy.com?just pointers on where I should start in building this sort of application.
View 1 Replies
Feb 23, 2009
I have a site that has multiple pages of similarly sized buttons. These are magazine covers. I'd like for the mag covers and links they point to (loaded swfs) to be dynamically loaded via a text file, if possible. The client always has new magazines she's been in and to manually load the newest buttons first is a pain and time consuming.
View 3 Replies
Jan 18, 2004
I have a dynamic text box which loads variables from a PHP file (which in turn loads everything from a mySQL database) and there are links in it. When loaded, the links look like links, but they do not act like links. They are not clickable at all. I don't understand what's wrong because I used the same exact technique on another site (actually the predecessor of what I'm working on) and it worked perfectly. If you'd like to see the site in (beta) action, go here. Here is the code I am using to load up the stuff...
[Code]...
View 8 Replies
Aug 3, 2005
i'm bringing text in from an xml file into a dyn text box. is there anyway to incorporate a hyperlink in that dynamic text? i want to have a paragraph and then have links in it.
the dyn text box text will change depending on user interaction and different links from the xml will appear.
View 7 Replies
Aug 6, 2009
joining this forum may be an awesome resource for future continued use. So, I have an as2 language selection front door in development utilizing xml influenced dynamic buttons being retrofitted for a global front door language toggle.
In production, it looks somewhat like this:
I have two main buttons that the 'for-loops' add. mainTabs and subTabs. On release on the subTabs, the are supposed to getURL defined by the link attribute in the xml file. However, I cant seem to have the getURL command target the proper address.
[Code]...
View 2 Replies
Oct 21, 2002
[URL] thats the actionscript i have for a button. It makes the text appear... but, they don't work as links :S the dynamic text box (info) is set to use html, but all it does is display: Links... Click a link to get to the website! <a href="[URL]">.
View 1 Replies
Sep 10, 2008
I have created a RSS feed viewer, parsing the RSS feed with actionscript 3.0 and viewed on the stage in dynamic text boxes. The text in these dynamic boxes is scripted to link to web addresses contained in the RSS feeds in the same node as the text being displayed. So far so good. Now I need the text in these boxes to act as if they were HTML links and show an underline and color change when rolled over and clicked on.
View 3 Replies
May 25, 2009
My goal is making a navigation section that is a scrollable box. I thought the easiest solution was to make a dynamic text box and put a scroll bar on it. Worked until it came time to make the links. It is only letting me make one link for all the text. Also I think I want more control for the mouseover look.
View 3 Replies
Jun 3, 2010
I am new to flash. I have a Dynamic USA flash map. If i roll over on state it zoom in and roll out Zoom out. I want to give dynamic link for each state using XMl. Please help me out. Below is the code which i am using..
[Code]...
View 1 Replies
Apr 7, 2011
Hi, basically I want to load a website address from a txt file as a variable into flash and then when a user clicks i on that button in flash the website loads automatically
I now how to already get variables in from the txt file but the problem is the getURL method
ActionScript Code:
Here is my txt file contents:
&&link1="http: //www . google . co . uk/"&&
[B]Ps im using google just as a test for now and i have put spaces on purpose because Im not aloud too post links yet[/B]
In flash here is the script to load the variables in:
stop();
//Create new LoadVars
linkData = new LoadVars();
// Load text into dynamic text boxes
[Code]....
View 4 Replies
Dec 11, 2003
I'm inserting text in a dynamic textbox by using variables. BUT I need a centered link. I know how to use the <p align="center"> and the <a href="asfunction:link"> stuff (I am using asfunction.)
The problem is that the link mouse cursor starts from the beginning of the text line even though there is no text from left to right (because it is centered).
View 1 Replies