Dynamically Generated Text, That Has Hover Links On Specific Words
I want to be able to generate text, e.g. I may want to use the string
"the cat sat on the mat"
Where if the word 'cat' is rolled over it (for instance) triggers my 'picture_mc' to display a picture of a cat.
The complicating factor is the rollover area moves with the word. So if the sentence is changed e.g. "After it went for a piddle in the kichten the cat sat on the mat" The rollover area, or areas in this case, are different.
I'm just after conceptual ideas, not code.
The best I can come up with is getting the sizes of each letter in pixels and storing this in a library array for reference. Then when generating the text, total the lengths, generating the rollover area co-ordinates. I would have to code in limits for bounding areas, and word wrap and such. I'm hoping there is an easier solution. Using a same letter size font like "courier" would be easier, but limiting.
I have a half hope that Swish can treat dymanically generated words as symbols, and I can somehow attatch behaviours to certain words (or letters).
I have been thinking about this for about 4 hours, I'm pretty sure I might be out of luck.
Anyhoo taa for any replies I get. And I guess readings too.
FlashKit > Flash Help > Flash ActionScript
Posted on: 02-04-2004, 01:32 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Dynamically Generated Buttons Links
Is there a way to generate the url link in the hit state of a button (an animated button, not a text link url) in a swf using a dynamically generated txt file?
For example in a swf I have an animated button with this code below in it so it loads page2.html. Is there a way to dynamically load the url path (page2.html) so if you needed to update the url you could open up the txt file and make the edit there rather then opening up each flash file to update/edit the url?
on (press) {
getURL("page2.html");
}
any help would be great.
thanks!
Problem Attaching GetURL Links To Dynamically Generated Buttons
I have a series of buttons on stage - dynamically generated from a single mc - inside of which is a button. After the buttons finish populating the stage I want to be able to click on each one and getURL.
Here's the code I have so far - but it disables the rollover effect of the button and each URL is the last one when clicked - even though I've added a counter.
Code:
for (z = 0; z <= mySignsLength-1; z++) {
//"sign"+z are the mcs at level0.sign0, _level0.sign2, _level0.sign4, etc.
this.signMC = eval("sign"+z);
//names is the array - letterNum is letter of the alphabet, 2nd element is the URL for each one
var addressz = names[letterNum][z+1];
signMC.onPress = function () {
getURL(addressz);
trace("click")
trace(addressz);
}
//increment to get each mc and skip URLs
z++
}
Any idea what I'm doing wrong here?
Thanks
Charles
Adding Links To CMS Generated Text
Hi there.
I've build a simple CMS for a client so that they can update text fields on their site. So far so good. My problem is that they want to include clickable links in this text. I know I can display html text in flash, so that is not the problem.
My problem is setting up an easy way for my client to add the links to the text file. I can't ask them to wrap link tags around the text they want to link from, so I need some foolproof way of them adding the links.
I'm stumped so any ideas appreciated.
Randomly Generated Words
Hi,
I need to be able to randomly generate the following words:
Entrance Exams
Maths
English
Science
All Modern Languages
Economics
History
Geography
Computing
English as a Foreign Language
Elocution
Special Needs
Singing
Music Lessons
200 different subjects
All these need to fade in from alpha 0% to alpha 100%. Then fade out again to alpha 0%. They all need to be fading in and out over the space of 200 frames, overlapping each other....so for example
English
Computing
Singing
all fading in and out at the same time. So at any given time throughout that 200 frames there will be 3 different subjects fading in and out.
Having not used Flash since v.4.0 I'm a bit stuck as how to do this. Any help would be hugely appreciated.
Questions On Dynamically Generated Text
Hi,
In the attached .fla I was wondering a few things:
1) How can I get the text I'm creating to be linked somewhere? Ideally I'd like them to act as buttons that can call a loadMovie function to load another .swf.
2) How can I make them so they're not selectable? I have .selectable = false, but that doesn't seem to work.
Take This Dynamically Generated Text To The Next Level
I have this action script:
Code:
var theXML:XML = new XML();
theXML.ignoreWhite = true;
var clubNames:Array = new Array();
var cityStates:Array = new Array();
var numMems:Array = new Array();
var nodes:Array = new Array();
var whichClub:Number = 0;
movClubName.setMask(movMask);
movCityState.setMask(movMask);
movNumMem.setMask(movMask);
theXML.onLoad = function() {
nodes = this.firstChild.childNodes;
for (i=0; i<nodes.length; i++) {
clubNames.push(nodes[i].attributes.clubName);
numMems.push(nodes[i].attributes.numMem);
cityStates.push(nodes[i].attributes.cityState);
}
movClubName.clubName.text = whichClub+"-"+clubNames[whichClub];
movNumMem.numMem.text = numMems[whichClub];
movCityState.cityState.text = cityStates[whichClub];
setInterval(rotate,2000) //calls function rotate every 5 seconds @ 5000
}
theXML.load("http://localhost/cgm/clients.php");
function rotate(){
if(whichClub > nodes.length-1){whichClub=0}
movClubName.clubName.text = whichClub+"-"+clubNames[whichClub];
movNumMem.numMem.text = numMems[whichClub];
movCityState.cityState.text = cityStates[whichClub];
whichClub++;
}
THis works great. Every 2 seconds a new entry is displayed.
Now i need for the entries to fade in.....hold for a set time.....then fade out.
then finally i would like for the text to fade in and out at different locations within the swf area. meaning, the first entry would fade in at the lower right corner and fade out. then the second entry would fade in and out at the upper left corner....and so on.
any help or direction would be appreciated. Is this even possible with dynamic text?
thanks
Ras
Dynamic Text In Dynamically Generated MCs
I'm trying to populate a dynamic text box with a number that iterates in a loop. The text box is in a serious of dynamically generated movie clips - here's a clip of the code:
for(i=1;i<=answerCh;i++)
{
attachMovie("answerchoice","ac"+i, i);
//"ac"+i.choiceletter = i; //my attempt
}
How do I get each MC's dynamic text box to populate with "i"?
Thanks,
EB
Hover Coded Links Within Dynamic Text Field
i was wondering if anyone could give me a boost on creating hover coded links within a dynamic text field. i would like to have the links change color on mouse over...
any help would be greatly appreciated.
thanks
Adding Hover Effects To Html Links In A Text Box
I was remaking my website, and I need to know if it is possible to add hover effects and all that to <a> tags in an html dynamic text box. I've seen it on other sites (whether it was in a dynamic text box I am not sure, but it looked like it since it was anti-aliased text). Does anyone know?
Adding Hover Effects To Html Links In A Text Box
I was remaking my website, and I need to know if it is possible to add hover effects and all that to <a> tags in an html dynamic text box. I've seen it on other sites (whether it was in a dynamic text box I am not sure, but it looked like it since it was anti-aliased text). Does anyone know?
Masking Dynamically Generated HTML Text
I have done the search, and the "Embed Fonts" deal DOES NOT WORK so please don't tell me to do it...
I am wondering if it has to do with the HTML part of it...?
I also tried the <font="Verdana" color="#000000"> so on... No avail.
Thanks.
Using Dynamically Generated Images In HTML Text Box
I am using Flash MX 2004. I have a text box set to "dynamic text" with HTML enabled. I supply code like this to the text field:
[HTML]<b>This text is bold</b><img src="someImage.jpg">[/HTML]
The above code works just fine. The text is bold and the image displays. I run into a problem if I replace the src for the image with the url of a dynamically generated image. For example:
[HTML]<img src="imageGenerator.php?imageId=27">[/HTML]
The above code displays nothing at all.
Is this just an inherent issue with the way Flash renders HTML? Is there any possible way to get a dynamic image to show up in a Flash text box?
Thanks in advance for the help!
How To Change Color Of A Dynamically Generated Text
hi,
pl pl help me......its very urgent for me.
I have developed a XML based image gallery. According to the xml length my script generates number on the stage like
1 2 3 4 5 6 7 8 (instead of thumbnails i have generated numbers )
then i gave click event to each number to show large image.
now i want a highlighter. that means when the user clicks on a particular number that number will turn into 'red' color and when the user clicks on other number the previous number will get back to its original color and the clicked number will turn into 'red' color.
how would i do this??
Wordwrap Problem On Dynamically Generated Text
We are dynamically generating a text box with the content coming from XML files. The XML files have some href code in to handle a glossary function. This all works fine most of the time, but sometimes when you have two glossary words near each other and you move the cursor over them, flash adjusts the word wrapping on the text box very slightly and and you get a word or two jumping from one line to the next.
Code for text box looks like this...
function createBodyText() {
var depth = _level0.holder_mc.getNextHighestDepth();
Body_txt = _level0.holder_mc.createTextField('Body_txt', depth, 20, 173, 400, 550);
_level0.holder_mc.Body_txt.html = true
_level0.holder_mc.Body_txt.condenseWhite = true
_level0.holder_mc.Body_txt.multiline = true
_level0.holder_mc.Body_txt.wordWrap = true
_level0.holder_mc.Body_txt.antiAliasType = true
_level0.holder_mc.Body_txt.selectable = false
_level0.holder_mc.Body_txt.embedFonts = true
_level0.holder_mc.Body_txt.setTextFormat(my_fnt)
_level0.holder_mc.Body_txt.setTextFormat(my_fntB)
_level0.holder_mc.Body_txt.setTextFormat(my_fntI)
}
Code in XML file which seems to sometimes causes wordwrap to redraw...
The vital role of the <a color="#0099FF" href='asfunction:setGlossary,50' >neuraminidase</a> enzyme is to break this bond and...
Any ideas anyone??? stuck on this for weeks and no luck.
Text In Dynamically Generated Textbox Not Showing
Hi
I am generating the textboxes dynamically based on the user input.
I used tbox.text="Hello"; but it doesnt seems to show anything in the resultant textbox although trace seems to work
ActionScript Code:
_root.attachMovie("Team_Name", "Team_Name"+x, x+p);_root["Team_Name"+x]._y = position; //"box"+x._y = 20; _root["Team_Name"+x]._x = 150; Tno=x+1; _root["Team_Name"+x].text="Team"+Tno;// _root["Team_Name"+x].visible=true; trace(_root["Team_Name"+x].text); // It works!!
Can anyone please help?
[MX04] Wordwrap Problem On Dynamically Generated Text
Hello
We are dynamically generating a text box with the content coming from XML files. The XML files have some href code in to handle a glossary function. This all works fine most of the time, but sometimes when you have two glossary words near each other and you move the cursor over them, flash adjusts the word wrapping on the text box very slightly and and you get a word or two jumping from one line to the next.
Any ideas!!! Stuck on this for weeks and no solution.
Loopy
Dynamically Generated Text Fields - Height/Spacing
Could some kind soul point me in the right direction - I know I must be missing something simple -
- I am generating a list of clips in a scrollPane, each clip displays some text via an array which has extracted the data from a loaded XML file, so far so good, my problem is I cannot seem to generate the right code that records the _height of the previous clip and then asigns the new clips _y axis based on that value - at the moment I have a static value, var spacing - which I'd like to be fluid based on how high the prev text field was, in order that each of the clips display their text in full - have tried various variables such as newY = (this.post_mc._height * 20) but no joy. Would someone mind clearing the air for me please?! been going great guns so far for a simple designer but this bit has me stumped
Here's my code;
ActionScript Code:
function makeThread(posts, userPost, userID, maxPosts){
threadList_sp.vScrollPolicy = "off";
var spacing:Number = 100;
// Loop through each post
var name_str:String = "post" + (posts) + "_mc";
var depth:Number = posts * 10;
// Create post clip
var post_mc:MovieClip = threadList_sp.content.attachMovie("post_mc", name_str, depth);
// Format clip
post_mc._y = (posts * spacing);
post_mc.userName_txt.text = "Posted by " + (userID);
post_mc.userName_txt.autoSize = "left";
post_mc.userPost_txt.text = userPost;
post_mc.userPost_txt.autoSize = "left";
// Check if this is the last clip
if((posts + 1) == maxPosts){
//trace("function Fired");
threadList_sp.vScrollPolicy = "on";
}
}
function init(){
var threadArray:Array = new Array();
//Loop through each post
for(var posts:Number = 0; posts < this.firstChild.childNodes.length; posts++){
threadArray[posts] = new Object();
threadArray[posts].userID = this.firstChild.childNodes[posts].attributes.userID;
threadArray[posts].postDate = this.firstChild.childNodes[posts].attributes.postDate;
threadArray[posts].userPost = this.firstChild.childNodes[posts].childNodes[0];
//trace(this.firstChild.childNodes.length);
//trace(userID);
//trace(maxPosts);
//trace(userPost);
trace(posts);
var maxPosts:Number = this.firstChild.childNodes.length;
var userID:String = threadArray[posts].userID;
var postDate:String = threadArray[posts].postDate;
var userPost:String = threadArray[posts].userPost;
makeThread(posts, userPost, userID, maxPosts);
}
}
var threadListXML:XML = new XML();
threadListXML.ignoreWhite = true;
threadListXML.onLoad = init;
threadListXML.load("threadlist.xml")
Trying To Put A Picture Dynamically Generated By Php Inside Of A Dynamic Text Box ..
Basically, I have some php code feeding variables into flash. I want to have a picture associated with some of the lines in a mysql table which are coming through the php code. Now I can get the text to be generated by flash/php/mysql but how could i make the pictures appear in the same manner. I want these all to be in a scroll box inside of flash as well... So how would I make flash display a picture based on a variable, and then how would i put that in a dynamic text box and allow it to scroll up and down with the text it is associated with (keeping it all alligned). A simple answer can be given to lead me in the right direction. Thanks in advance .
Finding Line Height Of Dynamically Generated Text Into A Variable ?
Hello,
I made a site with news flashes that are dynamically pulled from text files. They are placed about an inch apart from each other. The problem is that when a news flash is only one sentence long, there is a large gap between it and the news flash under it. Also, different browsers and platforms display fonts differently... the same 12pt font fills the area differently depending upon your browser/platform.
Is there any way to figure out information about not only how many characters is being pulled into a variable, but also the line height... or maybe the overall height of the text field. If I could find that information, then I could dynamically place another news flash under it always keeping the distance between the flashes consistent no matter what browser/platform is used.
Any suggestions would be appreciated
thanks,
Janet
Problem With Dynamically Generated Text Boxes And Special Characters
Heya
I'm loading some text from an XML document into some text boxes that are generated dynamically based on the number of child nodes in a given parent.
I'm having a problem with these text boxes displaying ampersands properly. Another (non-generated) text file can read the ampersands perfectly from the same XML document, but these smaller, duplicated fields show them as the URL code for an ampersand (&).
I have tried CDATA in my XML file... I have made certain that the original text box being duplicated is set to render as HTML and include various characters, but I still can't figure out what's causing it.
my code to duplicate the boxes is as follows:
Quote:
onClipEvent(load){
this._y = _parent.newY;
blurbText = eval(blurbID);
textBox.autoSize = center;
this.createTextField('text', 1, 0,0,210,10);
this['text'].autoSize = "center";
this['text'].embedFonts = true;
this['text'].text = eval(blurbID);
this['text'].border = false;
this['text'].selectable = false;
this['text'].multiline = true;
this['text'].wordWrap = true;
this['text'].html = true;
myformat = new TextFormat();
myformat.color = 000000;
myformat.font = "frutiger";
this['text'].setTextFormat (myformat);
_parent.newY += (this['text']._height + 20);
box._height = this['text']._height;
_parent._y = ((Stage.height - _parent._height) / 2)-220;
}
the code to populate the fields is as follows:
Quote:
for(i=1; i<=totalItems; i++){
duplicateMovieClip("news_press_rnav_template", "news_press_rnav_item"+i, i+1);
eval("news_press_rnav_item"+i).blurbID = "_parent._parent.news_content_mc.xmlDoc.blurb"+i+" .childNodes";
eval("news_press_rnav_item"+i).designation = i;
}
and, finally... a snippet of the XML being used:
Quote:
<blurbs id="blurbs">
<blurb id="blurb1"><June 7, 2005
Butler Rogers Baskett Designs New Offices for Global Law Firm Cadwalader, Wickersham & Taft LLP in Downtown, Manhattan.></blurb>
<blurb id="blurb2">May 20, 2005
Butler Rogers Baskett Announces New Projects.</blurb>
<blurb id="blurb3">May 9, 2005
Butler Rogers Baskett Designs New Downtown Manhattan Offices for McKee Nelson, LLP</blurb>
<blurb id="blurb4">May 9, 2005
Butler Rogers Baskett Designs New Offices for Kramer Levin Naftalis & Frankel LLP</blurb>
</blurbs>
Any suggestions? What's making my ampersands show up as &?
[F8] SOS: Passing Output Of JavaScript Into Dynamically Generated Text Boxes In Flash
I would like to know, how do I import data dynamically onto stage.
I am creating a booklet with 10 pages and I want to dynamically display some content on page 5.
I am trying out various options but none of them seem to work.
Especially when I try referencing them from root.
For instance, i have a dynamic text box in MC "page 5", I shall refer it to as dt_box.
When I place this dt_box in the root and import data via FlashVars, I do see text in there. But when I move the same in MC "page 5", I do not see any content imported there.
Now the problem is I have a JavaScript code, that needs to be executed and the output of it needs to be displayed in the dynamic text box. I am unable to decipher as to how can I transfer the data from JavaScript in HTML to Flash.
I am using the following code in Flash to get the data, I know its not correct and is wrong.
onClipEvent (enterFrame) {
var MyResult="";
MyResult.value = getURL("javascript:getBuildInfo('finalInfo');");
_myprpctext.HTMLtext=MyResult.value;
}
Please do suggest me something. Is there someway, I can dynamically import data directly into this dt_box, the location is "page5.LoadXMLdata.dt_box"
Please do help me out of this. If you have a sample of your work, where in you have dynamically imported content onto stage, it would be more of very helpfull to me.
Please do help me out.
Text Links To Target A Specific Frame
Hi
I was wondering if this was possible and how to do it if it is.
What i have is a swf movie embedded into the left frame of a html page. Within the flash movie r some hypertext links and i was wondering if it was possible to target those links to the centre frame of the frame set?
I know how to do this with normal html links but i cant figure out if its possible with links inside a flash movie.
Any help would be appreciated.
Regards
Fefris
All Specific Words In TextField To Different Color
hey
this is Actionscript 3,0 specific question
how can I turn every specific word in a textbox to specific color? this works like highlighting
if I have the word Jeeves in TextField object, I would like each occurrence of Jeeves in this TextFIeld to become red or any other color
is there a quick function for this?
also, if there is a way for me to do this and to skip using htmlText, I would much rather not use htmlTExt in this case and use <font olor> tags from html
thank you, this has boggled me for some time.
Can AS Identify Specific Words In Dynamic TXT Field?
well the subject pretty much sums this post up. I need to create a movie that anilizes text (WORD FOR WORD) (from the bush of a button). Possible or am i just talking jibberish?
For those of you that wont to know, iam making a flash chat app and im trying to make swear words invisible or change to **** or ####. And.. maybe make it so it can ID incomplete pairs of html tags (like <b> or </b>)
Counter Of Specific Words Inside Of Variable
is there a way for flash to do this:
in: variable="there is some thing in thing";
can flash count number of times "thing" was mentioned.. so it outputs 2 in this case.
And if "thing" was not mentioned in variable, it outputs 0.
I ask this because I think I saw something like this and now I need it.
Dynamically Text (links?)
I did the Kirupa tutorial on Dynamically Scrolling text http://www.kirupa.com/developer/mx/dynamic_scroller.htm , the simple version. Is there a way to make links in this format using the .txt file
Dynamically Text With Links
HI
I am having issues getting this to work....
What I have is XML which contains an organisation chart complete with the following atributes : name, title, contact.
What I want is for the people's names to be displayed in a hierarchle format which I have done. However I am also need a button to be placed over each name so that when the user clicks on the name it calls another function (which displays more details on the person).
However I cannot get the button to work properly. My Code is shown below and I'd be greateful for any advice.
Note: I have a button symbal called 'circle' and I have only tried to get the button to work for the 1st loop (a).
HTML Code:
var bindex = 100;
var yindex = 120;
var xpos = 50;
var ypos = 50;
function newlink(node,xpos,ypos,instance_name)
{
bindex+=10;
yindex+50;
_root.attachMovie("circle",instance_name,bindex);
_root.instance_name._x = xpos;
_root.instance_name._y = ypos;
trace (instance_name);
trace (xpos);
trace (ypos);
trace (bindex);
}
function sendItOut()
{
var xpos=40;
var depth=1;
prime = new XML();
prime = this.firstChild;
for (a=0; a<prime.childNodes.length; a++)
{
var header = prime.childNodes[a].attributes.name.toString();
var ypos=12; //this is reset at the start of each department
xpos+=150;
depth++;
textname="people_"+a;
_root.createTextField(textname,depth,xpos,ypos,110,26);
_root[textname].text= header.toUpperCase()+newline;
xpos+=10;
var node=prime.childNodes[a];
instance_name="btn_hotspot"+a;
newlink(node,xpos,ypos,instance_name);
for (b=0; b<prime.childNodes[a].childNodes.length; b++)
{
var reveal = prime.childNodes[a].childNodes[b].attributes.name.toString();
ypos+=25;
depth++;
textname="people_"+a+"_"+b;
_root.createTextField(textname,depth,xpos,ypos,110,26);
_root[textname].text=reveal + " " + depth;
xpos+=10;
for (c=0; c<prime.childNodes[a].childNodes[b].childNodes.length; c++)
{
ypos+=25;
depth++;
var reveal = prime.childNodes[a].childNodes[b].childNodes [c].attributes.name.toString();
textname="people_"+a+"_"+b+"_"+c;
_root.createTextField(textname,depth,xpos,ypos,110,26);
_root[textname].text=reveal + " " + depth;
xpos+=10;
btn_name="textname"+_btn;
_root.btn_hotspot.duplicateMovieClip("btn_name",xpos);
for (d=0; d<prime.childNodes[a].childNodes[b].childNodes [c].childNodes.length; d++)
{
ypos+=25;
depth++;
var reveal = prime.childNodes[a].childNodes[b].childNodes[c].childNodes[d].attributes.name.toString();
textname="people_"+a+"_"+b+"_"+c+"_"+d;
_root.createTextField(textname,depth,xpos,ypos,110,26);
_root[textname].text=reveal + " " + depth;
}
xpos-=10;
}
xpos-=10;
}
xpos-=10;
}
}
organisation= new XML();
organisation.ignoreWhite = true;
organisation.onLoad = sendItOut;
organisation.load("org.xml");
Links Within Dynamically Loaded Text
Dear All.
I have a dynamic text box (myText.text and services.text), that load different texts from different buttons. Below is the code for one of the buttons. Where it says... "here" I want to create a link that opens up a centred html file. Is there any coding that I can use?
wed1_btn.onRelease=function() {
myText.text = "Wedding Consultation... ? ";
services.text = "Our consultation.. blah blah. Click here for fees ";
}
Thank you for reading.
Sam.
Links Within Dynamically Loaded Text
i have a flash file that pulls text from a txt file. it actually pulls html info and i have css that controls the texts appearance. i put some links within the text in the txt file. standard html stuff. everything works fine but i would like the links to open in a new page. when i put target="_blank" in the a tag it doesnt seem to take affect.
is there any other way to make these links open a new window?
URL Links In Dynamically Loaded XML Text
Another problem for me with the dynamic scroller found on the Kirupa site: http://www.kirupa.com/developer/mx/dynamic_scroller.htm
I can't figure out how to create URL links in the text. I tried selecting "render text as HTML" and added this to the .txt file: < a h ref=" mylink" > mylinkhere < / a> (without the spaces) but it just showed up 'as it'.
I hate not knowing how to solve this and I appreciate any advice.
Thanks
Links Within Dynamically Loaded Text
Dear All.
I have a dynamic text box (myText.text and services.text), that load different texts from different buttons. Below is the code for one of the buttons. Where it says... "here" I want to create a link that opens up a centred html file. Is there any coding that I can use?
wed1_btn.onRelease=function() {
myText.text = "Wedding Consultation... ? ";
services.text = "Our consultation.. blah blah. Click here for fees ";
}
Thank you for reading.
Sam.
Setting Links Dynamically From A Text File
I have included a .fla that I need help with. In the movie clip "Final Button" I have a layer called "button". There is also a layer called "linkGetter". When I run the .swf "linkGetter" loads a text url from a text file. What I want to happen is that when the button in the "button" layer is pressed that it goes to the URL in "linkGetter". I cant seem to get this so some help would be appreciated and for all you experts out there I would think that this would only take a second. Thanks! PS... my Action Script for loading the variables from the text file can be found in the "actions" layer of the main timeline if that helps at all. Thanks!
How To Make Links In Dynamically Loaded Text?
Can anyone help me create links in a dynamically loaded text box? I have a dynamic text box with this code (Flash MX/1.0):
loadText = new loadVars();
loadText.load("news_txt.txt");
//creating the loadVarsText function
loadText.onLoad = function() {
scroller.text = this.newstext;
};
I followed this tutorial (http://www.kirupa.com/developer/mx/dynamic_scroller.htm) but I need to be able to make links within this text. Ideally, I'd like to be able to add other HTML code to the text (bold, underline, etc.) but just being able to make hyperlinks from the .txt file would be great.
Thank you greatly for any help you can offer.
XML Generated Links
Hi...I am looking to an xml file to generate a simple text link in my movie that will load flv's. I don't want to load the links into a component. I just need simple link text buttons that change color on rollover and act like normal link buttons. Right now it loads into a list box and I don't like the default rollover stuff that can't be changed with setstlye. Most notable the box that appears and highlights around the rollover choice. Can anyone direct me in the right area toward a tut or something? Not much help on searches.
Thanks
Targetting Links In Dynamically-loading Text Files....
'Ello.
Looking for a wee bit of help in Flash MX....
What I'm trying to do is make a site in Flash that's easily updatable by using externally-loaded text files. It's OK so far, really keeping the file size down, but I've hit a stumbling point that REALLY puts the dampers on the project.
In several of the sections, I want a list of links/content to appear that when clicked on, loads a web page/ html file/ movie file into the browser. The <*A HREF> (* added so that the board software doesn't underline the rest of this post as a hyperlink...) tags work fine in the text files and are recognised by Flash, but they always load the content into the same bvrowser window as the movie, and force the user into clicking the "back" button to view the main site again.... which returns them to the main menu rather than where they left off (I tried adding more anchors, but that got the browser confused and it started doing very odd things).
SO....
is there a way, using externally-loaded text files, that I can make a link in said text file open in a new window (like TARGET=_blank, which doesn't seem to be supported by Flash) rather than iin the same window? Or will I have to bite the bullet and render all the text within the movie, thereby requiring me to re-upload the main movie each time a change needs to be made to the lists (which will be at least once a week!)?
Help...?
Links In Static Text Field Not Working When Dynamically Loaded
I have a static text field with some links in the text (highlighted the text and put a url in the properties window) and it works if I test the swf by itself, but when I load that swf into a movieclip container the links don't work anymore.
Any ideas?
EventListener Function Specific To Generated Display Object Container
This has to be simple, if only I knew how. I'm an AS3 newbie, and am having difficulty setting up multiple specific EventListeners within a code generated display object container.
I am generating a 'page' (Sprite) with a heap of 'cards' (Sprites) on it. Each of those cards, in turn, contains a selection of text boxes and other objects generated from database output using a 'for' loop.
My hope is to attach an EventListener to each 'card' so that a MouseEvent will let me manipulate the data that lead to the content of that actual card (the i-th iteration of my for loop). I've been playing with everything I can think of (limited repertoire of thoughts though) and the best I've managed is for my EventListener to access the final set of data, whichever 'card' I click on.
I've summarised and attached my code for the function, and would appreciate any advice (however basic) on how to get back to the i-set of data from the EventListener attached to the i-th card. I can handle the PHP and MySQL side of things but am fumbling my way into the OOP of AS3.
Cheers
Dougal
Attach Code
function reviewPageMode(n, reviewRequirements, cardsRequired)
{
//make the reviewPage display object container
var reviewPage:Sprite = new Sprite();
reviewPage.buttonMode = false;
addChild(reviewPage);
// sort out all the variables
var commentBox:TextField = new TextField();
reviewPage.addChild(commentBox);
// build the cards and text boxes and add them to the reviewPage
for (var i:int = 1; i < (cardsRequired+1); i++)
{
// setup the locations for all the objects
var displayCard:Sprite = new Sprite();
displayCard.buttonMode = true;
displayCard.opaqueBackground = 0xFFFFFF;
displayCard.addEventListener(MouseEvent.CLICK, accessThisData, false, 0, true);
reviewPage.addChild(displayCard);
function accessThisData(evt:MouseEvent):void
{
// I want to be able to do stuff to the data that was used
// in generating the i set of displayCards and textFields
}
var firstTextBox:TextField = new TextField();
displayCard.addChild(firstTextBox);
var secondTextBox:TextField = new TextField();
displayCard.addChild(secondTextBox);
// etc etc etc
}
}
Dynamically Fill Area With Words From List
hello all,
i would like to fill the entire area of a flash movie with words.
the movie starts out blank, but as time goes on the visible area fills with words from a pre-written list.
ideally, the height and width of the words is randomized within a range i determine.
i wouldn't mind being pointed to a tutorial that shows how to fill an area with randomly-sized rectangles, that might help.
eventually, i want to be able to control the speed of the area being filled with an input device (mouse or external sensor) but first things first!
am using flash 8.
thank you,
aya.
OnRollover/hover For TextField Links?
Does anybody know a way to create something like an onroll or hover event for the links in my TextField? I'm not talking about simple CSS hovers that tweak graphics... I want CODE to execute!
Dynamically Generated Nav Bar
I am using Flash 8 for a web site and the client has asked me to build a nav bar in the image gallery that looks like this:
http://www.capitalwebtec.com/clients...nd-gallery.jpg
Here is the catch...The number of images will be determined by the client and they will put that number in a text file that will reside on the server. The nav bar has to build itself dynamically by pulling in the thumbs from the server (they will be named in sequence). So the pics have to come in externally, plus the number of pics has to be able to change each time the file is loaded.
There will only be four thumbs displayed at a time, but I have to set it up so that you can rotate through as many as there are by clicking on the arrows on the left and right side of the nav. Is this clear? I have no idea where to begin building this dynamically.
Help!
Thanks,
Brian
Dynamically Generated Images
Hey,
I'm about to design a site that has a very large art gallery section. Does anyone know if Flash can dynamically import images (.jpg or .gif) using ColdFusion and/or JavaScript?
Any suggestions would be appreciated.
thanks,
Janet
Printing Dynamically Generated MC's...
i've built a function that basically generates a table that displays client information from a coldfusion database.. basically there are 8 tables that need to be made, and each needs to be printable... the only way that i thought that this could be possible is to have each table in a separate frame and then print the level or the MC with a bounding box...
on each of the 8 frames, the main function is called to build the table with a certain amount of rows and data.. i have a print button on each frame that works great by printing the movie clip with the "bmovie" bounding box. when i try print all of the tables at once, it prints up 8 empty, unformatted tables... the only other solution that i had was to go to each frame and automatically print and thenn go to the next frame, but only if the printall button was pressed... apparently this is not acceptable to my bosses... is it possible to que all 8 tables at once as opposed to having the user have to press "yes" 8 times, one for each table?...
Dynamically Generated Txt In Buttons
I have this script to dynamically generate buttons. How would I get text to be dynamically generated 'in' the button? Any direction would be greatly appreciated!!!
Thanks!
Va.
buttonArray = new Array("Home","Privacy & Security","Contact Us","DoD Warning")
theButton._visible = false
for(i = 0; i < buttonArray.length; i++)
{
duplicateMovieClip("theButton", "Button" + i, i + 1);
thisButton = this["Button" + i];
if (i > 0){
thisButton._x = this["Button" + (i - 1)]._x + this["Button" + (i - 1)]._width + 2;
}
thisButton.buttonText = buttonArray[i];
}
Dynamically Generated Flash
Hi there,
I'm kinda new to Actionscript so please forgive me if there is something really easy.
Basically, let's suppose I have a list:-
a1,a2,a3,a4
b1,b2
c1,c2,c3,c4,c5,c6
d1,d2,d3
Is it possible to create a function(or the like) that can read the info in the list and dynamically create a page or frame for each of the items? Each item may have it's own content which would be stored in a common place.
Could the info from the list be used to generate a dynamic menu i.e. taking the list above the first menu would contain a,b,c,d, click on any of those and the next menu would be created, so in the case of 'a' it would 1,2,3,4. The list may vary in length but the important thing is the Actionscript would read the list and create the required frames.
Thanks in advance,
Nick
Dynamically Generated Menu
I'm dynamically generating a plethora of instances of a button using attachMovie. The buttons are supposed to collectively function as a menu. Is there any way to make a pressed button stay in the down state until another one is pressed? Also, I need each button instance to be selected and in the down state when it is first created.
I am using Flash MX/actionscript 1.0
Formatting Dynamically Generated Txt
hi
I am working on a mail form that passes variables and formats the users details.
The end result being a dynamic txt box (variable message2send).
What I want to do I format it so the Username, Email, Message etc are in different colours to the rest of the formatted txt.
This is the code im using (just sender name)
Code:
message2send = "Hello" <font color="#FFCC33">sender_name</font> + Newline + " " + Newline + "You are about to send this message: " + Newline + Newline + sender_message + Newline + Newline + "Your E-mail is: " + Newline + " " + Newline + sender_email;
Thanks very much
Grub
Dynamically Generated Titles
I am trying to get my Flash file to generate a dynamic title depending on what page the flash file is on. For example, if my flash file loads on index.htm I want the title to display 'Welcome'. If the flash file loads on ContactUs.htm then the title should display 'Contact Us.' I am new to this so please be detailed in your explanation. Any help would be greatly appreciated
|