Weird "ghost Links" In Html Formatted Text
I designed a website that uses html formatted and encoded text loaded from a text file. The content is loaded across a half dozen sections that are masked by another clip using mc.setMask() .. this is so that the text does not need to be embedded thus antialiasing .. All of this actually works great except for one very weird thing: The first section (welcome) does not include any anchor tags for links- but when you view or simply scroll past the subsequent sections that do include anchor tag href links - then scroll back to the "welcome" section .. "ghost links" appear where they are relative to the page on that section. I am not sure if I am explaining this well but where the link is on another section .. it persists on the welcome page where it is not supposed to be.
check it out for yourself:
russellscarborough.com
When it opens .. scroll to "links" or "available cd's etc.. where there are active links ..(or simply select "tshirts" where no link is either .. but on the end of the content) then scroll back to the "home" section where there are no links and just move your cursor around in the content area .. every place where there exists a link on the other sections are still there .. "ghost links" as I call them .. they are all still active. It seems just the simple act of the content clip sliding under the mask activates all the links on the "home" (welcome) section.
What the heck is this? Is there something that may be done or is this just a bug thing?
Has anyone run into this problem before?
Any help or insightful comment to eliminate this would be helpful here .. thanks in advance.
trickyMoe
FlashKit > Flash Help > Flash ActionScript
Posted on: 03-10-2004, 11:16 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
HTML Formatted Text Links
I have a bunch of dynamically loading text that is formatted with html tags for links etc, in the txt files. Everything is working great except when your over a link in one of the text fields, you do not get a 'hand'. I am afraid users will not realize that it is a link so I was hoping for either avice on how to get the 'hand' to appear.. or how to use CSS for a:hover states etc..
Is It Me? Flash? A Ghost? Weird Buttons
Hi there. I've made 5 text buttons, (i made one and duplicated it, so they're all the same but what they say) They're as simple as a button can get. On 'over' all I've done is made the text bold. Once the text is bold, it stretches the text out a bit however on ONE button, it doesn't. Really REALLY weird. I've compared them and can't find why this one inparticular button, bolds but doesn't slightly move/stretch. Does anyone know of a setting that I'm missing? It's just one of those 'blips' thats going to drive me INSANE! Thanks for any help or mental advice
Html Formatted Text In XML Doc
I have all my css class formatting tags for a ton of text in an xml file. The BIG problem with this is having to escape all the brackets < and > with < and > respectively. The problem is, there is so much text and so much formatting going on...I'm getting lost in all these tags and it's driving me bonkers. Does anyone know how to put < and > inside of an xml bracket??
thanks,
morgan
Ext Dynamic Html Formatted Text
Hi, i'm making a flash interface cd-rom and want to know how to do what i want to do..
i have a html dynamic text box and want this text box display the text written on the cd if the user dont have an internet connection, and display the text from an external file located at a specific url if the user have an internet connection.
If some1 know a place or a tut explaining how to work with external html formating text, plz let me know where i could get the answer or a part of the answer..
thnx..
HTML Formatted Text Problem
I'm having a problem with html formatted text in Flash MX. I created a dynamic text box named (sText) which renders text as html formatted text. In another frame in entered the following:
sText = "<b><font color='#999999'>Test</font></b>
";
sText += "Second Line
";
sText += "Third Line
";
I am should see the following (Test is bold and gray):
Test
Second Line
Third Line
Instead I'm seeing this (Test is bold and gray):
TestSecond Line
Third Line
It appears that the return "
" doesn't work if it directly follows html formatting. The funny thing is that it works in another movie. Am I missing something or is this a bug?
Formatted Dynamic Text? (not Html)
I was wondering if I can dynamically load a text file that has three columns and have it appear in Flash with those three columns the same way.
It's just three separate peices of information on each line, separated by a tab.
When loaded into Flash, it's all wrong.
Thanks.
Loading Formatted Text (html?)
I am building a Flash site for another designer. We have dynamic loaded images loading into the main movie and we need to have blocks of formatted text load that corrisponds to the images. I figure that one way to do it is to have the main movie dynamically load in(into a target MC) a swf that contains formatted text. That way my client will only need to edit a flash file when he needs to edit/change the text. BUT...his request is to have the ability to use html to format the text (format being font, centering, text color...ect..)
Is there a way to load a chunk of html txt into Flash?
Loading Html Formatted Text
I am loading a .txt file that contains variables that hold HTML text. I am them using dynamic text boxes to display the code.
This all works fine except if the bold tag ( < b > ) is used, the text it is used on disappears!!!
I have the text box set to "render text as HTML" and here is the code that I use to put the variables in the text box:
myText.html = true;
_root.myText.htmlText = textHolder.htmlVar;//"textHolder" is the movie clip that I load the .txt into
All the other html tags work fine, Anyone got a gues here???
Cheers
External HTML-formatted Text
I'm loading text in HTML format from an external text file.
Some characters work when I do ALT+045 or whatever. I can't get + or & to work though. How do I do these characters?
Html Formatted Text Question
Hey-
-i have a dynamic text box that pulls in html formatted text from a text file. The font i'm current using is Arial. Question is, to get bullets to show up for an unordered list, do you have to use certain fonts? I have embedded all characters for the font, but the bullets dont wanna show up...
any ideas?
-myk
Html Formatted Text In A Textbox?
Hi folks,
I am attempting to display html formatted text in a text box. Can I just set .html to true, or do I have to combine that with .htmlText = (html string here)?
Moock's 'Actionscript for Flash MX' , pg 847, states:
Quote:
To include HTML source code in an HTML-enabled text field, convert the characters <, >, &, ", ', to their equivalent HTML entity values; <, >, &, ", and ', as discussed at: http://moock.org/asdg/technotes/sourceInHtmlField
My html string is as follows:
<FONT COLOR=#B5BD8E>cool bands</FONT><BR><FONT COLOR=#FFFFFF><U><A HREF=http://www.agathacrawl.com>agathacrawl.com</A></U></FONT><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>< BR>
I built a function that converts it to this:
<FONT COLOR=#B5BD8E>cool bands</FONT><BR><FONT COLOR=#FFFFFF><U><A HREF=http://>agathacrawl.com</A></U></FONT><BR><BR><BR><BR>&l t;BR><BR><BR><BR><BR>&l t;BR><BR><BR>
Here is my code to create the text box and point it to the html string:
Code:
this.createTextField("linksA", 100, 10, 162, 150, 209);
this.linksA.html = true;
this.linksA.htmlText = _root.Astring;
this.linksA.type = "dynamic";
this.linksA.embedFonts = true;
//this.linksA.setTextFormat(_root.typewriter12);
this.linksA.multiline = true;
this.linksA.wordWrap = true;
It displays the string but includes all the formatting tags, if I just point it to the regular html string, it displays nothing.
example at: http://thetradeonline.com > Links
Your help is GREATLY appreciated!
Loading Html Formatted Text? Help
MAn, I tried a couple tutorials on this and I can't seem to get it to work right.
I just want to load the text preferably on certain keyframes.
I want to eventually embed my fonts so the look right but the problem now is just getting trhem to display
Html Formatted Text Roll Over?
I have a text field that i am loading in html hrefs. Is there a way to add a roll over effect to that html formatted text field?
Dynamic HTML Text Fields Do Not Display Formatted Text?
Flashkit.com,
In Flash MX I am developing a lot of movies using dynamically populated html text fields. When the user does not have a font I used on their machine swapping happens on all dynamic and input fields. Only static fields display the corrent font. I make sure the text field properties are embedding the fonts. Still all of the dynamic html text fields do not display the formatted text. I have .fla samples I can email to anyone.
I have tried these macromedia solutions with NO success:
http://www.macromedia.com/support/fl...t_outlines.htm
http://www.macromedia.com/support/fl...namic_text.htm
http://www.macromedia.com/support/fl...haredfonts.htm
Does anyone have a working sample .fla they can send me?
-Jimmy
Dynamic HTML Text Fields Do Not Display Formatted Text?
Flashkit.com,
In Flash MX I am developing a lot of movies using dynamically populated html text fields. When the user does not have a font I used on their machine swapping happens on all dynamic and input fields. Only static fields display the corrent font. I make sure the text field properties are embedding the fonts. Still all of the dynamic html text fields do not display the formatted text. I have .fla samples I can email to anyone.
I have tried these macromedia solutions with NO success:
http://www.macromedia.com/support/fl...t_outlines.htm
http://www.macromedia.com/support/fl...namic_text.htm
http://www.macromedia.com/support/fl...haredfonts.htm
Does anyone have a working sample .fla they can send me?
-Jimmy
Dynamic HTML-formatted Text Not Quite Working
I'm creating a product demo that pulls text from a text file, which is HTML-formatted. I want to use a font that not everyone has, so I embedded the outlines (the "[...]" button). Problem is, the bits of text that I've bolded and italicized in the HTML formatting don't show up at all. The plain text works just fine.
Hmmmm
Any thoughts?
thanks,
benjy
HTML Formatted Loaded Text Problem?
I have a button that when clicked, loads some text.
The text field has the 'render as html' option clicked.
The script is:
on (release) {
loadVarsText = new LoadVars();
loadVarsText.load("assets/September2/SatyaBrink/bio.xpq");
loadVarsText.onLoad = function(success) {
if (success) {
trace("done loading");
_root.display.text = this.var1;
_root.displayhead.text.setNewTextFormat();
_root.displayhead.text = this.var0;
_root.displayname.text = this.var2;
_root.displaydate.text = this.var3;
_root.displaytype.text = this.var4;
} else {
trace("not loaded");
}
};
}
But the loaded text does not seem to format to HTML. Anyone have any hints?
RJ
Loaded HTML Formatted Text Question
Hi,
I dont know how to put my question, so lemme do a bit of explaining..
HTML Enabled Dynamic TextField can load textual data and display basic HTML tags correctly. One of the coolest feature is you can actually have links by adding the proper HTML tags on your text such us:
<a href=........
Now my question is, is there a way to use such linking techniques, NOT TO LINK to a URL, but TO ACTUALLY CONTROL, or send commands to the Flash Movie???
For example:
I want to load a hyperlinked text data into my dynamic textfield.. something like a "click here" text..
but instead of the usual linking to urls, i want the movie to go to a certain frame when that text is clicked..
got me so far?
I know it can be done coz i saw this function i a book before, but I forgot which book was it, and i cant seem to find it. it's something like:
(in your *.txt)
<a href=actionScript:function()>click here</a>
or someting like that..
I would really appreciate help.
Thank you!
Loading HTML-formatted Text Files (a La PHP)?
I don't know much about PHP, but in the past I've used it to load text files with HTML coding in the body of my webpages.
I'm more or less switching over to Flash, now, though. AFAIK, since my webpages won't be mixed Flash / HTML, I could simply use links to acheive the same effect.
However, I wanted to avoid refreshing the page to give it that effect that it's integrated into Flash. If it has to refresh, it simply doesn't flow well with the rest of my webpage.
Basically I'm just looking for a simple way to load the content of my pages without refreshing (and without the use of frames). Can anyone point me towards what I'm looking for?
Thanks!
External Text - Dymanic HTML Formatted
Hi,
ok I have tried to find something current about this topic with no luck. What I wish to do is load a external text file with minor html formatting in it. I have the text file loading and I have the render HTML button clicked. Inside my text file reads the following.
var1=<html><body><B>Welcome test message</b>
this is some sample text to test html formatting in flash.
<b>i want this text bold</b>
<i>this text italic</i>
all done
</body></html>
now when the text file loads in flash I see all the code. I want the format to come through. I have also had a bit of a look on the macromedia website for current support HTML tags. I am using MX and the only document i can find is for version 5.
can anyone help me out here?
thanks
Wolfie
LoadVars And HTML-formatted Dynamic Text
Hi all,
I'm running into a bit of a snafu with a dynamic text ticker I'm building. The ticker displays several headlines loaded into LoadVars object from a text file, and it's working fine as it is. The problem is that now the client wants to put hyperlinks into the headlines. Formatting the text strings with HTML tags shouldn't be difficult, but for some reason, everything between the tags just disappears when it gets into the text field.
I suspect the problem has something to do with string conversions when the data is loaded into the LoadVars object...however, when I trace the contents of the LoadVars object, the tags appear just as they should. The text field is configured to render HTML, and text fields have been properly referenced as mytext.htmlText. What's the problem??
Here's the relevant AS:
headlines = new LoadVars();
headlines.load("headlines.txt", "GET");
headlineArray = new Array();
textColor1 = new TextFormat();
with(textColor1){
color = 0xFBAF3F;
}
textColor2 = new TextFormat();
with(textColor2){
color = 0xF26530;
}
headlines.onLoad = function() {
for(i=1;i<=100;i++){
nextHeadline = "headline"+i;
if(headlines[nextHeadline]==null){
totalHeadlines = i-1;
trace(totalHeadlines);
break;
}
else{
headlineArray[i-1] = headlines[nextHeadline];
}
}
trace(headlines.headline1);
loadHeadlines();
}
function loadHeadlines() {
for(i=1;i<=totalHeadlines;++i){
duplicateMovieClip(this.textBox,"textBox"+i,i*25);
newTextBox = "textBox"+i;
this[newTextBox]._x = initX;
this[newTextBox]._y = 0;
this[newTextBox].text1.htmlText = headlineArray[i-1];
if((i%2)==0){
this[newTextBox].text1.setTextFormat(textColor2);
}
else{
this[newTextBox].text1.setTextFormat(textColor1);
}
}
tickerCover.swapDepths(this[newTextBox]);
inPlace = false;
}
Here's the text file I'm using, exactly as written but with dummy headlines for testing purposes. All the stuff between the tags vanishes, so headline1 reads: The Corporation 3!
&headline1=The Corporation <b>Starts World War</b> 3!&z=
&headline2=The Corporation Invades Cambodia!&z=
&headline3=The Corporation Invents New Brainwashing Techniques!&z=
&headline4=The Corporation Destroys Small Planet!!!!&z=
&headline5=The Corporation Bangs Shoe on Table at U.N. Summit!&z=
&headline6=The Corporation Introduces New Designer Skin Grafts!&
Please, please help. I'm under a tight deadline here.
many thanks in advance,
David Conner
Trouble With Html Formatted Dynamic Text Box
Hi, I am loading an external text file into flash and I cant get the text to format properly. I am using MX 2004 and have checked the "Render text as HTML" property but when I go to test the flash movie the text displays all the HTML tags and doesnt change the format.
Example of text file:
[HTML]news=<html><b>Title here</b> blah blah blah</html>
&[/HTML]
Example of code the text box frame:
Code:
loadText = new LoadVars();
loadText.load("news.txt");
loadText.onLoad = function() {
news.text = this.news;
};
What am I missing?
Problem Importing HTML Formatted Text
Hi. I am attempting to create an animation using a sequence of dynamic text fields which will contain colored html ascii characters. Here's what I've done so far:
I've taken a video clip and exported it into a sequence of jpeg image files. Then, I've taken each of the image files and run them through a jpeg to html converter (found at: http://www.text-image.com/convert ).
I would now like to take this dynamic html formatted text and import it into separate text fields within Flash.
I found what looked like it would solve my problems - a document on Macromedia's site explaining how use HTML text formatting. The URL I'm referring to is: http://www.macromedia.com/support/fl...s/htmltext.htm
I have gotten so far as to set the text field to "dynamic text," set the "render text as html" on, and give the text field a variable name. I then inserted a "set variable" action in the first frame of my movie, typed the text field name into the "variable" section and inserted the html (that was outputted from the jpg2html converter) into the "value" section.
I am still having no luck. Any suggestions? Thanks.
-Adam Newton
Input Textfield To---) HTML-formatted Text
I know about how you can load HTML formatted text in a Dynamic Textfield, like this. Thats easy, like this:
Code:
textField.htmlText = "<p align='left'>This uses single quotes</p>"
BUT what i want to know, if i have a "multiline input textfield", and i type some text with and skip lines with ENTER. How do i get the <br></br> tags in that typed text ???.
Does anyone have a clue?
Thanx allready
Extremefun1
HTML Formatted Text Missing In Linux
I've got a swf (version 7, as 2) that loads HTML formatted text (with corresponding CSS tags) from a .txt file, and everything seems to work well on Windows (so far I have tried Opera, Mozilla, Firefox, IE). But when I just tried to run it on a Linux dist (Ubuntu) all text is missing. It is just empty!
The CSS tags I used, just look similar to the one that follows:
ActionScript Code:
flashStyle.setStyle("headertext", {color: "#543314", fontFamily: "Arial,Helvetica,sans-serif", fontSize: "13px", fontWeight: "bold"});
I also tried to remove the fontFamily, but nothing seemed to happen. Does anyone have any thoughts? I found a rather similar thread thread, but i didnt get any wiser by reading it. Is it impossible to use HTML/CSS and Linux??
Cant Figure Out HTML Formatted Dynamic Text?
Hi there!
I really hope someone can help me. I have lots of pages of text for this flash project Im working on & I have put all the text into one text file & am using variables to dynamically load the text into a text box on each external swf.
My problem is that I have decided to format the text using html, just put things in itallic & bold etc and it doesnt seem to work. After the 1st html tag, the text just dissapears. I have the format as html button pressed & have searched these forums & still cant find the answer. Please help!
My code on the 1st frame of the external swf is...
Code:
//loads text
loadText = new LoadVars();
loadText.load("axios.txt");
loadText.onLoad = function(success) {
if (success) {
//trace(success);
box.html = true;
box.htmlText = this.corptext;
delete this.onEnterFrame;
}
};
And my text file looks like this....
Code:
&corptext=<b>Axios Systems</b> is a leading provider of consolidated IT Service Management software solutions.&
But any text between the html tags dissapears. What am I doing wrong?
Your help is much appreciated
HTML Formatted External Text In Flash Bug?
Hi folks,
I have no issues with loading text etc. However I am noticing a strange thing happen when parsing in html code.
I have a text file which looks similar to:
Code:
§ionCopy=<font size="16">blah blah big text</font>
blah blah blah <b>bolded text</b> more text.
the font size increases where asked to however the bold doesn't work. instead the contents of the bold tag are not output at all. as if it is working like a trim or similar.
has anyone else come accross this in MX04?
[MX 2004 Pro] HTML Formatted Text Area
I'm trying to load html-formatted text in from a file to put in a text area (which is set to render text as html text). The htmlFile instance is of XML type and it reads in the file correctly (I traced it) but when I assign it to the text area it reads as plain text instead of html-text. I use this code on loading event:
Code:
htmlFile.onLoad = function(success)
{
_root.txtArea.text=htmlFile;
_root.txtArea.html=true;
}
the text field reads a file like this:
Code:
this is an <b>html</b> file
and displays:
"this is an <b>html</b> file"
instead of:
"this is an html file"
What am I doing wrong?
Copy HTML Formatted Text Across TextFields
If you have two text fields and want to devide text content between those, how can you keep the HTML formatting? I use getLineText() to get the not visible text in the first text field and put it in the second field, but getLineText() don´t return the HTML formatting...
Scrolling HTML Formatted Text In Flash
Greetings, all!
I'm using the techniques discussed in this thread on ActionScript.org to load formatted HTML text into flash. I also want to scroll said text, and for that purpose I'd like to use Flashscaper's scrollbar. I've run into a bit of a snag, however.
The text displays fine. However, the scrollbar does not appear when initiated and the mask (a red rectangle) can be seen on the right side of the content area; not the entire thing, just a red area about 5-10 pixels wide. The text can be scrolled using the mouse wheel, so the scrollbar functionality is intact. I think this has something to do with the transition within the ContentText function, but when I comment that out, the text doesn't display at all, nor does the scrollbar. Listed below are the three components to this project.
ContentText.as:
Code:
package
{
import flash.display.MovieClip;
import flash.text.*;
import fl.transitions.*;
import fl.transitions.easing.*;
import flash.text.StyleSheet;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.events.*;
public class ContentText extends MovieClip
{
private var myURLLoader:URLLoader;
private var myURLRequest:URLRequest;
private var bodyTextField:TextField;
public var contentPage:String;
public var myTransitionManager:TransitionManager;
public function ContentText(paraString:String)
{
contentPage = paraString;
myURLLoader = new URLLoader();
myURLRequest = new URLRequest("data/styles.css");
myURLLoader.addEventListener(Event.COMPLETE, onLoadCSS);
myURLLoader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
myURLLoader.load(myURLRequest);
}
private function ioErrorHandler(evt:IOErrorEvent):void
{
trace('download failed');
}
private function onLoadCSS(event:Event):void
{
bodyTextField = new TextField();
var css:StyleSheet = new StyleSheet();
css.parseCSS(event.target.data);
myURLRequest = new URLRequest(contentPage);
bodyTextField.x = 50;
bodyTextField.y = 50;
bodyTextField.width = 200;
bodyTextField.height = 200;
bodyTextField.multiline = true;
bodyTextField.wordWrap = true;
bodyTextField.autoSize = TextFieldAutoSize.LEFT;
bodyTextField.selectable = false;
bodyTextField.styleSheet = css;
bodyTextField.condenseWhite = true;
addChild(bodyTextField);
myURLLoader.removeEventListener(Event.COMPLETE, onLoadCSS);
myURLLoader.addEventListener(Event.COMPLETE, onHTMLLoaded);
myURLLoader.load(myURLRequest);
}
private function onHTMLLoaded(evt:Event):void
{
// trace(evt.target.data);
bodyTextField.htmlText = evt.target.data;
myTransitionManager = new TransitionManager(this);
myTransitionManager.startTransition({type:Wipe, direction:Transition.IN, duration:5.5, easing:None.easeOut});
}
}
}
Scrollbar.as:
Code:
/**
* Flashscaper Scrollbar Component
* Customizable Scrollbar
*
* @author Li Jiansheng
* @version 1.0.0
* @private
* @website http://www.flashscaper
*/
package {
import caurina.transitions.*;
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class Scrollbar extends MovieClip {
private var target:MovieClip;
private var top:Number;
private var bottom:Number;
private var dragBot:Number;
private var range:Number;
private var ratio:Number;
private var sPos:Number;
private var sRect:Rectangle;
private var ctrl:Number;//This is to adapt to the target's position
private var trans:String;
private var timing:Number;
private var isUp:Boolean;
private var isDown:Boolean;
private var isArrow:Boolean;
private var arrowMove:Number;
private var upArrowHt:Number;
private var downArrowHt:Number;
private var sBuffer:Number;
public var scroller:MovieClip;
public var track:MovieClip;
public var downArrow:MovieClip;
public var upArrow:MovieClip;
public function Scrollbar():void {
scroller.addEventListener(MouseEvent.MOUSE_DOWN, dragScroll);
}
//
public function init(t:MovieClip, tr:String,tt:Number,sa:Boolean,b:Number):void {
target = t;
trans = tr;
timing = tt;
isArrow = sa;
sBuffer = b;
if (target.height <= track.height) {
this.visible = false;
}
scroller.addEventListener(MouseEvent.MOUSE_OUT, stopScroll);
scroller.addEventListener(MouseEvent.MOUSE_UP, stopScroll);
stage.addEventListener(MouseEvent.MOUSE_WHEEL,mouseWheelHandler);
//
upArrowHt = upArrow.height;
downArrowHt = downArrow.height;
if (isArrow) {
top = scroller.y;
dragBot = (scroller.y + track.height) - scroller.height;
bottom = track.height - (scroller.height/sBuffer);
} else {
top = scroller.y;
dragBot = (scroller.y + track.height) - scroller.height;
bottom = track.height - (scroller.height/sBuffer);
upArrowHt = 0;
downArrowHt = 0;
removeChild(upArrow);
removeChild(downArrow);
}
range = bottom - top;
sRect = new Rectangle(0,top,0,dragBot);
ctrl = target.y;
//set Mask
isUp = false;
isDown = false;
arrowMove = 10;
if (isArrow) {
upArrow.addEventListener(Event.ENTER_FRAME, upArrowHandler);
upArrow.addEventListener(MouseEvent.MOUSE_DOWN, upScroll);
upArrow.addEventListener(MouseEvent.MOUSE_UP, stopScroll);
//
downArrow.addEventListener(Event.ENTER_FRAME, downArrowHandler);
downArrow.addEventListener(MouseEvent.MOUSE_DOWN, downScroll);
downArrow.addEventListener(MouseEvent.MOUSE_UP, stopScroll);
}
var square:Sprite = new Sprite();
square.graphics.beginFill(0xFF0000);
square.graphics.drawRect(target.x, target.y, target.width+5, (track.height+upArrowHt+downArrowHt));
parent.addChild(square);
target.mask = square;
}
public function upScroll(event:MouseEvent):void {
isUp = true;
}
public function downScroll(event:MouseEvent):void {
isDown = true;
}
public function upArrowHandler(event:Event):void {
if (isUp) {
if (scroller.y > top) {
scroller.y-=arrowMove;
if (scroller.y < top) {
scroller.y = top;
}
startScroll();
}
}
}
//
public function downArrowHandler(event:Event):void {
if (isDown) {
if (scroller.y < dragBot) {
scroller.y+=arrowMove;
if (scroller.y > dragBot) {
scroller.y = dragBot;
}
startScroll();
}
}
}
//
public function dragScroll(event:MouseEvent):void {
scroller.startDrag(false, sRect);
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveScroll);
}
//
public function mouseWheelHandler(event:MouseEvent):void {
if (event.delta < 0) {
if (scroller.y < dragBot) {
scroller.y-=(event.delta*2);
if (scroller.y > dragBot) {
scroller.y = dragBot;
}
startScroll();
}
} else {
if (scroller.y > top) {
scroller.y-=(event.delta*2);
if (scroller.y < top) {
scroller.y = top;
}
startScroll();
}
}
}
//
public function stopScroll(event:MouseEvent):void {
isUp = false;
isDown = false;
scroller.stopDrag();
stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveScroll);
}
//
public function moveScroll(event:MouseEvent):void {
startScroll();
}
public function startScroll():void {
ratio = (target.height - range)/range;
sPos = (scroller.y * ratio)-ctrl;
Tweener.addTween(target, {y:-sPos, time:timing, transition:trans});
}
}
}
texttext.fla:
Code:
import ContentText;
var ct:ContentText;
var sb:MovieClip;
ct = new ContentText("data/loremipsum.htm");
ct.x = 100.0;
ct.y = 50.0;
addChild(ct);
sb = new Scrollbar;
sb.x = 500.0;
sb.y = 50.0;
addChild(sb);
sb.init(ct,"easeOutSine",2,true,2);
I know it's a lot of code, but any help that you can provide would be greatly appreciated!
As an update, I did get this sort of working by adding a button that brings in the scrollbar as a separate function. This works after the text's transition has completed. Perhaps I can simply tie the scrollbar function to a timer that fires when the text begins to load?
Cant Figure Out HTML Formatted Dynamic Text?
Hi there!
I really hope someone can help me. I have lots of pages of text for this flash project Im working on & I have put all the text into one text file & am using variables to dynamically load the text into a text box on each external swf.
My problem is that I have decided to format the text using html, just put things in itallic & bold etc and it doesnt seem to work. After the 1st html tag, the text just dissapears. I have the format as html button pressed & have searched these forums & still cant find the answer. Please help!
My code on the 1st frame of the external swf is...
Code:
//loads text
loadText = new LoadVars();
loadText.load("axios.txt");
loadText.onLoad = function(success) {
if (success) {
//trace(success);
box.html = true;
box.htmlText = this.corptext;
delete this.onEnterFrame;
}
};
And my text file looks like this....
Code:
&corptext=<b>Axios Systems</b> is a leading provider of consolidated IT Service Management software solutions.&
But any text between the html tags dissapears. What am I doing wrong?
Your help is much appreciated
HTML Formatted External Text In Flash Bug?
Hi folks,
I have no issues with loading text etc. However I am noticing a strange thing happen when parsing in html code.
I have a text file which looks similar to:
Code:
§ionCopy=<font size="16">blah blah big text</font>
blah blah blah <b>bolded text</b> more text.
the font size increases where asked to however the bold doesn't work. instead the contents of the bold tag are not output at all. as if it is working like a trim or similar.
has anyone else come accross this in MX04?
[MX 2004 Pro] HTML Formatted Text Area
I'm trying to load html-formatted text in from a file to put in a text area (which is set to render text as html text). The htmlFile instance is of XML type and it reads in the file correctly (I traced it) but when I assign it to the text area it reads as plain text instead of html-text. I use this code on loading event:
Code:
htmlFile.onLoad = function(success)
{
_root.txtArea.text=htmlFile;
_root.txtArea.html=true;
}
the text field reads a file like this:
Code:
this is an <b>html</b> file
and displays:
"this is an <b>html</b> file"
instead of:
"this is an html file"
What am I doing wrong?
HTML Formatted Text Vs. Unquoted Attributes
I'm having trouble loading HTML formatted text from an external file where some of the attributes of some of the html tags are not in quotes.
These two work fine...
Code:
<a href="linkhere.html">myLink</a>
<a href="linkhere.html" target="_blank">myLink</a>
This next one on the other hand just shows up as nothing... notice the lack of quotes around the "target" attribute.
Code:
<a href="linkhere.html" target=_blank>myLink</a>
Obviously I should just quote the attributes but the content is being loaded from a database populated with the use of a web based wysiwyg editor that just happens not to put quotes around the attributes.
Any ideas would be much appreciated.
Problem Importing HTML Formatted Text
Hi. I am attempting to create an animation using a sequence of dynamic text fields which will contain colored html ascii characters. Here's what I've done so far:
I've taken a video clip and exported it into a sequence of jpeg image files. Then, I've taken each of the image files and run them through a jpeg to html converter (found at: http://www.text-image.com/convert ).
I would now like to take this dynamic html formatted text and import it into separate text fields within Flash.
I found what looked like it would solve my problems - a document on Macromedia's site explaining how use HTML text formatting. The URL I'm referring to is: http://www.macromedia.com/support/fl...s/htmltext.htm
I have gotten so far as to set the text field to "dynamic text," set the "render text as html" on, and give the text field a variable name. I then inserted a "set variable" action in the first frame of my movie, typed the text field name into the "variable" section and inserted the html (that was outputted from the jpg2html converter) into the "value" section.
I am still having no luck. Any suggestions? Thanks.
-Adam Newton
Parsing HTML Formatted Text Via XML To Flash
Can anyone shed some light on this for me cause it has me stuck.
I am attempting to parse HTML formatted text to flash MX with XML as a string but Flash is getting confused when it brings it in, any suggestions??
Formatted Php/html File In An MX Dynamic Text Window
Hi everyone,
I have looked all around the forum for a specific answer to this but couldn't find one -- so if someone can guide me - it would be really appreciated. Again, if this has been posted somewhere I apologize --> pointing me at it would be fine too.
What I want to do seems like it should be pretty straightforward, but I can't get it to go.
I have a php script that pulls froma db -->
http://www.mswebsolutions.com/hdawg/holly_index.php
I have a Flash/swf file (done in MX) with a dynamic text window here -->
http://www.mswebsolutions.com/hdawg/live.swf
basically what I want is to show the php script - formatted as is IN the dynamic text window. (The name of the window is "bianco" if that helps).
Thanks again
kordic27
[F8] Search/Find Dynamic Text Formatted As HTML
Hi,
I'm new to AS and have searched the forums for this but have not found an answer.
Is it possible to search a dynamic text area component that is set to display HTML?
I've been able to load and search a text file but when i switch the component to display html, the search function stops working.
Is this just a parameter I haven't added somewhere?
Thanks for any help,
-rm
What's Wrong With My HTML Formatted Externally Loading Text?
I am trying to load in a text file into a flash movie which has some HTML formatting to it - there's very little i can find out about this on the web - it kinda works..
here's my external text file..
history=<B>History of BodyTalk</B>
<B>World Wide Focus</B>
The International Association (IA) <a href="http://www.bodytalksystem.com" target="_blank"> <font color="#0099FF"> www.bodytalksystem.com </font></a>
What's Wrong With My Externall-loading HTML-formatted Text?
I am trying to load in a text file into a flash movie which has some HTML formatting to it - there's very little i can find out about this on the web - it kinda works..
here's my external text file..
history=<B>History of BodyTalk</B>
<B>World Wide Focus</B>
The International Association (IA) <a href="http://www.bodytalksystem.com" target="_blank"> <font color="#0099FF"> www.bodytalksystem.com </font></a>
Help With Preloading HTML Formatted External Text Files...
I'm making a dynamic web site all in flash, and I need all the content to be dynamic, so it's all being loaded from external text files with HTML formatted text.
The problem is: I want to make a preloader that caches the files before we enter the site, and what it does currently, is it caches the text part of the files, but not the pictures.
for example:
Code:
<b>hello world</b><img src="photo.jpg">
would just cache the hello world part and not the photo. and let's say the photo is 2 MBs, we miss the point right...
does anyone have an idea of how to cache the photos inside the html formatted text?
Html Formatted Text Nodes In XML Making ExternalInterface Call
I have a challenge that I need some help on. I have a site that is using Flash as a front-end reader of an XML file that is providing all content as html formatted text nodes. The information is being read into Flash and displaying exactly as I want it to. The problem is the anchor tags that are using "event:" to pass parameters to a function that includes an ExternalInterface call are not passing their info on to the javascript that is on the html wrapper file. I've included all the code below. Any help or suggestions would be greatly appreciated.
The html info from the XML text node:
Code:
<a href="event:page.htm">Click here for more information</a>
The javascript on the html wrapper:
Code:
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
The snippet of AS that makes the relevant calls (content_txt is the TextField that holds the text node html text:
Code:
function openWindow(fileName:TextEvent):void {
var fileNameToGo:String = fileName.text;
ExternalInterface.call("MM_openBrWindow",fileNameToGo,'popupwindow','scrollbars=yes,width=760,height=400');
}
content_txt.addEventListener(TextEvent.LINK, openWindow);
The test site is at http://www.ddanewilliams.com/campelectric/ The file is rather large - I apologize. I haven't started tweaking and preloading anything yet. The link is on the last line of the "about" section.
Customize Context Menu Of HTML-formatted Text Hyperlink
is possible customize context menů of HTML-formatted text hyperlink?
my problem is this i must use the asfunction to manage the url of hyperlink , but in this way is disabled the context menu, foexample if i click in the item "open in new window" i remain in the same page
HTML Formatted Dynamic Text Box Screws Up Font Whaa?
ive got some text in a dynamic text box, so i can use 'asfunction' to link it to frame labels within the site.
BUT, choosing dynamic text changes the resulting look of the font! it also totally balls's up the formatting. It totally ignores where i have put a new line (ie pressed enter(return)key). And it misses out half the text. Where the text box in flash normally constrains it and creates a new line, the text just dissapoears. I've tried sticking <br> in there but no love.
I am not linking to a text file, i am just placing the text in there in flash 8.
Im using CORDIA UPC for the site, a very nice clean font, and suddenly, when i preview it in my browser, its now arial or some such crap. or maybe its still the smae font but it looks crappy! its uglying up the scene...
whats the scoop here?
am i destined to have crappy text and usefull links or is there a sweet way round this.. please
thanks
|