Dynamic text and rollovers
I've got a dynamic, scrolling text field and the text is
being rendered as HTML. How can I create a rollover state for the
text? Thanks.
give your dynamic text field an instance name, for example,
my_txt. Render the text field HTML text by clicking the <> in
the properties inspector. Click the frame it resides on, and open
the actions panel, insert this:
my_txt.htmlText = "<a href='
http://www.google.com'>"+"This
is line one"+"</a>"+"\n"+"<a href ='
http://www.adobe.com'>"+"This
is line two"+"</a>";
and so on....
Similar Messages
-
Issue with visibiliy of dynamic text and hyperlinks
Hi everyone,
It's been a while since I've build a Flash site and a I'm finding a out a lot has changed.
I'm building a simple site with some pictures, text and the 5 last posts from Twitter.
This last one is not working out that well.
First of all:
The outputed data from Twitter is displayed into a dynamic text field which is working fine when I test the movie in Flash, but as soon as I upload it to my server the text is not visible.
Flash already told me that I need to enclose my font in the movie (that's new for me) and I did that using the button in the properties windows.
But it still won't work.
I recreated the Twitter reader in a empty document to isolate it from my website during the troubleshooting.
Here's the AS I'm using:
var loadXML:XML = new XML();
loadXML.ignoreWhite = true;
loadXML.onLoad = processXML;
loadXML.load("twitter.php"); //used when swf in placed on server
loadXML.load("");
function processXML(loaded:Boolean)
if(loaded)
var node = this.firstChild;
tweet_1.text = node.childNodes[0].childNodes[2].firstChild;
tweet_2.text = node.childNodes[1].childNodes[2].firstChild;
tweet_3.text = node.childNodes[2].childNodes[2].firstChild;
tweet_4.text = node.childNodes[3].childNodes[2].firstChild;
var follower_count = node.childNodes[9].childNodes[11].childNodes[9].firstChild;// Creates variable
trace(follower_count); //loads variable into output
follower_count_txt.text = follower_count;// show follower count in text box
else
error_txt.text = "Error loading XML file";
for (i=0; i<follower_count; i++)
_root.attachMovie("tweep_mc", "tweep"+i+"_mc", i);
_root["tweep"+i+"_mc"]._x = 150 + random(500);
_root["tweep"+i+"_mc"]._y = 150 + random(500);
trace(i);
trace(i);
follow_btn.onRelease = function()
getURL("");
facebook_btn.onRelease = function()
getURL("");
stop();
Right here you can see the output of it on the server.
The second issue:
The items posted to Twitter will simply always contain pictures which Twitter posts as hyperlinks.
Is there a way to make those hyperlinks function in my dynamic text field?
Hope you guys can help me out!
Thanks in advance!!
KarimOk.. After some resarch I find out the guy who created this made use of the Twitter API.. Since I don't know how to do that and
can't find straight answers that's not an option for me...
Althought...
What I forgot to mention in the first post:
This is what the beginning of actionscript is actually looking like right now and why it is working offline:
var loadXML:XML = new XML();
loadXML.ignoreWhite = true;
loadXML.onLoad = processXML;
loadXML.load("http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=karimbizid2");
I'm getting the data direct from the Twitter server.
This procedure does'nt neceserly need a PHP file to store the XML, right?
I'm guessing it's just a visual issue why the text isn't showing.
Karim -
Create a Link using Dynamic Text and Capture Variable
I am building a dynamic website using Dreamweaver CS5 with Coldfusion 9
Currently I have created a dynamic text table. The table is created by querying the Invoice table and displays the all the customers Invoices. The columns Include Invoice #, Date, Amount Paid, BalanceRemaining, Due Date. So basically lists all the invoices I have applied to the unique customer. It is pulled up using a session variable I created from the login page.
My question is this I want to make the "Invoice #" linked so when you click on it it goes to a new page and performs a new query which retrieves infro related to that specific invoice such as Services Rendered, Service Description, Date, Price, Total. I was able to create a link to the Invoice # but I am stuck trying to figure out how to capture the Unique Invoice # and apply it to the new query. Is this possible if so how?
Thanks for your help!Now keep in mind I am speaking strictly from a web and SQL standpoint as I have no experience with coldfusion.
If you are able to create the link to the Invoice, I am perceiving this as the following:
Invoice
Links to
#123
page.php?invoice=123
#345
page.php?invoice=345
If your page is setup like that then you already have the data stored in the browser request with the GET method. In PHP the equivalent is the $_GET array. I am assuming ColdFusion has a similar array to work with forms. Then on your following page you obviously need to check that the visitor came from the prior page with the proper permissions to ensure that someone doesn't get the address page.php?invoice=### and just guesses through and views all invoices if they are not supposed to. Then your query would look something like the following:
SELECT * FROM invoice_table WHERE invoice_number = $_GET['invoice']
Remember this in written in PHP so yours should be a similar equivalent.
Hopefully this helps a little to get you going in the right direction. -
Dynamic Text and changing Text in AS3
I have a Dynamic Text box in my Library. I drag it to my main stage and give it a name..it is now a movieclip. The name is 'mcAdmin'. I added an event listener for MOUSE_OVER. I want the text to change color, but for now I'm just trying to change the text; however, it's not displaying the change in text I want. I do a trace, and the change is in there on the output window, but it is not displayed as such. How can I :
1) use AS3 to change the font color of the text
2) use AS3 to change the text and have it display?
function onMouseOver_txtAdmin(e:MouseEvent):void
Mouse.cursor="button";
//Current mcAdmin text is 'Administration'
//I want to change the color of Administartion on Mouse_Over
//but to test if I can get to anything, I'm just trying to change the text.
mcAdmin.text="Hello";
trace(mcAdmin.text);
mcPPMB.alpha=.5;
mcASB.alpha=.5;
mcISO.alpha=.5;
mcEA.alpha=.5;
mcAdmin.alpha=1;
mcAdmin.scaleX=1.25;
mcAdmin.scaleY=1.25;
Thanks.1st
give the textfield a name, if it hasn't already (sounds like you put it in a movieclip).
to change the text set the text property of your text field
like this
myTextField_txt.text = "here is the text";
or if it is inside a movieclip
myClip_mc.myTextField_txt.text = "here is the text";
To change the color you would need to put a TextFormat on it. To keep the same fontsize, font etc. you could first get the TextFormat from your existing Textfield, change the color of the TextFormat and set it on the TextField.
// get the Textformat of the first character
var TF:TextFormat = myTextField.getTextFormat(0,1)
// set the font color
TF.color = 0xff0000;
// put it on the whole text
myTextField.setTextFormat(TF) -
I have a dynamic text area which is fed by the value of a
SharedObject.
This appears to work fine in FF, but in IE, the dynamic text
is rendered
very small.
Any ideas on why this is, and how to fix it?
Seth Meranda
smeranda2<at>unl<dot>eduquote:
Originally posted by:
AnandMX
use embedFonts=true
coz it seems that your fonts are not embedded thats y it is
not visible there.
Thanks - but why would the fonts be visible in Safari and
Firefox, for example, and not in that version of IE? -
I have Dynamic Text in a Movie Clip on the timeline. Text
shows up just fine without Mask. When I add a Mask Layer to the
Movie Clip the Dynamic text dissapears. Can anyone shed some light
why?
Thankscheck out
this
forum discussion on the subject of masking dynamic text.
the quick and short of it is, you need to embed the font in
the dynamic text to mask it. -
Dynamic Text and Resizing Images Inside
Hello.
FYI: I'm following the Flash Blogger tutorials listed on
http://www.indextwo.net with
Flash 8.
I've noticed that everything works wonderfully as far as
bringing the blog content into the dynamic text field; however, my
only problem at the moment is while Blogger will automatically
resize my images, so it doesn't mess up the current template in
html, but of course, Flash does not (out of the box).
I need a way to define the width & height of the images in
the text field to fit inside the dynamic text field they're in.
As far as I can tell, the tutorials listed on that site use an
alternate method and don't actually resize them. They just make a
link to them.
Lastly, I thought about using CSS in Flash to adjust the img
size, but from what I gather there are very few items at my
disposal.
Does anyone have a solution?
Thank you.Hello.
FYI: I'm following the Flash Blogger tutorials listed on
http://www.indextwo.net with
Flash 8.
I've noticed that everything works wonderfully as far as
bringing the blog content into the dynamic text field; however, my
only problem at the moment is while Blogger will automatically
resize my images, so it doesn't mess up the current template in
html, but of course, Flash does not (out of the box).
I need a way to define the width & height of the images in
the text field to fit inside the dynamic text field they're in.
As far as I can tell, the tutorials listed on that site use an
alternate method and don't actually resize them. They just make a
link to them.
Lastly, I thought about using CSS in Flash to adjust the img
size, but from what I gather there are very few items at my
disposal.
Does anyone have a solution?
Thank you. -
Running with Flash Pro CS 6 and Captivate 5.5.
I have a Captivate project with an embedded UI created with Flash. I want a text field (called Titled ) in Captivate to be accessed and displayed within the Flash UI. The text field will be different on each Cap slide, so the Flash UI should read it each time a new slide begins.
Reading on the net shows that Dynamic Text should do it, but there are no useable examples to draw upon for inspiration.
Can anyone out there inspire me?
Thanks.I don't know how much help it will be but you should check
out
this
link to a page at Paul Dewhurst's web-site "RaisingAimee". You
may not be able to get to that page until you register as a user on
Paul's site. If you run into that, register, then try the link
again.
If this is any help to you, drop a few pieces-of-eight in
Paul's PayPal account, and maybe send him a personal "thank you" on
his Shout Box. If it doesn't work, it might be because those
particular FLAs were created for version 1, as I remember, and may
be to some extent version-specific. In any case, it might be worth
a try.
~best wishes for your success,
Larry -
On button rollover Dynamic text and Movieclip appear
Hi guys,
I've got an issue - When one of my buttons is rolled over, I want text and a movieclip to appear. When the button is no longer rolled over, I want the text and movieclip to disappear.
The way that I was going to do this was to have anchor_mc as an anchor, and upon rollover have the movieclip play from inside the anchor (as its at the exact X & Y that its needed at) and dynamic text appear.
Questions:
1) How do I attach mc_textbox to mc_anchor --- OR, how do I set coordinate for just where mc_textbox should show?
2) How do I then make the movieclip disappear if the button is no longer rolled over?
3) Is it not possible for me to merge all of the dynamic text functions into one function, using IF statements? I tried this, but couldn't work it out.
AS3 code is attached below.
import flash.events.MouseEvent;
stop();
line1.addEventListener(MouseEvent.ROLL_OVER, line_in1, false, 0, true);
line1.addEventListener(MouseEvent.ROLL_OUT, line_out, false, 0, true);
line2.addEventListener(MouseEvent.ROLL_OVER, line_in2, false, 0, true);
line2.addEventListener(MouseEvent.ROLL_OUT, line_out, false, 0, true);
line3.addEventListener(MouseEvent.ROLL_OVER, line_in3, false, 0, true);
line3.addEventListener(MouseEvent.ROLL_OUT, line_out, false, 0, true);
line4.addEventListener(MouseEvent.ROLL_OVER, line_in4, false, 0, true);
line4.addEventListener(MouseEvent.ROLL_OUT, line_out, false, 0, true);
line5.addEventListener(MouseEvent.ROLL_OVER, line_in5, false, 0, true);
line5.addEventListener(MouseEvent.ROLL_OUT, line_out, false, 0, true);
line6.addEventListener(MouseEvent.ROLL_OVER, line_in6, false, 0, true);
line6.addEventListener(MouseEvent.ROLL_OUT, line_out, false, 0, true);
line7.addEventListener(MouseEvent.ROLL_OVER, line_in7, false, 0, true);
line7.addEventListener(MouseEvent.ROLL_OUT, line_out, false, 0, true);
line8.addEventListener(MouseEvent.ROLL_OVER, line_in8, false, 0, true);
line8.addEventListener(MouseEvent.ROLL_OUT, line_out, false, 0, true);
line9.addEventListener(MouseEvent.ROLL_OVER, line_in9, false, 0, true);
line9.addEventListener(MouseEvent.ROLL_OUT, line_out, false, 0, true);
function line_in1(e:MouseEvent):void
line_output.text = "This is a test made by the MonkeyTest that has previously messed up\n And testing a new line";
function line_in2(e:MouseEvent):void
line_output.text = "up messed previously has that MonkeyTest the by made test a is This";
function line_in3(e:MouseEvent):void
line_output.text = "This is a test made by the MonkeyTest that has previously messed up\n And testing a new line";
function line_in4(e:MouseEvent):void
line_output.text = "up messed previously has that MonkeyTest the by made test a is This";
function line_in5(e:MouseEvent):void
line_output.text = "This is a test made by the MonkeyTest that has previously messed up\n And testing a new line";
function line_in6(e:MouseEvent):void
line_output.text = "up messed previously has that MonkeyTest the by made test a is This";
function line_in7(e:MouseEvent):void
line_output.text = "This is a test made by the MonkeyTest that has previously messed up\n And testing a new line";
function line_in8(e:MouseEvent):void
line_output.text = "up messed previously has that MonkeyTest the by made test a is This";
function line_in9(e:MouseEvent):void
line_output.text = "up messed previously has that MonkeyTest the by made test a is This";
function line_out(e:MouseEvent):void
line_output.text = "";
var mc= new mc_empty(); addChild(mc);It isn't relly clear to me what you have versus what you want, so these answers may be equally unclear to you.
1. One way to join them together is to maually place one inside the other while authoring the file. Another way is to use addChild to add the text mc to the anchor... mc_anchor.addChild(mc_textbox); To control where the text mc appears you can set its x and y properties.using actionscript... mc_textbox.x = 0;
2. To make the movieclip disappear you can set its visible property to false... mc_anchor.visible = false;
3. You can probably reduce that code substantially, though it partly depends on what variations there are really going to be in the text that displays for each rollover. For now, I'll assume the text will be entirely different for each...
for(var i:uint=1; i<10; i++){
this["line"+String(i)].addEventListener(MouseEvent.ROLL_OVER, line_in, false, 0, true);
this["line"+String(i)].addEventListener(MouseEvent.ROLL_OUT, line_out, false, 0, true);
function line_in(e:MouseEvent):void {
var lineTarget:MovieClip = MovieClip(e:currentTarget);
// could use a switch instead of the if's in series if you know what a switch is
if(lineTarget == line1){
// do things for line1
} else if(lineTarget == line2){
// do things for line2
) else if.... etc -
Rotate Dynamic text and make dynamic text go vertical
Hello
I am working on a visual customizer flash app in actionscript 2.0. Looking for good tutorials or examples of how to rotate dynamic text as well as how to make it vertical. Currently all the dynamic embedded text changes colors and size.
Any help would be greatly appreciated. Thank you.distribute each character to a textfield and arrange the textfields to suit your needs.
-
Dynamic text and embedded font
Hi,
I'm new to Flash and AS3, and I'm having a problem when I do
the following: I create an empty dynamic text field in the
authoring environment, click "Embed...", and choose the character
sets that I want (I get the same results when I embed the entire
font). The first time I change the contents of the text field with
the command:
text_field.text = "string 1";
I get good results--the text appears in the correct font.
However, subsequent attempts to update the .text property fail with
no error message, and the field becomes blank.
If I remove the embedded font by clicking "Don't embed" in
the embedding dialog, then every time I update the field's .text
property, it displays correctly using a local machine font.
I've also tried embedding the font in the swf by creating a
dynamic text field in the authoring environment, into which I place
no text, creating a second, functional text field in actionscript,
formatting it, using the "embed = true" property, and repeatedly
updating the .text property with the same bad results as described
above.
I haven't tried using the [embed] metatag to dynamically load
the font.
I've tested the swf in IE7 and Firefox on two machines with
the same results. What am I doing wrong?
Thanks,
DaveOkay, here's more information. The font that I've been trying
to embed is Bitstream Vera Sans Mono. If I embed a different font,
like Bitstream Vera Sans, I have no problem. It seems to me that it
must be that my Bitstream Vera Sans Mono is corrupted, my .fla and
.swf files are corrupted, or there's a bug in flash... -
Dynamic Text and color changes......
In some cheap website creating software I have you can turn
text into rich text and change the color of individual words inside
the same text box full of text. Is there anyway to do that in flash
CS3?Thanks clbeech I actually found an easy way to do it. For
your dynamic text box you can click the "html" box in the
properties window for that text box. (Its a little square box with
this <> inside it and its just to the right of the singleline
and multiline box drop down.) You can then select the text you want
to edit inside the text box and change its font/size/color as well
as turn it into a dynamic link and it will do so without affecting
the rest of the text in your text box. -
Dynamic text and animated masking problem?
Hi
Can anyone suggest to me what might be happening here. I will
try and explain step by step... I am using flash MX
I have dynamically created a movieclip which I want to mask -
_root.createEmptyMovieClip("myMovie", 1);
I dynamically add a movieclip into it which I then load a jpg
into -
_root.myMovie.createEmptyMovieClip("image1", 0);
_root.myMovie.image1.createEmptyMovieClip("newFile", 0);
_root.myMovie.image1.newFile.loadMovie("http:...");
I dynamically create another movieclip called myNormalText1
insde the first movie -
_root.myMovie.createEmptyMovieClip("myNormalText1", 2);
this holds a dynamically created text box called mytext -
_root.myMovie.myNormalText1.createTextField("mytext",1,0,0,0,10);
// the text box formating is dynamic, uses devise fonts,
arial and is red ect.
I have then attach a movieclip and use it as a mask to create
a transition effect over _root.myMovie (which holds the image and
text)
_root.attachMovie("mask","mask",5);
_root.myMovie.setMask("mask");
the mask movieclip is what is causing me the problem!!!
method one
when the mask movieclip contains this -
a phisically drawn box that fills the whole page
I use a shape tween to make the box transform into a thin
rectangle down the left hand side of the screen
I get a transition effect which makes _root.mymovie disapear
to the left which is what I want!
The image and text are masked correctly!
*** Please note I am aware that dynamic text boxes using
devise fonts are not displayed correctly under a mask layor when
they are not embeded, in flash MX. I am able to view my movie in a
browser window which uses flash player 8 that now allows dynamic
devise fonts to be masked!
method two
I then wanted to create a different transition effect like
venitian blinds,
so, in my mask movieclip I created several rectangles that
fill the page
again I used a shape tween so they get thinner,
when I tested my movie the same way in the browser,
the mask did not work correctly over my text in
_root.mymovie???
yet the image in _root.mymovie was masked correctly???
the only differance between the two methods is the shape
tween in method one uses one box shape, and the shape tween in
method two uses several rectangler box shapes.
I was wondering if anyone knows why the text is correctly
masked in case one and is not correctly masked in case 2
I want to do other transition effects using masks in this way
and I am having no luck :-(
Thanks for any advice
Claire WallHi
I have been researching this ALOT and found some info that
basically tells me when I use setMask() over dynamic device fonts,
the mask uses its bounding box (the rectangular outside edge of the
whole mask movieclip) as the mask.
In case 1 the mask moviclips bounding box shrinks when the
shape tween plays because there is one rectangular box being
tweened. It appears to mask the text correctly.
In case 2 I have variouse different shape tweens going on
inside the mask movieclip so the bounding box stays the same size
across the whole screen and it wont appear to mask my text
correctly.
I think I have answered my own question, but this still
leaves me stuck! I want to create this venitian blind effect using
masks over devise fonts.
I came up with the idea of using for example 4 different
masks over the one movieclip but again flash doesnt like this and I
guess I can only use one setMask() per movieclip?
Can anyone suggest a way I can use multiple dynamically
created masks on one movieclip or cant it be done?
Thanks
Claire x -
Help with dynamic text and hand cursor
The buttons that I am creating are not displaying the hand
cursor. I tried searching for an answer, and have found nothing.
They are movieclip buttons with a dynamic text field. I already
switched them out to non-selectable text, and I am using:
b1.buttonMode = true;Perfect. I knew it was some little snippet that I was
forgetting. I made a temporary fix of creating a 0% alpha box over
the button like a fake click area above the text, and that worked
but I know that it was a half-arsed way of working around it.
Thanks. -
Help with dynamic text and and css !
My second question of the day.
I'm trying to build a feature in my app in which the user can
hide/reveal
bolding and or
italics and or
underlining. The text is being loaded in from an xml file
and I was thinking about styling it with css in order to get the
underlining. My problem is that the only way I can think about
pulling this off is to have a css style sheet that has a defined
bold,italic and underline class defined- - then another one that
just has a italic and underline class defined -- then another one
that has just a bold and underline class defined . . . and so on
and so on. You can see why I would prefer a much more streamlined
system. Unfortunately my experience with dynamic text styling is
somewhat limited. Hopefully someone can help me out here.Perfect. I knew it was some little snippet that I was
forgetting. I made a temporary fix of creating a 0% alpha box over
the button like a fake click area above the text, and that worked
but I know that it was a half-arsed way of working around it.
Thanks.
Maybe you are looking for
-
When ever I put my Iphone on the left side of the (Pad?) my laptop goes to sleep, sometimes does come back on until I change the position of the phone. Can anyone explain this?
-
Change rolling time in DailyRollingFileAppernder (log4j 1.3)
Hi all, We are using log4j 1.3alpha8 and have a RollingFileApppender configured with the following rolling policy: <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy"> <param name="FileNamePattern" value="../../../log/logfile.
-
My App World froze before download even started, Help Please?
I have a BlackBerry Bold 9780. I decided today to spend $4.99 to purchase Final Fantasy II. I went through the payment method, and when the app world was supposed to begin the download, the "Please Wait" Notification froze, I pressed the power off bu
-
Autentication problem after importing users in osx.5 server
Hi All, I was able to import users to OSX.5.8 server using passenger from macinmind.com but my users could not authenticate. When I create one user at a time the users are able to authenticate. Help i am pulling my hair out.
-
My wife is having problems with her iPad 2. We are traveling the US and many places we eat or stay does not work with her iPad 2. By this I mean her iPad 2 does not see the hotspot that her iPhone 4S, my iPhone 5, my iPad 3, my MBP retina and her HP