Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Loading Text & JPG Nito TextField Makes Textfield White



Hi guys !Does anyone know, why a textfield may become white when loading text + JPGs into it? Sometimes it happens to me, sometimes not. I haven't figured out why. If you have any clues... I'd be really thankfulThe AS I'm using:_target.container.t.html = true_target.container.t.condenseWhite = true_target.container.t.autoSize = "left";_target.container.t.htmlText = _data.textoThe String ( &HTML ):"Text lorem ipsum bla bla ..... <img style='WIDTH: 154px; HEIGHT: 59px' height='298' width='856' alt='' src='http://www.spacilong.com/arq/img/AlcatelLucent_Hor_2col_sm.jpg' />



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 06-18-2008, 12:18 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

[textfield] How To Check If Input Text Is More Than Textfield Height?
Hi guys, Is there a way to check if the text that has been input into the textfield is more than the height of the textfield.

I have set the scrollbar hidden and it will become unhidden once the text is greater the the textfield height.

I did try to count the input text and set the visiblity of the scrollbar against that count. Unfortunatly this is unreliable.

Anyone got a better idea?

Cheers
Paul

[textfield] How To Check If Input Text Is More Than Textfield Height?
Hi guys, Is there a way to check if the text that has been input into the textfield is more than the height of the textfield.

I have set the scrollbar hidden and it will become unhidden once the text is greater the the textfield height.

I did try to count the input text and set the visiblity of the scrollbar against that count. Unfortunatly this is unreliable.

Anyone got a better idea?

Cheers
Paul

Loading Text Into TextField?
my failed loading text into textField: http://www.fzvastgoed.nl/pcxpert (at the bottom)
The .fla file is downloadable at:
http://www.fzvastgoed.nl/pcxpert/loadingText.zip


In the main.swf (_level0 is this) i put:

PHP Code:



// ----------------<LoadVars>----------------------\
var myLV:LoadVars = new LoadVars();
myLV.onLoad = function(success:Boolean) {
    if (success) {
        _level5.loadedInfo.htmlText = myLV.info;
    } else {
        _level5.loadedInfo.text = "There has been an error loading the requested information. Please contact the Webmaster and report your error at michaellobry.com.";
    }
};
// ----------------</LoadVars>----------------------\







In the page_downloadsText.swf i put:

PHP Code:



// ------------------<Load CSS>---------------------- \
var cssStyles:TextField.StyleSheet = new TextField.StyleSheet();
cssStyles.load("stylesheet/markup.css");
cssStyles.onLoad = function (success:Boolean) {
    if (success) {
        downloads_txt.styleSheet = cssStyles;
        _level0.myLV.load("text/Downloads.txt");
    } else {
        downloads_txt.text = "Error loading Downloads.txt";
    }
}
// ------------------</Load CSS>---------------------- \

// loading Downloads.txt at startup/ default
_level0.myLV.load("text/Downloads.txt");






The paths are correc. Why doesn't the text load?

Textfield Turns White When Image Is Loaded Inside
Why does html-enabled textfield turn white when image is loaded inside?
Is this a known bug in flash 8?
Is it possible to prevent it?
Please help!

http://www.hot.ee/freq/textfield.html

files are attached

Loading Text In Mc And Dynamic Textfield
Well, yes again another topic about this problem; but i read them all and couldn't find my solution. I need to load the text of guestbook.txt into a dynamic textfield "GuestBook" in a MC called page5.
After long searching on this site, i found out that it could be something with the path and i arrange it; but now the guestbook textfile will open in a new window.
This is the load-code:
NumLow = 0;
NumHigh = 10;
loadVariablesNum ("GuestBook.php?NumLow="+NumLow+"&NumHigh="+NumHig h+"&R="+random(999), _root.page5);
stop();

I know, it's with Loadvariablesnum; not so popular i've read. but i'm a beginner in this and i'm keen to learn it as good as possible.
I've attached the fla file, renamed it with extension zip. So, if you want to check just rename the extension to fla.

So, can somebody give me some info about to open the textfile in the guestbook variable. Thanks, everybody. Dave

Loading External Text Into The Textfield Component
Using MX 2004pro there is no longer a scrollbar compnent? it seems to simply be stuck inside the text field component

so my question is how do I load external text into this component?

Loading Dynamic Text In Scrolling Textfield
Hi,

I have dynamic textfield inside a graphic, for animation. This graphic scrolls so text keeps continually scrolling.

It works ok with the text I entered manually in the textfield, but it shows nothing when I assign other text at runtime using ActionScript.

I associated a variable to the textfield, so I assign text to that variable. When I do that, textfield is blank.

I read that the font might need to be embeded, so I checked and there are 95 glyphs embedded. Enough for my testing text at least.

Any ideas ??? I have been searching the forum for hours before posting, but nothing solved the problem.


Thanks!!!

Loading Random Text Files Into TextField
I'm looking for a way to load random quotes from .txt files into a text field. Does anyone know where I can find a tutortial on this or can it be explained rather simply?

My idea is to name the text files sequentially (i.e. 001.txt, 002.txt, etc.) but to have Flash load them randomly for the duration of the movie clip in which the text field will reside. (Or can Flash parse the individual quotes from a single .txt file?)

I need a push in the right direction.

I'm fairly new to ActionScripting and have searched all of my familiar sources but so far have come up empty handed.

Background Of Textfield Linked To Textfile Turns White When Attached With Scrollbar
The background of my textfield turns white after it is linked to a scrollbar. This only happens when the textfield displays text from an external file, otherwise (if I simply typed in the text manually), it behaves normally: transparent background.

I tried to set the background property to false but it failed; I placed the line in various places: onLoad event of LoadVar object, onLoad and onScroller events of textfield, onLoad and onEnterFrame events of scrollbar, and sequentially in my Script Frame. Only when I placed it inside the onEnterFrame of scrollbar and onScroller of textfield I yielded some success, which the background, instead of staying white, "flashes" when I scrolled the bar (the background switches itself from white to transparent back-and-forth really quickly). And interestingly, if I removed the line from the onEnterFrame of scrollbar, the background stayed white when the bar sat at either end of its track.

After I have gnashed my teeth of serveral hours, I compromised by setting the background colour to one that resembles the image I have placed behind the textfield. However, I do want it to be transparent and I would like some help, if anyone. Please.

Adjusting TextField Size With Loading Dynamic Text
OK, here's my problem:

I have a MC that I'm scrolling with some code, and my MC contains both another movie clip that is static, and a dynamically loaded text field. In order to scroll both fluidly together, I've masked the MC and am scrolling it instead of just the textfield.

Now my problem is that when I dynamically load in text, I can't figure out a way to dynamically expand the text box to fit all of the text inside of it. I can set the TextField._height and it works statically but I'm lost with the code to figure out how long the text extends and adjust the height accordingly, if thats possible.

Hope that makes any sense, thanks for your help!

Formatting External Text File As Html When Loading A TextField
I'm new to actionscript and I'm having trouble finding code examples of what I'm trying to do.
I'm loading a textField with addChild in a movieClip and want the external text file I am loading into this textField to render in the textField as HTML. I have attached the code I am using. If anyone can help or has some example code I would greatly appreciate it. Thanx







Attach Code

stop();
var plannerExt_txt:TextField = new TextField();
var plannerExtReq:URLRequest = new URLRequest("planner_Ext.txt");
var plannerExtLoad:URLLoader = new URLLoader();
var plannerUp_btn:MovieClip = new mc_upScroll
var plannerDown_btn:MovieClip = new mc_downScroll


plannerExtLoad.load(plannerExtReq);

plannerUp_btn.buttonMode = true;
plannerDown_btn.buttonMode = true;

plannerExtLoad.addEventListener(Event.COMPLETE, plannerExtReady);
plannerUp_btn.addEventListener(MouseEvent.MOUSE_DOWN, plannerScrollUp);
plannerDown_btn.addEventListener(MouseEvent.MOUSE_DOWN, plannerScrollDown);

plannerExt_txt.y = -272;
plannerExt_txt.x = -118;
plannerExt_txt.height = 537;
plannerExt_txt.width = 597;
plannerExt_txt.border = false;
plannerExt_txt.wordWrap = true;


addChild(plannerExt_txt);




function plannerExtReady(event:Event):void
{
plannerExt_txt.text = event.target.data;
plannerUp_btn.x = 470;
plannerUp_btn.y = -305;
addChild(plannerUp_btn);

plannerDown_btn.x = 470;
plannerDown_btn.y = 250;
addChild(plannerDown_btn);
}

function plannerScrollUp(event:MouseEvent):void
{
plannerExt_txt.scrollV --;
}

function plannerScrollDown(event:MouseEvent):void
{
plannerExt_txt.scrollV ++;
}

Tweening Textfield With Embed Fonts And Loading Text Through LoadVars
Hi guys,
I am gonna ask the same question again regarding tweening in text fields.
I already read some Adobe documentation and I understood that text field has its property _alpha available just when it HAS embed FONTS,
So I supose if I want apply a tween class on a text field, I HAVE to have a embed font aplied in this text field... well, for now it is ok, because I did some experiments and everything worked good, but I need to use LoadVars to load my text from external file, and that is my deal.
Does anydoby know something regarding this issue, because I already tried a text fiels with TextFormat class aplied, and embed Fonts, but when I try to load my text from an external file, nothing happen !
You guys can check this site below and notice that thet ext field has a tween class aplied in "About Us", "Testimonials", "Pricing" and "Contact US"...

Do you guys think that they did not use a external text file for this option ?
Just writing all text directly in TextField.text propriety instead a external file ?

http://www.pictureperfectphotoonline.com/index2.php

Textfield Woes, How To Anti-Alias A Dynamic Textfield?
this is driving me nuts, even if i have it marked so that my dynamic textfield is anti aliased, it still looks as if its text is aliased. And if i simply make that textfield Static, the text all of a sudden looks amazingly crisp and anti aliased.

How can i fix this?! I am attempting to load xml data into my text fields but its wasted if the text looks like crap..

So can anyone enlighten me on how to do this? i tried searching Flashs help, all i came out with was "Textfield._quality" but i do not understand what the description means exactly.. And i tried coding my textfield to _quality = "BEST";, with no avail.

Please help, i'v seen other websites with what i am sure is dynamically loaded fields, and smooth looking text... so what gives?

Thanks!

Link In Dynamic Textfield To Jump To Section Of Same Textfield
Howdy all,

I know you've all seen this before - you are on a website and you click a link and you stay on the same page but jump down to a different section of the page. Like an FAQ page or something where all the questions are listed above but you click on one and jumps down to the answer below.

Is it possible to do this in a dynamic (scrollable) textfield with externally loaded text files in Flash? I don't have DW and I know that there are limited html tags available but if anyone knows an easy way to do this please let me know!

thanks!

After Killing The Focus On A Textfield, The Textfield Remains Selected. Why ?
Hi.
I have a serious problem with the deselecting text when I kill the focus on a textfield.
to see better what I am trying to say, please clcick this link: http://www.eurogaz.ro/rring/expert/

Link In Dynamic Textfield To Jump To Section Of Same Textfield
Howdy all,

I know you've all seen this before - you are on a website and you click a link and you stay on the same page but jump down to a different section of the page. Like an FAQ page or something where all the questions are listed above but you click on one and jumps down to the answer below.

Is it possible to do this in a dynamic (scrollable) textfield with externally loaded text files in Flash? I don't have DW and I know that there are limited html tags available but if anyone knows an easy way to do this please let me know!

thanks!

Masking Dynamic Textfield When The Textfield Has A Stylesheet
ok... i have a movieClip containing dynamic textfields, which i'm trying to mask. the textfields are linked to a stylesheet. i understand that, for the masking to work, i have to embed the font. so i've placed the font in the library, given it a linkage name and set embedFonts = true for the dynamic textfields.

what do i do next? and does the fact that i'm embeding the font override the effect of the stylesheet?

(sorry if i sound confused over this. that's because i am.)

thanks in advance for any help

Passing Data Form A Textfield To Another Textfield
ok, how can i grab/store information from a specific textfield instance in scene1 and pass it over to another textfield instance in scene2??

need help, its been bugging me for dayz! <:O

[F8] Input Textfield Inside A Dynamic Textfield?
Hi,

Is it possible to place an input textfield inside a dynamic textfield?

I'd like to replace the variable, this.nTotal, below with an input textfield.
Is there some way to do this?

this.txtComplete.text = "There are " + this.nTotal + " pages in " + this.sGirlName + "'s book.";

Thanks!

Textfield In ScrollPane > Textfield Only Accessible With Clicking Twice
hi!

i have a scrollPane on the stage which contains an editable textfield.
unfortunately i can only access the textfield in the pane when i click on it twice. it seems that the first click goes for the activation of the pane and then comes the textfield.

does anybody have an idea how to solve that problem?


// Text Field
var myTextField:TextField = new TextField();
myTextField.text = "Please insert text";
myTextField.selectable = true;
myTextField.type = TextFieldType.INPUT ;

// ScrollPane
var myScrollPane:ScrollPane = new ScrollPane();
myScrollPane.source = myTextField;
addChild(myScrollPane);

Masking Dynamic Textfield When The Textfield Has A Stylesheet
ok... i have a movieClip containing dynamic textfields, which i'm trying to mask. the textfields are linked to a stylesheet. i understand that, for the masking to work, i have to embed the font. so i've placed the font in the library, given it a linkage name and set embedFonts = true for the dynamic textfields.

what do i do next? and does the fact that i'm embeding the font override the effect of the stylesheet?

(sorry if i sound confused over this. that's because i am.)

thanks in advance for any help


||| O ^ | + O ¬

Masking Dynamic Textfield When The Textfield Has A Stylesheet
ok... i have a movieClip containing dynamic textfields, which i'm trying to mask. the textfields are linked to a stylesheet. i understand that, for the masking to work, i have to embed the font. so i've placed the font in the library, given it a linkage name and set embedFonts = true for the dynamic textfields.

what do i do next? and does the fact that i'm embeding the font override the effect of the stylesheet?

(sorry if i sound confused over this. that's because i am.)

thanks in advance for any help


||| O ^ | + O ¬

Return TextField From Extended TextField Class
Hi

I'm trying to return a TextField from a class and then display it on stage... but I'm having problem to get it to show up on stage?

Help appreciated!

TFCreator.as:


Code:

import flash.display.*;
import flash.text.*;

public class TFCreator extends TextField
{

// TextField
private var tf:TextField;

// Properties
private var txt:String;
private var instancename:String;
private var color:Number;
private var autosize:String;
private var multilinee:Boolean;
private var wordwrap:Boolean;

// Default TextFormat
private var dfrmt:TextFormat;
private var dfrmt_font:String;
private var dfrmt_color:Number;
private var dfrmt_size:Number;

// External TextFormat
private var efrmt:TextFormat;

public function TFCreator(txt:String = "Text", instancename:String = "Instance", color:Number = 0x333333, autosize:String = "LEFT", multilinee:Boolean = false, wordwrap:Boolean = false, dfrmt_font:String = "Arial", dfrmt_size:Number = 11, dfrmt_color:Number = 0x333333):void
{

// Init Properties
this.txt = txt;
this.instancename = instancename;
this.color = color;
this.autosize = autosize;
this.multilinee = multilinee;
this.wordwrap = wordwrap;

// Init Default Textformat
this.dfrmt_font = dfrmt_font;
this.dfrmt_size = dfrmt_size;
this.dfrmt_color = dfrmt_color;

// Create TextField
createTextfield();

}

private function createTextfield():TextField
{

// New TextField
this.tf = new TextField();

// Set Default TextFormat
setDefaultTextformat();

// Set Properties
this.tf.text = this.txt;
this.tf.name = this.instancename;
this.tf.textColor = this.color;
setAutosize(this.autosize);
setMultiline(this.multilinee);
setWordwrap(this.wordwrap);

trace("Textfield created");

// Add TextField to Displaylist
//addChild(this.tf);
return this.tf;

}

// Getters & Setters......

}
}
and test on timeline:


Code:

import TFCreator;

var ttxt:String = "Halloooo?";

var t1:TFCreator = new TFCreator(ttxt,"inst1",0x666666,"LEFT",false,false,"Arial",13,0x333333);
addChild(t1);
t1.x = 200;
t1.y = 300;
//t1.selectable = false;
t1.setText("Baaaaa");
trace(t1.getText());
//t1.setAutosize("CENTER");
trace(t1.getAutosize());
trace(t1);
getChildByName("inst1");
It seems to work ok it just wont show up on stage.

Masking Dynamic Textfield When The Textfield Has A Stylesheet
ok... i have a movieClip containing dynamic textfields, which i'm trying to mask. the textfields are linked to a stylesheet. i understand that, for the masking to work, i have to embed the font. so i've placed the font in the library, given it a linkage name and set embedFonts = true for the dynamic textfields.

what do i do next? and does the fact that i'm embeding the font override the effect of the stylesheet?

(sorry if i sound confused over this. that's because i am.)

thanks in advance for any help


||| O ^ | + O ¬

TextField: Can We Embed HTML In Textfield?
Hello all,

I know that textfield can embed HTML like:

Code:
createTextField("noteText", 1, 100, 100, 300, 30);
noteText.type = "dynamic";
noteText.wordWrap = true;
noteText.border = true;
noteText.html = true;
noteText.htmlText = '<font color="#FF0000">This is HTML</font>';
I wonder if we embed button, HTML input field int Flash textfield?

Code:
noteText.htmlText = '<input name="txtTest" type="text">';
Thanks,

Create Textfield With New Textfield Variable?
flash MX 2004 professional
--------------------------

anyone know if it's possible to create a dynamic textfield AND specify not only an instance name but also a textfield variable?

thx
eve

Cant Get Textfield Height From AutoSized Textfield
Afternoon guys.

I am creating a new nwe3s blogger. Instead of relying on a scrollbar to scroll the news story i thought i would use
code: textField.autosize="left"
This works fine...
At present i am loading x amount of news into flash at any one time. I am placing the news story underneath each other using
code:
holder.attachMovie ("newsMc", "news" + i, i);
holder['news' + i]._y = nextY;
nextY += Math.ceil (holder['news' + i]._height) + 2;

this is fine...
But when i use
code: textField.autosize="left"
nextY retains it's orginal height even though some of the news stories have made for higher textfields.

I thought i could pull the height from the previuosly created news holder
code:
if (i > 0) {
j = i - 1;
trace (j + " text height=" + holder['news' + j].newsStory._height);
if (holder['news' + j].newsStory._height > 184) {
nextY += Math.ceil (holder['news' + j]._height) + 2;
} else {
nextY += Math.ceil (holder['news' + j]._height) + 2;
trace ("nextY=" + nextY);
}

But this still returns the intial height

Here is the complete code
code:
for (i = 0; i < this.newsCount; i++) {
holder.attachMovie ("newsMc", "news" + i, i);
holder['news' + i]._y = nextY;
holder['news' + i].newsTitle.text = this['news' + i + 'newsTitle'];
holder['news' + i].newsDate.text = "Submitted: " + this['news' + i + 'newsDate'];
holder['news' + i].newsStory.htmlText = this['news' + i + 'newsStory'];
nextY += Math.ceil (holder['news' + i]._height) + 2;
if (i > 0) {
j = i - 1;
trace (j + " text height=" + holder['news' + j].newsStory._height);
if (holder['news' + j].newsStory._height > 184) {
nextY += Math.ceil (holder['news' + j]._height) + 2;
} else {
nextY += Math.ceil (holder['news' + j]._height) + 2;
trace ("nextY=" + nextY);
}
}
unloadMovie (dtLoader);
viser._visible = 0;
}

Cant Get Textfield Height From AutoSized Textfield
Afternoon guys.

I am creating a new nwe3s blogger. Instead of relying on a scrollbar to scroll the news story i thought i would use

ActionScript Code:
textField.autosize="left"
This works fine...
At present i am loading x amount of news into flash at any one time. I am placing the news story underneath each other using

ActionScript Code:
holder.attachMovie ("newsMc", "news" + i, i);
holder['news' + i]._y = nextY;
nextY += Math.ceil (holder['news' + i]._height) + 2;
this is fine...
But when i use

ActionScript Code:
textField.autosize="left"
nextY retains it's orginal height even though some of the news stories have made for higher textfields.

I thought i could pull the height from the previuosly created news holder

ActionScript Code:
if (i > 0) {
j = i - 1;
trace (j + " text height=" + holder['news' + j].newsStory._height);
if (holder['news' + j].newsStory._height > 184) {
nextY += Math.ceil (holder['news' + j]._height) + 2;
} else {
nextY += Math.ceil (holder['news' + j]._height) + 2;
trace ("nextY=" + nextY);
}
But this still returns the intial height

Here is the complete code

ActionScript Code:
for (i = 0; i < this.newsCount; i++) {
    holder.attachMovie ("newsMc", "news" + i, i);
    holder['news' + i]._y = nextY;
    holder['news' + i].newsTitle.text = this['news' + i + 'newsTitle'];
    holder['news' + i].newsDate.text = "Submitted: " + this['news' + i + 'newsDate'];
    holder['news' + i].newsStory.htmlText = this['news' + i + 'newsStory'];
    nextY += Math.ceil (holder['news' + i]._height) + 2;
    if (i > 0) {
        j = i - 1;
        trace (j + " text height=" + holder['news' + j].newsStory._height);
        if (holder['news' + j].newsStory._height > 184) {
            nextY += Math.ceil (holder['news' + j]._height) + 2;
        } else {
            nextY += Math.ceil (holder['news' + j]._height) + 2;
            trace ("nextY=" + nextY);
        }
    }
    unloadMovie (dtLoader);
    viser._visible = 0;
}

TextField.multiline Or TextField.wordWrap
i know TextField.multiline.
actually, i don't know what is difference if the text's multiline is true.

i used to set text wordWrap is true without multiline

INPUT TextField Within An HTML TextField Via <img>
I'm trying to extend an HTML TextField to include an INPUT TextField control as an <img> tag. This I can do. The problem is that mouse and keyboard events are not being seen by the inner TextField. I created a test case to demonstrate the situation. My guess is that <img> tags are treated like AS2 events and because the outer TextField is trapping text events, they are not propagated to the inner TextField. Is there anyway around this problem? Mouse events to other DisplayObjects work fine. I'm using Flash CS3.

The test case contains two classes. TextImgTest is the document class for TextImgTest.fla. TestImg implements the <img> loaded by TestImgTest. To run this. Just create an empty TextImgTest.fla and set the document class to TextImgTest. Then publish and run.







Attach Code

package
{
import flash.display.MovieClip;
import flash.events.TimerEvent;
import flash.text.TextFieldAutoSize;
import flash.text.TextField;
import flash.text.StyleSheet;
import flash.utils.Timer;
import TestImg;

public class TextImgTest extends MovieClip
{
public var textField: TextField;
public var styleSheet: StyleSheet;
public var img: TestImg;
public var timer: Timer;

public function TextImgTest(): void
{
// render directly
img = new TestImg();
addChild(img);
// render within a TextField as an <img> tag.
styleSheet = new StyleSheet();
styleSheet.setStyle("p", {fontFamily:"sans-serif", fontSize:"10"});
textField = new TextField();
textField.styleSheet = styleSheet;
textField.multiline = true;
textField.autoSize = TextFieldAutoSize.LEFT;
textField.wordWrap = true;
textField.border = true;
textField.borderColor = 0x0000FF;
textField.background = true;
textField.backgroundColor = 0xFFCCFF;
textField.width = 190;
textField.x = 5;
textField.y = 120;
textField.htmlText = "<p>TextField with an <img src='TestMsg' id='rmk'> tag:<br><img src='TestImg' id='rmk'></p>"
addChild(textField);
textField.selectable = true;
textField.mouseEnabled = true;
// Give it a little time to render then get a reference to it.
timer = new Timer(3000, 1);
timer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimeout);
timer.start();
}

public function onTimeout(evt: TimerEvent): void
{
var freeText: TestImg = textField.getImageReference("rmk") as TestImg;
freeText.tField.mouseEnabled = true;
freeText.tField.selectable = true;
freeText.tField.appendText(" Got ImageReference for 'rmk'.");
}
}
}
===================================================
package
{
import flash.display.MovieClip;
import flash.display.SimpleButton;
import flash.display.Sprite;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
import flash.text.TextFormatAlign;
import flash.text.TextField;
import flash.text.TextFieldType;

public class TestImg extends MovieClip
{
static public const MSG_WIDTH: int = 170;
static public const MSG_HEIGHT: int = 100;
static public const MSG_MARGIN: int = 8;

public var tFmt: TextFormat;
public var tField: TextField;
public var sBut: SimpleButton;

public function TestImg(): void
{
super();
this.tabEnabled = false;
this.mouseEnabled = false;
// Show this MovieClip
with (this.graphics)
{
clear();
beginFill(0x9999FF);
drawRect(0, 0, MSG_WIDTH, MSG_HEIGHT);
endFill();
}
// Show the INPUT TextField within it.
tFmt = new TextFormat("_sans", 10, 0x000000, true, false,
false, null, null,
TextFormatAlign.LEFT);
tField = new TextField();
tField.type = TextFieldType.INPUT;
tField.height = MSG_HEIGHT - 2*MSG_MARGIN - 16;
tField.defaultTextFormat = tFmt;
tField.multiline = true;
tField.wordWrap = true;
tField.width = MSG_WIDTH - 2*MSG_MARGIN;
tField.border = true;
tField.borderColor = 0xFF0000;
tField.background = true;
tField.backgroundColor = 0xFFEECC;
tField.x = MSG_MARGIN;
tField.y = MSG_MARGIN;
tField.text = "TestImg MovieClip containing an INPUT TextField.";
this.addChild(tField);
tField.selectable = true;
tField.mouseEnabled = true;
// Show the button within this MovieClip
var butGraphics1: Sprite = new Sprite();
with (butGraphics1.graphics)
{
lineStyle(1, 0x000000);
beginFill(0xFF0000);
drawRect(0, 0, 32, 16);
endFill();
}
var butGraphics2: Sprite = new Sprite();
with (butGraphics2.graphics)
{
lineStyle(1, 0x000000);
beginFill(0x00FF00);
drawRect(0, 0, 32, 16);
endFill();
}
sBut = new SimpleButton();
sBut.upState = butGraphics1;
sBut.overState = butGraphics2;
sBut.downState = butGraphics1;
sBut.hitTestState = butGraphics2;
sBut.x = MSG_MARGIN;
sBut.y = MSG_HEIGHT - MSG_MARGIN - 16;
this.addChild(sBut);
}

}
}

[ac-mx-04]duplicate A Textfield OR Doing A Textfield With Outlines.
Either I want code to duplicate a textfiled OR...
To do a textfield that that font outlines on "§!"#¤%&/()=?`@£${[]}¨^~'*-_.:,;<>|qwertyuiopåasdfg hjklöäzxcvbnmQWERTYUIOPÅASDFGHJKLÖÄZXCVBNM01234567 89"
And some others settings:
font: fixed_v01
color: white
align: left
size: 8
selectable: NO
render as html: yes

Can someone help me with this?

Cant Get Textfield Height From AutoSized Textfield
Afternoon guys.
I am creating a new nwe3s blogger. Instead of relying on a scrollbar to scroll the news story i thought i would use

ActionScript Code:
textField.autosize="left"



This works fine...
At present i am loading x amount of news into flash at any one time. I am placing the news story underneath each other using

ActionScript Code:
</p>
<p>holder.attachMovie ("newsMc", "news" + i, i);</p>
<p>holder['news' + i]._y = nextY;</p>
<p>nextY += Math.ceil (holder['news' + i]._height) + 2;</p>
<p>



this is fine...
But when i use

ActionScript Code:
textField.autosize="left"



nextY retains it's orginal height even though some of the news stories have made for higher textfields.
I thought i could pull the height from the previuosly created news holder

ActionScript Code:
</p>
<p>if (i > 0) {</p>
<p>j = i - 1;</p>
<p>trace (j + " text height=" + holder['news' + j].newsStory._height);</p>
<p>if (holder['news' + j].newsStory._height > 184) {</p>
<p>nextY += Math.ceil (holder['news' + j]._height) + 2;</p>
<p>} else {</p>
<p>nextY += Math.ceil (holder['news' + j]._height) + 2;</p>
<p>trace ("nextY=" + nextY);</p>
<p>}</p>
<p>



But this still returns the intial height
Here is the complete code

ActionScript Code:
</p>
<p>for (i = 0; i < this.newsCount; i++) {</p>
<p> holder.attachMovie ("newsMc", "news" + i, i);</p>
<p> holder['news' + i]._y = nextY;</p>
<p> holder['news' + i].newsTitle.text = this['news' + i + 'newsTitle'];</p>
<p> holder['news' + i].newsDate.text = "Submitted: " + this['news' + i + 'newsDate'];</p>
<p> holder['news' + i].newsStory.htmlText = this['news' + i + 'newsStory'];</p>
<p> nextY += Math.ceil (holder['news' + i]._height) + 2;</p>
<p> if (i > 0) {</p>
<p> j = i - 1;</p>
<p> trace (j + " text height=" + holder['news' + j].newsStory._height);</p>
<p> if (holder['news' + j].newsStory._height > 184) {</p>
<p> nextY += Math.ceil (holder['news' + j]._height) + 2;</p>
<p> } else {</p>
<p> nextY += Math.ceil (holder['news' + j]._height) + 2;</p>
<p> trace ("nextY=" + nextY);</p>
<p> }</p>
<p> }</p>
<p> unloadMovie (dtLoader);</p>
<p> viser._visible = 0;</p>
<p>}</p>
<p>

[ac-mx-04]duplicate A Textfield OR Doing A Textfield With Outlines.
Either I want code to duplicate a textfiled OR...
To do a textfield that that font outlines on "§!"#¤%&/()=?`@£${[]}¨^~'*-_.:,;<>|qwertyuiopåasdfg hjklöäzxcvbnmQWERTYUIOPÅASDFGHJKLÖÄZXCVBNM01234567 89"
And some others settings:
font: fixed_v01
color: white
align: left
size: 8
selectable: NO
render as html: yes

Can someone help me with this?

Cant Get Textfield Height From AutoSized Textfield
Afternoon guys.

I am creating a new nwe3s blogger. Instead of relying on a scrollbar to scroll the news story i thought i would use

ActionScript Code:
textField.autosize="left"

This works fine...
At present i am loading x amount of news into flash at any one time. I am placing the news story underneath each other using

ActionScript Code:
holder.attachMovie ("newsMc", "news" + i, i);
holder['news' + i]._y = nextY;
nextY += Math.ceil (holder['news' + i]._height) + 2;

this is fine...
But when i use

ActionScript Code:
textField.autosize="left"

nextY retains it's orginal height even though some of the news stories have made for higher textfields.

I thought i could pull the height from the previuosly created news holder

ActionScript Code:
if (i > 0) {
j = i - 1;
trace (j + " text height=" + holder['news' + j].newsStory._height);
if (holder['news' + j].newsStory._height > 184) {
nextY += Math.ceil (holder['news' + j]._height) + 2;
} else {
nextY += Math.ceil (holder['news' + j]._height) + 2;
trace ("nextY=" + nextY);
}

But this still returns the intial height

Here is the complete code

ActionScript Code:
for (i = 0; i < this.newsCount; i++) {
    holder.attachMovie ("newsMc", "news" + i, i);
    holder['news' + i]._y = nextY;
    holder['news' + i].newsTitle.text = this['news' + i + 'newsTitle'];
    holder['news' + i].newsDate.text = "Submitted: " + this['news' + i + 'newsDate'];
    holder['news' + i].newsStory.htmlText = this['news' + i + 'newsStory'];
    nextY += Math.ceil (holder['news' + i]._height) + 2;
    if (i > 0) {
        j = i - 1;
        trace (j + " text height=" + holder['news' + j].newsStory._height);
        if (holder['news' + j].newsStory._height > 184) {
            nextY += Math.ceil (holder['news' + j]._height) + 2;
        } else {
            nextY += Math.ceil (holder['news' + j]._height) + 2;
            trace ("nextY=" + nextY);
        }
    }
    unloadMovie (dtLoader);
    viser._visible = 0;
}

Loading Swf's From Url In Dynamic Textfield
Is it possible to load a .swf from a link inside dynamic textfield. I want it to load into another level.

Regards

Loading 2 Xml (feed Rss) Into 2 TextField
Hi sorry for my bad english !
I have two xml file (structure is like feed rss)

I wrote a script that:
read first XML
create a html string
save the string into an TextField


I have copy another script to read the second XML file but It does NOT works !
Can You see the example !
THANK YOU


http://www.clacsrl.it/caricadati.zip
http://www.clacsrl.it/caricadati.swf

Alberto

Loading Images Into TextField Using XML
Hello there,

I'm loading images from an XML document into a TextField on my stage and a strange thing is happening. The images are not given enough space in the textfield to see them. I'm using the UIScrollBar component, and the most of the image I can see is about one line's worth, and my scrollbar is all the way at the bottom. It's as if flash is treating the IMG tag as just one line of code, and ignoring the height so that the image is cut off.

I can workaround it by putting text under the images, then I can scroll further down and see more of the images, but I don't see a rhyme or reason to it. I've attached my code from my CSSFormatting class. I'm also finding that the ignoreWhite = true isn't working... perhaps there's something I'm missing?

Please take a look:


ActionScript Code:
package {
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.text.StyleSheet;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.text.AntiAliasType;
    import fl.controls.UIScrollBar;

    public class CSSFormatting extends Sprite {
        var loader:URLLoader;
        var textContent:TextField;
        var xmlData:XML = new XML();
        var mySb:UIScrollBar = new UIScrollBar();

        public function CSSFormatting():void {
            xmlData.ignoreWhite = true;  //Doesn't work!
            var xmlLoader:URLLoader = new URLLoader();
            xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
            xmlLoader.load(new URLRequest("content.xml"));
            textContent = new TextField();
            textContent.width = 420;
            textContent.height = 220;
            textContent.wordWrap = true;

            textContent.x = 285;
            textContent.y = 200;

            //textContent.align = "justify";
            addChild(textContent);
            textContent.visible = false;
           
            mySb.direction = "vertical";
            mySb.setSize(textContent.width, 180);
            mySb.move(textContent.width + textContent.x +10, 230);
            addChild(mySb);
            mySb.visible = false;

            var req:URLRequest = new URLRequest("ayurveda.css");

            loader = new URLLoader();
            loader.addEventListener(Event.COMPLETE, onCSSFileLoaded);
            loader.load(req);
        }
        public function onCSSFileLoaded(event:Event):void {
            var sheet:StyleSheet = new StyleSheet();
            sheet.parseCSS(loader.data);
            textContent.styleSheet = sheet;
            textContent.antiAliasType = AntiAliasType.ADVANCED;
        }
        public function LoadXML(e:Event):void {
            xmlData = new XML(e.target.data);

        }

        public function parseContent(pageName):void {
            textContent.htmlText = "<body>" + xmlData[pageName] + "</body>";
            mySb.scrollTarget = textContent;

        }
        public function viewScroll():void {
            mySb.visible = true;
            mySb.scrollPosition = 0;
        }
        public function hideScroll():void {
            mySb.visible = false;
        }
    }
}

and my XML:


Code:
<?xml version="1.0" encoding="utf-8"?>
<content>
<linkHomeNews>...</linkHomeNews>
<linkHomeTour>...</linkHomeTour>
<linkMusic>...</linkMusic>
<linkStore>...</linkStore>

<linkPress>
Ayurveda, literally translated as "the knowledge of life," plays music to inspire a flowering consciousness within its audience; reminding them of a simpler, more connected way of life.

<img src="../images/press_newspaper.jpg" height="215"></img>
<img src="http://farm3.static.flickr.com/2348/2349184718_ae802b2473_m.jpg" height="240"></img>
THIS TEXT IS JUST HERE TO MAKE IT POSSIBLE TO SCROLL FURTHER DOWN AND SEE THE IMGs ABOVE.
</linkPress>
<linkContact>...</linkContact>
</content>

Loading Xml Content Into Textfield
I'm loading some content from an .xml file and it's all fine,- a for loop goes through the content and I trace out 3 entries in the XML. However I want to display the results in a dynamic textfield, but I can't get the 3 entries to list, I can only access one specific entry by using the square operator like imageName[2].

My code:

ActionScript Code:
var myXML:XML = new XML();

myXML.ignoreWhite = true;

myXML.load("text.xml");

myXML.onLoad = function(success) {
if (success) {
var myImage = myXML.firstChild.childNodes;
for (i=0; i<myImage.length; i++) {
var imageNumber = i+1;
var imageName = myImage[i].attributes.name;
var imageURL = myImage[i].firstChild.nodeValue;

// Traces out entries
trace ("My image number "+imageNumber+" is titled "+imageName+" and its URL is "+imageURL+".")

//TRYING TO LIST ALL imageName ENTRIES IN THE DYNAMIC TEXTFIELD "txt_mc"
txt_mc.htmlText = imageName[i];
        }
    }
};
XML:

ActionScript Code:
<gallery>
<image name="school">image1.jpg</image>
<image name="garden">image2.jpg</image>
<image name="shop">image3.jpg</image>
</gallery>

Loading Xml In Dynamic Textfield
Im struggling to load the text of this image in the textfield I placed on the stage with an instance name of "Sample". If I load it into as3 Textfield
eg var field: Textfield = new TextField; it works, but if I try to load it into a dynamic textfield on the stage it doesn't work. Why?

here is my code and xml




ActionScript Code:
var loaders:Array = [];


var imageLoader:Loader;
var xml:XML;
var xmlList:XMLList;
//var hover = xmlList.hover;
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.load(new URLRequest("images5.xml"));
                                           
xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
 function xmlLoaded(event:Event):void
 {
    xml = XML(event.target.data);
    xmlList = xml.children();
   
    for(var i:int = 0; i<xmlList.length();i ++){
        imageLoader = new Loader();
       
        imageLoader.load(new URLRequest(xmlList[i].@src));

        imageLoader.y = 25;
        imageLoader.x = 25 + (i * 205)/2;
        imageLoader.scaleX = imageLoader.scaleY =.5
        addChild(imageLoader);
        loaders.push(imageLoader);
       
        imageLoader.addEventListener(MouseEvent.MOUSE_OVER, onOver);
        //imageLoader.addEventListener(MouseEvent.CLICK, onClick);
       
    }
   
 }
 
 function onOver(event:MouseEvent):void{
   

     Sample.text = xmlList.hover[loaders.indexOf(event.target)];
   
   
        }


ActionScript Code:
<images>

    <image src="images/Sunset.jpg">
    <hover>
            <![CDATA[Hovering over <b>Toungue</b> smiley]]>
        </hover>
        <click>
            <![CDATA[<b>Toungue</b> smiley selected]]>
        </click>
    </image>
     <image src="images/Winter.jpg">
     <hover>
            <![CDATA[Hovering over <b>Toungue</b> smiley]]>
        </hover>
        <click>
            <![CDATA[<b>Toungue</b> smiley selected]]>
        </click>
     </image>
    <image src="images/Waterlilies.jpg">
    <hover>
            <![CDATA[Hovering over <b>Toungue</b> smiley]]>
        </hover>
        <click>
            <![CDATA[<b>Toungue</b> smiley selected]]>
        </click></image>
       
    <image src="images/forest.jpg"><hover>
            <![CDATA[Hovering over <b>Toungue</b> smiley]]>
        </hover>
        <click>
            <![CDATA[<b>Toungue</b> smiley selected]]>
        </click></image>
    <image src="images/Tree.jpg">
    <hover>
            <![CDATA[Hovering over <b>Toungue</b> smiley]]>
        </hover>
        <click>
            <![CDATA[<b>Toungue</b> smiley selected]]>
        </click>
    </image>
</images>

Please advise on how to load xml into dynamic textfield on my stage.

Loading 2 Xml (feed Rss) Into 2 TextField
Hi sorry for my bad english !
I have two xml file (structure is like feed rss)

I wrote a script that:
read first XML
create a html string
save the string into an TextField


I have copy another script to read the second XML file but It does NOT works !
Can You see the example !
THANK YOU


http://www.clacsrl.it/caricadati.zip
http://www.clacsrl.it/caricadati.swf

Alberto

Loading 2 Xml (feed Rss) Into 2 TextField
Hi sorry for my bad english !
I have two xml file (structure is like feed rss)

I wrote a script that:
read first XML
create a html string
save the string into an TextField


I have copy another script to read the second XML file but It does NOT works !
Can You see the example !
THANK YOU


http://www.clacsrl.it/caricadati.zip
http://www.clacsrl.it/caricadati.swf

Alberto

Loading Images Into Textfield
I was pretty sure that loading images into an html textfield inside the movie is not possible. However I saw a few weeks ago a post made by someone , can´t remember who, that was using an XML doc and a way of parsing made by himself that allowed him to create formatted text and with images too (maybe the images name was taken from the xml tree and then loaded into a dinamically created mc).

Anyway can somebody tell me if it´s posible to load an image inside a textfield?

Dynamic Textfield Loading Movie
Hi

Suppose i had a .txt file which I load in first frame.

This has a list of keywords which define a certain .swf to be called by loadmovie... ok?

Suppose I wanted to loadmovie by whatever has been typed by the user? My textfield is called "search".

Let us for sake of argument say the user will always input a keyword that has been refered by the .txt. This makes a test version of a dynamic image gallery which would be very useful for e-commerce.

Ok I know its very unlikely to be able to guess the keywords input by the user , but, first things first.

Has anyone a script which would do this?

When it works I'll post the script for others

Cheers

Planethouse

Loading Into Dynamic Textfield Fails
i never succeed loading dynamic .txt text into a dynamic textfield.
only the basic works which is:

putting in frame 1 timeline:
loadVariablesNum("counttest.txt", 0);

variable name for dynamic text field:counterdisp

in counttest.txt file first line:
&counterdisp= here the text

but when do you use the "&' amersand sign since it's not required in this example.

What other elements should i be aware at for creating dynamic text fields:
- what in case of dynamic text in a MC
- putting "loadVariablesNum" in another frame than the textField?

question 2:
What should happen with this AS:
[php]
counter = new XML();
counter.onData = function(data) {
data = data.split("
").join("
");
counterdisp = data;
};
counter.load("count.txt");

[php]
from the tutorial:
http://www.flashkit.com/tutorials/Tips_And_Techniques/Loading_-Justin_D-953/index.php

Because it looks like i failed, i get an empty dynamic textfield:
http://www.fzvastgoed.nl/pcxpert/test2/test/test4.html
and after like 3 secs is displayed: undefined
(the loaded .txt file is totally empty)

when i put in the .txt file
&counterdisp=flashkit test

i get in the dynamic text field
&counterdisp=flashkit test
seen at:
http://www.fzvastgoed.nl/pcxpert/test2/test4.html

'why do i get &counterdisp=flashkit test, instead of flashkit test (without the &counterdisp)

Dyn Loading Css/html Into Textfield In Class?
Hi!

I would like to make class that creates TextField and loads html and css
into it.
There is a code example in manual that works when put into timeline.
however when put into class the onLoad or onData callback events do not
see the class. Can anyone explain where the values are loaded?
and more importantly how to assign loaded values into class?


TIA

class Dt extends MovieClip{

var news_txt:TextField;
var txt_url:String = "myText.html";
var css_url:String = "html_styles.css";
var myVars_lv:LoadVars;
var styles:TextField.StyleSheet;

function Dt() {
news_txt = this.createTextField("news_txt", 99, 0, 0, 450, 300);
}

public function setCSS(url:String) {
styles = new TextField.StyleSheet;
styles.onLoad = function(success:Boolean):Void {
if (success) {
news_txt.styleSheet = this; //news_txt is not found
} else {
trace("Unable to load CSS file.");
}
};
styles.load(url);
}


public function setHTML(url:String) {
myVars_lv = new LoadVars();
myVars_lv.onData = function(src:String):Void {
if (src != undefined) {
news_txt.htmlText = this.src;
} else {
trace("Unable to load HTML file");
}
};
myVars_lv.load(url);
}

}

How To Know When Image Finished Loading Using Img Tag In Textfield
Hi all,

playing around with img tags inside textfields I was wondering how it would be possible to get to know about the loading process of these images. How many bytes have been loaded, does it already finished loading etc.

Is there any know solution to add a listener to the textfield or something?

thanks in advance,
best
deviation

Loading A Variable From An External .txt To A Textfield
How do i load a variable from an external .txt to a textfield?


( i know this is somewhere in the forums but i cant find it, i have been looking... truly =))

Textfield, CSS Stylesheet External Loading
Hi Everyone,

I got this tutorial from the Macromedia FLASH 8 Advanced book at a local library. It has helped me through some stuff. The example of loading external CSS stylesheet into a textfield works lovely, but they don't have an example of loading an external css and external text file into a dynamic text field. I have read numerous tutorials from macromedia's site and a quite a few others from users posting in forums. I seem to still not understand it.

With this actionscript code to load an external css stylesheet. How can I make it so it also loads the external text file dpmoreinfo.txt into the dynamic text field that I render as HTML?

Please incorporate the following ActionScript. Keep in mind to use the dpmoreinfo.txt file in this code.

import TextField.StyleSheet;
var myStyle:StyleSheet = new StyleSheet();
myStyle.load("mystyles.css");
myStyle.onLoad = function(success:Boolean) {
newsLetterTop_txt.styleSheet = myStyle;
newsLetterTop_txt.html = true;
newsLetterTop_txt.text = "<heading>I would like to display my external text file here! How would I do that?</heading>";
};


Thanks for your support!

Flash_Boi

Loading Img From Xml, Textfield.height, Scrollbar
Hi,
I am loading xml and using Colin Moock's scrollbar as he desrcibes it in Essential Actionscript 3.0. It all worked fine until I tried to put a link to a jpg inside the xml.
Where other html tags give no problem, the img seems to mess with the textfield height. I gave the textfield a fixed height but when I try to scroll the field with the image, and trace the textfield height, it increases more and more when I scroll down, messing up the scrollbar.
the img tag looks like this (and it loads fine into the textfield):

Code:
<IMG ALIGN= "left" SRC='pics/portret.jpg' WIDTH="200" HEIGHT="207" HSPACE='0' VSPACE='10' />
The slightly adapted scrollbar class looks like this (I gave the scrolltrack a fixed height and tried to give t.height a fixed height too within this class but tracing t.height keeps showing that it is increasing while scrolling down):

Code:
package {
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;

public class ScrollBar extends Sprite {
private var t:TextField;
private var tHeight:Number;
private var scrollTrack:ScrollTrack;
private var scrollThumb:ScrollThumb;
private var dragging:Boolean = false;
// A flag indicating whether the scrollbar should be redrawn at the next
// scheduled screen update
private var changed:Boolean = false;
private static const SPACING: uint=3;
private var scrollThumbMaxY:Number;
private var scrollThumbY:Number;
private static const SCROLLTRACK_HEIGHT=395;

public function ScrollBar (textfield:TextField,page:uint) {
t = textfield;
tHeight = t.height;

scrollTrack = new ScrollTrack();
addChild(scrollTrack);

scrollThumb = new ScrollThumb();
addChild(scrollThumb);
scrollThumb.buttonMode=true;

t.addEventListener(Event.SCROLL, scrollListener);
scrollThumb.addEventListener(MouseEvent.MOUSE_DOWN,mouseDownListener);

var stageDetector:StageDetector = new StageDetector(this);
stageDetector.addEventListener(StageDetector.ADDED_TO_STAGE,
addedToStageListener);
stageDetector.addEventListener(StageDetector.REMOVED_FROM_STAGE,
removedFromStageListener);

addEventListener(Event.ENTER_FRAME, enterFrameListener);
changed = true;
}

private function addedToStageListener (e:Event):void {
stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpListener);
stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveListener);
}
private function removedFromStageListener (e:Event):void {
stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUpListener);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveListener);
}
private function enterFrameListener (e:Event):void {
if (t.height != tHeight) {
changed = true;
tHeight = t.height;
if (dragging) {
scrollThumb.stopDrag();
dragging = false;
}
}
if (changed) {
updateScrollbar();
changed = false;
}
}
private function scrollListener (e:Event):void {
if (t.scrollV > t.maxScrollV) {
return;
}
if (!dragging) {
changed = true;
}
}
public function updateScrollbar ():void {
scrollTrack.x = t.x + t.width+SPACING;
scrollTrack.y = t.y;
scrollTrack.height =395;
var numVisibleLines:int = t.bottomScrollV - (t.scrollV-1);
if (numVisibleLines < t.numLines) {
scrollThumb.visible = true;
scrollTrack.visible = true;

scrollThumb.x = t.x + t.width+SPACING-0.6;
scrollThumb.y = t.y + (scrollTrack.height-scrollThumb.height)
* ((t.scrollV-1)/(t.maxScrollV-1));
} else {

scrollThumb.visible = false;
scrollTrack.visible = false;
}

}

public function synchTextToScrollThumb ():void {
scrollThumbMaxY = t.height-scrollThumb.height -15;
scrollThumbY = scrollThumb.y-t.y;
t.scrollV = Math.round(t.maxScrollV
* (scrollThumbY/scrollThumbMaxY));
trace(tHeight);
}
private function mouseDownListener (e:MouseEvent):void {
var bounds:Rectangle = new Rectangle(t.x + t.width+SPACING-0.6,
t.y,
0,
t.height-scrollThumb.height-15);
scrollThumb.startDrag(false, bounds);
//MainMenu.MainMenuRoot._symbolHolder.updatePosition();

dragging = true;
}
private function mouseUpListener (e:MouseEvent):void {
if (dragging) {
synchTextToScrollThumb();
scrollThumb.stopDrag();
//MainMenu.MainMenuRoot._symbolHolder.pauseTweener();
dragging = false;
}
}
private function mouseMoveListener (e:MouseEvent):void {
if (dragging) {
synchTextToScrollThumb();

}
}
}
}
So I think that the code or flash doesn't handle the img very well, but i could be on the wrong (scroll)track. Getting pretty desperate here :confused: , so any iseas are very welcome!
Thanks,
Jerryj.

Copyright © 2005-08 www.BigResource.com, All rights reserved