Textbox Width
Hey...I am making a mp3player with a scrolling titlebar, but I have run into a problem... I need to know how long a textbox is. The width of the textbox should be set by how many letters there are in the title...
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 01-08-2006, 07:34 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How Can I Change The Width Of Textbox.
I Have a dynamic textbox in my movie. Can I change the width of the textbox depending on the size of text that will come in that textbox.
Please let me know ASAP as this is very critical for me.
thanx
Rits
Width Of A Dynamic Textbox?
Hello...
I have a dynamic text box in flash ( not created with AS, just drawed it with the text tool ) and I want to know if there is any way to measure the width of the text inside the textbox after I am asigning a value to the textbox?
Tnx a bunch!
Ovidiu
Set The Width Of A Input Textbox
Hi all,
I am trying to create a form for user to input their information. But I have difficulty in setting the width of the input textbox. If I set the width inside the property window, it make the text input become strange.
Hope someone can help me, Thz.
Width Of Dynamicaly Created Textbox
OK, I'm making a dynamicaly created menu for navigation. I have links comming in from a PHP script. They are loaded into a matrix or whatever and are placed on the scene. What I really need to do is distribute them over some space, but I have to know their width first. Because I call the createTextField method with width and height parameters I can only retreive them, but not the real width of my textbox. I even tryed creating them in the movieclip and retreiving a width of a movie clip but nothing. Take a look at a code:
Quote:
stop();
var menu = ["home", "profil", "users", "reservations", "catering"];
menuFormat = new TextFormat();
menuFormat.color = 0x000000;
menuFormat.font = "Arial CE";
menuFormat.size = 20;
for (i=0; i<menu.length; i++) {
duplicateMovieClip(_root.InsText, "MCmenu"+i, i);
}
//
for (i=0; i<menu.length; i++) {
_root["MCmenu"+i].createTextField("txt", 1, 100*i, 10,100,100);
_root["MCmenu"+i].txt.type = "static";
_root["MCmenu"+i].txt.selectable = false;
_root["MCmenu"+i].txt.text = menu[i];
_root["MCmenu"+i].txt.setTextFormat(menuFormat);
}
trace(_root.MCmenu1._width); // this line returns 100 and I want it to return the real width of my textbox.
If anyone know how to do this, please help.
Many thanks in advance.
Soniac
Quote:
Something sucks with this forum , for statements partialy erased so please ignore them, they are OK.
Dynamic Textbox Width - Positioning Movie Clip
Hi,
I have a dynamic text box which will display text of varying lengths. To the right of this I have a movie clip. I want to be able to set the x position of the movie clip as the x position where the text ends.
I assumed this would be easy:
_root.mc._x = _root.textBox._x + _root.textBox._width
The movie does move when I use this code but it doesn't move to the end of the text it positions itself within the bounds of the text box.
It looks like it is something to do with the textBox._width property but I am not sure what. Can anyone point me towards how to get the x position of the end of a text box? and also what exactly the textBox._width does.
Many Thanks
How Do U Make A Dynamic Textbox With A Variable Textbox
well im really noob at this like i got flash mx 2004 professional a couple of days ago and well u know im still not getting how to use actionscript i sorta understand most of the drawing i know how to use motion tween real well lol anyways if someone could help me it would be great.
Listbox Width = Longest Text Width How? Please Urgent.
hi there
i want to make the listbox as wide as the longest textentry, but i only have
_lb.setWidth()
and
_lb.setSize()
and those two are for pixel size???
does someone of you know how to do that
thx a lot
cheers marcel
Set Width Of A ComboBox Component Without Changing Width Of Arrow
Hi,
With actionscript I have put a few ComboBoxes on the stage and than tryed to change the width with:
setProperty(_root.container[ComboBoxName],_width,150);
It works, However the arrow-part in the combobox expands also. I don't want it to expand.
I want it to behave like when a put a combobox on the stage myself and adjust the width of it in the properties window.
In this case only the text-part expands... the size of the arrow doesn't change!
How can I do this?
Internal Clip Width Bigger Than Movie Width?
i have a movie that is 750 pixels wide. i have a movieclip inside this main movie called "menuBack" that is just a bit less wide than the main movie. this movieclip has several other clips inside of it. i set a variable on a keyframe in my main movie getting the width property of "menuback". of course i expected it to be just a bit less wide than my main movie, maybe 720 pixels wide. when i test the movie and then check debug/list variables, it say it is 1095 pixels wide...how is this possible?
flash 5 btw...
1000px Width Flash In 500px Width Div Problem
Hi
I've got one problem here...
I have 00px width flash, which goes in to 500px width div.
everything is ok. just flash is left aligned... i can't make it to laign to center.
div style overflow is hidden. so no scrollbars. just flash has to go center aligned... not left aligned, as it is now...
align="center" does not help...
thanks in advance
Dynamic Background Width/static Foreground Width?
I am trying to make a site with elements that resize dynamically depending on the browser width, but have the foreground element stay the same size all the time?
The first part is easy to do. If I set the height and width of the Flash file in the HTML to 100%, when the browser is resized, the Flash will also resize.
But I can't figure out the second part.
An example of what I'm trying to do is at Rilo Kiley's website
Another example is gskinner.com
No matter what your browser size, the background scales and the foreground is always the same width and height.
I am using Flash MX 2004.
Loaded Image.width Be Stage.width On Resize
Hello... I am trying to make a loaded image.width be the stage.width on resize... the same for the height... I'm tweening them also... and that seems to be working... well on the yx... not so much on the width.... If I use Stage.width directly in the tween it seems to not load the image... little lost here... thank you for any help...
jeremyBass
here is what I have which is the whole file
ActionScript Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
// ***Stage aligned top left
Stage.align = "TL";
// *** Stop the stage from scaling with the browser window.
Stage.scaleMode = "noScale";
Stage.showMenu = false;
stop ();
image_mc1.loadMovie("http://hellscanyonsportfishing.com/images/testhead.png");
image_mc2.loadMovie("http://hellscanyonsportfishing.com/Scripts/flash/bk.jpg");
image_mc1._quality = "BEST";
image_mc2._quality = "BEST";
// initiate postitions and scaling values for objects
v = Math.random() * 6 - 3;
v = Math.random() * 6 - 3;
var curStageheight = Stage.height;
var curStagewidth = Stage.width;
imageHolder._height = curStageheight;
imageHolder._width = curStagewidth;
//var xScaleT:Tween = new Tween(image_mc1, "_rotation", Elastic.easeOut, 0, 10, 4, true);
var xScaleT0:Tween = new Tween(image_mc1, "_x", Bounce.easeOut, 0, -2*v, 3, true);
var xScaleT1:Tween = new Tween(image_mc1, "_y", Bounce.easeOut, 0, -6*v, 4, true);
var xScaleT4:Tween = new Tween(image_mc2, "_width", Bounce.easeOut, imageHolder._width*1.1, imageHolder._width*1.15, 3, true);
var xScaleT5:Tween = new Tween(image_mc2, "_height", Bounce.easeOut, imageHolder._height*1.1, imageHolder._height*1.15, 3, true);
var xScaleT2:Tween = new Tween(image_mc2, "_x", Bounce.easeOut, 0, 0-2*v, 2, true);
var xScaleT3:Tween = new Tween(image_mc2, "_y", Bounce.easeOut, 0, 0-8*v, 2, true);
xScaleT0.onMotionFinished = function() {
this.yoyo();
};
xScaleT1.onMotionFinished = function() {
this.yoyo();
};
xScaleT2.onMotionFinished = function() {
this.yoyo();
};
xScaleT3.onMotionFinished = function() {
this.yoyo();
};
xScaleT4.onMotionFinished = function() {
this.yoyo();
};
xScaleT5.onMotionFinished = function() {
this.yoyo();
};
image_mc1._y = 0;
image_mc1._x = 0;
image_mc2._y = 0;
image_mc2._x = 0;
//create a listner that checks to see if the browser window is resized
sizeListener = new Object();
sizeListener.onResize = function() {
// change movieclip properties when the window is resized.
var curStageheight = Stage.height;
var curStagewidth = Stage.width;
imageHolder._height = curStageheight;
imageHolder._width = curStagewidth;
//create a random velocity for x and y direction
};
Stage.addListener(sizeListener);
Adjusting Text Tool's Width To Screen's Width
Hi all,
I'd like to know howshould I do to adjust text tool's width to screen's width automatically?
Because I want to insert my flash into a Visual Basic screen saver.
Regards,
Phil
Urgent Help Horizontal Xml Menu Width Needs To Be Text Width
Please could someone help me with the following. I have been through this tutorial http://www.kirupa.com/developer/act...opdown_menu.htm of the xml drop down menu. Made some adjustments with help from other posts to make it horizontal.
but the width of the buttons (menu items) need to be created/adjusted according to the text. and not according the movie it created.
Could someone help me solve this problem? I just can't get it done.
the as:
// generates a list of menu items (effectively one menu)
// given the inputted parameters. This makes the main menu
// as well as any of the submenus
GenerateMenu = function(container, name, x, y, depth, node_xml, direction) {
// variable declarations
var curr_node;
var curr_item;
var curr_menu = container.createEmptyMovieClip(name, depth);
// for all items or XML nodes (items and menus)
// within this node_xml passed for this menu
for (var i=0; i<node_xml.childNodes.length; i++) {
// movieclip for each menu item
curr_item = curr_menu.attachMovie("menuitem","item"+i+"_mc", i);
curr_item._width = childNodes.length;
if (direction == "horizontal") {
curr_item._x = x + i*curr_item._width;
curr_item._y = y;
}
if (direction == "vertical") {
curr_item._x = x;
curr_item._y = y + i*curr_item._height;
}
curr_item.trackAsMenu = true;
// item properties assigned from XML
curr_node = node_xml.childNodes[i];
curr_item.action = curr_node.attributes.action;
curr_item.variables = curr_node.attributes.variables;
curr_item.name.text = curr_node.attributes.name;
// item submenu behavior for rollover event
if (node_xml.childNodes[i].nodeName == "menu"){
// open a submenu
curr_item.node_xml = curr_node;
curr_item.onRollOver = curr_item.onDragOver = function(){
var x = this._x + this._width - 186.3;
var y = this._y + 26;
GenerateMenu(curr_menu, "submenu_mc", x, y, 1000, this.node_xml, "vertical");
// show a hover color
this.name.textColor = (0xFFFFFF);
var col = new Color(this.background);
col.setRGB(0x008185);
};
}else{ // nodeName == "item"
curr_item.arrow._visible = false;
// close existing submenu
curr_item.onRollOver = curr_item.onDragOver = function(){
curr_menu.submenu_mc.removeMovieClip();
// show a hover color
this.name.textColor = (0xCCCCCC);
var col = new Color(this.background);
col.setRGB(0x008185);
};
}
curr_item.onRollOut = curr_item.onDragOut = function(){
// restore color
this.name.textColor = (0x004445);
var col = new Color(this.background);
col.setTransform({ra:100,rb:0,ga:100,gb:0,ba:100,b b:0});
};
// any item, menu opening or not can have actions
curr_item.onRelease = function(){
Actions[this.action](this.variables);
CloseSubmenus();
};
} // end for loop
};
// create the main menu, this will be constantly visible
CreateMainMenu = function(x, y, depth, menu_xml){
// generate a menu list
GenerateMenu(this, "mainmenu_mc", x, y, depth, menu_xml.firstChild, "horizontal");
// close only submenus if visible durring a mouseup
// this main menu (mainmenu_mc) will remain
mainMenu_mc.onMouseUp = function(){
if (mainmenu_mc.submenu_mc && !mainmenu_mc.hitTest(_root._xmouse, _root._ymouse, true)){
CloseSubmenus();
}
};
};
// closes all submenus by removing the submenu_mc
// in the main menu (if it exists)
CloseSubmenus = function(){
mainmenu_mc.submenu_mc.removeMovieClip();
};
// This actions object handles methods for actions
// defined by the XML called when a menu item is pressed
Actions = Object();
Actions.loadSWF = function(targetMovie) {
if (section != targetMovie) {
section = targetMovie;
_root.transition.gotoAndPlay("closing");
};
}
Actions.newMenu = function(menuxml){
menu_xml.load(menuxml);
};
// load XML, when done, run CreateMainMenu to interpret it
menu_xml = new XML();
menu_xml.ignoreWhite = true;
menu_xml.onLoad = function(ok){
// create main menu after successful loading of XML
if (ok){
CreateMainMenu(1, 110, 0, this);
}else{
message_txt.text = "Error Loading XML";
}
};
// load first XML menu
menu_xml.load("menu2.xml");
// preload function and transition
this.createEmptyMovieClip("temp", 1000);
function preload() {
this.transition.txtPercentage = "";
temp.onEnterFrame = function() {
var t = this._parent.content.getBytesTotal(), l = this._parent.content.getBytesLoaded();
if (t) {
var percent = Math.round(l*100/t);
if (l == t) {
this._parent.transition.gotoAndPlay("opening");
this._parent.transition.txtPercentage = "Done Loading";
delete this.onEnterFrame;
} else {
this._parent.transition.txtPercentage = percent+" %";
}
} else {
this._parent.transition.txtPercentage = "";
}
};
}
the xml:
<?xml version="1.0"?>
<menu name="example">
<item name="MISSIE" action="loadSWF" variables="home.swf"/>
<item name="OVER het bedrijf" action="loadSWF" variables="shutter2.swf"/>
<item name="EXPERTISE" action="loadSWF" variables="shutter2.swf"/>
<item name="BENADERING" action="loadSWF" variables="shutter2.swf"/>
<menu name="WERK DAT WERKT">
<item name="Graphic Design" action="loadSWF" variables="graphics.swf"/>
<item name="Flash Design" action="loadSWF" variables="flash.swf"/>
<item name="CSS/HTML/JS" action="loadSWF" variables="css.swf"/>
</menu>
<item name="MENSEN" action="loadSWF" variables="shutter2.swf"/>
<item name="WERKEN BIJ het bedrijf" action="loadSWF" variables="shutter2.swf"/>
<item name="CONTACT" action="loadSWF" variables="shutter2.swf"/>
<menu name="MISSIE">
<item name="Graphic Design" action="loadSWF" variables="graphics.swf"/>
<item name="Flash Design" action="loadSWF" variables="flash.swf"/>
<item name="CSS/HTML/JS" action="loadSWF" variables="css.swf"/>
</menu>
<item name="Careers" action="loadSWF" variables="careers.swf"/>
<menu name="Downloads">
<item name="Application" action="loadSWF" variables="appform.swf"/>
<item name="Other Forms" action="loadSWF" variables="other.swf"/>
</menu>
<item name="Contact" action="loadSWF" variables="contact.swf"/>
</menu>[/quote]
Loaded Image.width Be Stage.width On Resize
Hello... I am trying to make a loaded image.width be the stage.width on resize... the same for the height... I'm tweening them also... and that seems to be working... well on the yx... not so much on the width.... If I use Stage.width directly in the tween it seems to not load the image... little lost here... thank you for any help...
jeremyBass
here is what I have which is the whole file
Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
// ***Stage aligned top left
Stage.align = "TL";
// *** Stop the stage from scaling with the browser window.
Stage.scaleMode = "noScale";
Stage.showMenu = false;
stop ();
image_mc1.loadMovie("http://hellscanyonsportfishing.com/images/testhead.png");
image_mc2.loadMovie("http://hellscanyonsportfishing.com/Scripts/flash/bk.jpg");
image_mc1._quality = "BEST";
image_mc2._quality = "BEST";
// initiate postitions and scaling values for objects
v = Math.random() * 6 - 3;
v = Math.random() * 6 - 3;
var curStageheight = Stage.height;
var curStagewidth = Stage.width;
imageHolder._height = curStageheight;
imageHolder._width = curStagewidth;
//var xScaleT:Tween = new Tween(image_mc1, "_rotation", Elastic.easeOut, 0, 10, 4, true);
var xScaleT0:Tween = new Tween(image_mc1, "_x", Bounce.easeOut, 0, -2*v, 3, true);
var xScaleT1:Tween = new Tween(image_mc1, "_y", Bounce.easeOut, 0, -6*v, 4, true);
var xScaleT4:Tween = new Tween(image_mc2, "_width", Bounce.easeOut, imageHolder._width*1.1, imageHolder._width*1.15, 3, true);
var xScaleT5:Tween = new Tween(image_mc2, "_height", Bounce.easeOut, imageHolder._height*1.1, imageHolder._height*1.15, 3, true);
var xScaleT2:Tween = new Tween(image_mc2, "_x", Bounce.easeOut, 0, 0-2*v, 2, true);
var xScaleT3:Tween = new Tween(image_mc2, "_y", Bounce.easeOut, 0, 0-8*v, 2, true);
xScaleT0.onMotionFinished = function() {
this.yoyo();
};
xScaleT1.onMotionFinished = function() {
this.yoyo();
};
xScaleT2.onMotionFinished = function() {
this.yoyo();
};
xScaleT3.onMotionFinished = function() {
this.yoyo();
};
xScaleT4.onMotionFinished = function() {
this.yoyo();
};
xScaleT5.onMotionFinished = function() {
this.yoyo();
};
image_mc1._y = 0;
image_mc1._x = 0;
image_mc2._y = 0;
image_mc2._x = 0;
//create a listner that checks to see if the browser window is resized
sizeListener = new Object();
sizeListener.onResize = function() {
// change movieclip properties when the window is resized.
var curStageheight = Stage.height;
var curStagewidth = Stage.width;
imageHolder._height = curStageheight;
imageHolder._width = curStagewidth;
//create a random velocity for x and y direction
};
Stage.addListener(sizeListener);
Adjusting Text Tool's Width To Screen's Width
Hi all,
I'd like to know howshould I do to adjust text tool's width to screen's width automatically?
Because I want to insert my flash into a Visual Basic screen saver.
Regards,
Phil
Setting Symbol Width To Winodw Width
If I have an swf that contains two rectangles, how could I set the width of one of them to that of the window while maintaining a preset value for the other?
Changing Width Of Sprite Changes Text Width
G'day everyone
I am currently creating an object called MyTextField (which extends Sprite) and then I set the width of this instance to a value.
The sprite class has several TextFields within it.
The problem i am having is that when I change the width it affects the size of the text as well. Too large and the text looks stretched, too small and the opposite happens.
What I want to know is, is there a way I can set the width of MyTextField without it affecting the size of the text.
This is the code i'm using for my textfields
Code:
var label:TextField = new TextField();
label.autoSize = TextFieldAutoSize.LEFT;
label.multiline = true;
label.background = false;
label.border = false;
label.wordWrap = true;
label.embedFonts = true;
label.type = TextFieldType.DYNAMIC;
label.selectable = false;
label.antiAliasType = AntiAliasType.ADVANCED;
label.defaultTextFormat = this["format_" + label_type];
label.addChild(label);
label.htmlText = info;
and the format is here
Code:
this.format_heading = new TextFormat();
this.format_heading.font = "Verdana";
this.format_heading.color = 0x000000;
this.format_heading.size = 10;
this.format_heading.bold = false;
this.format_body = new TextFormat();
this.format_body.font = "Verdana";
this.format_body.color = 0xff0000;
this.format_body.size = 10;
this.format_body.bold = false;
Any help would be super
Cheers
Lango
TextBox._height Textbox Size?
Maybe someone can help -
How can I change the height of TextBox_size (MC). Is everything controlled by the movie size?
I put the scrollbarDynamic7.fla at http://www.bitweb.com/test for reference
TextBox._height = TextBox_Height;
function springAction () {
scrollpos = -scroll._y;
ratio = (content._height - TextBox_Height) /(TextBox_Height - scroll._height);
NewPos = Number((scrollpos*ratio));
difY = newPos - content._y;
addY = difY / 5;
overshootY = overshootY + addY;
content._y = content._y + overshootY + addY;
}
function easeOut () {
scrollpos = -scroll._y;
ratio = (content._height - TextBox_Height) /(TextBox_Height - scroll._height);
NewPos = Number((scrollpos*ratio));
difY = newPos - content._y;
content._y = content._y + difY / 3;
}
Cheers
Kobus
Movieclip Width The Width Of The Text Within
Hi all:
I have a movieclip called mcButton which contains a dynamic text field. I have an array with several words/pieces of text and a timer object loading instances of the movieclip with the content from the array. The issue is that the width of the movieclip is a fixed width-- is there a way to make the width of the movieclip the same as the width of the text within? The code is as follows (and excuse the beginner-ness...):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var mcCompanyBtn:mcButton = new mcButton();
var mcWorkBtn:mcButton = new mcButton();
var mcReachBtn:mcButton = new mcButton();
var mcLoginBtn:mcButton = new mcButton();
var counter:int;
var buttonArray:Array = new Array(mcCompanyBtn, mcWorkBtn, mcReachBtn, mcLoginBtn);
var textArray:Array = new Array("Company", "Work", "Reach Us", "Client Login");
var urlArray:Array = new Array("about.php", "contact.php", "news.php", "services.php", "work.php", "index.php");
loadBtns();
function loadBtns() {
//Timer class that calls function to add buttons to stage
var loadBtnTimer:Timer = new Timer(500, buttonArray.length); // 1 second
loadBtnTimer.addEventListener(TimerEvent.TIMER, addButtons);
loadBtnTimer.start();
//Timer loop that runs through buttonArray and adds elements to state
function addButtons(event:TimerEvent):void {
counter = event.target.currentCount - 1;
addChild(buttonArray[counter]);
if ( counter == 0 ) {
buttonArray[counter].x = 0;
}
else if (counter > 0) {
buttonArray[counter].x = buttonArray[counter - 1].x + buttonArray[counter].width - 60 ;
}
buttonArray[counter].btnContent.text = textArray[counter];
buttonArray[counter].btnContent.setTextFormat(format1);
}
Thanks for any help!
Preloader.width = Stage.width
Hi everyone,
I'm working on a full flash site, and i'd like to make a loaderbar scaling over the stage.width. So it starts at 0% and when everything is loaded, i want the bar to be as wide as the user's window.
Works fine, but as you can see on my example, it never really touches the right edge of the screen..
http://www.dpbc.be/fullflash
I used this code to place the bar:
Code:
loader._x = 0;
loader._y = Stage.height / 2;
loader._width = 0;
and this is my preloading code:
Code:
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loader._width = getPercent * Stage.width;
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}
(on frame 2 i have a gotoAndPlay(1)).
Thank you VERY much!
d?sh'
Textbox Changes To Input Textbox.
Here my code is working inside a for loop which checks inside the XML files and retireves the content...I am not writing the loop here......because there is lots of code inbetween so you don't get the correct idea.
var textmessage = importXMLtemplate.firstChild.childNodes[j].attributes.message;//message contains the text
var TextBoxName = "TextBox" + j;
template_mc.createTextField(TextBoxName, 10, 100, 100, 165, 30);
template_mc[TextBoxName].styleSheet = myCSS;//stylesheet I called above not writing here.
template_mc[TextBoxName].html = true;
template_mc[TextBoxName].multiline = true;
template_mc[TextBoxName].htmlText = textmessage;
template_mc[TextBoxName].type = "input";
Here the message is showing inside the textbos properly loading form XML. The only problem is that the textbox is not changing to input text box.
I want to change the text box to input text box and change the value inside the text box
please help...
How Can I Get The Mc Width The Higher Width
Hi!
Im doing a poll system in flash... I have 6 movie clip simply called:
mc_bar01
mc_bar02
mc_bar03
mc_bar04
mc_bar05
mc_bar06
(I know I could use For function).but I wanted to keep it simple)...
each of this mc have a different _width
I need a function that found the movieclip that have the higher width value...
any help will be much apreciated!!
thanks a lot
Pat
How Can I Get The Mc Width The Higher Width
Hi!
Im doing a poll system in flash... I have 6 movie clip simply called:
mc_bar01
mc_bar02
mc_bar03
mc_bar04
mc_bar05
mc_bar06
(I know I could use For function).but I wanted to keep it simple)...
each of this mc have a different _width
I need a function that found the movieclip that have the higher width value...
any help will be much apreciated!!
thanks a lot
Pat
Resize Scroller To Stage.width, Need To Get The Stage.width Value
hey all. I'm battling this problem and have finally caved for help. I can't seem to get the mask_mc._width to return the acurate value. at a fixed stage size the scroller seems to work fine, but changing the mask_mc.width to a variable set to Stage.width doesn't. I know the Stage.width property is read only, but does that mean i cant get a value from it. Anything i am missing? suggestions? I suppose this would be similar to resizing a scrollbar to full height. Thanks ahead of time.
mask_mc._width = Stage.width;
stageListener = new Object();
stageListener.onResize = function() {
mask_mc._width = Stage.width;
}
Stage.addListener(stageListener);
var scrollSpeed = 0.2;
var maxScrollOffset = 16;
function setContentTarget(scrollPercent) {
if (scrollPercent<0) scrollPercent=0;
if (scrollPercent>1) scrollPercent=1;
this.targetY = this.mask_mc._x - scrollPercent * ((this.contentMC._width+20)-this.mask_mc._width);this.onEnterFrame = setContentY;
}
function setContentY() {
this.contentMC._x += (this.targetY-this.contentMC._x) * scrollSpeed;
if (Math.abs(this.targetY-this.contentMC._x) < 1){
delete this.onEnterFrame;
}
}
this.onMouseMove = function() {
if (this.mask_mc.hitTest(_root._xmouse, _root._ymouse, false)) setContentTarget((this.mask_mc._xmouse-maxScrollOffset)/(this.mask_mc._width-2*maxScrollOffset));
}
Using .txt In A Textbox
ok im trying to get some text from a .txt file into a dynamic text box. how can this be done?
and im using flash MX
End Of A Textbox
Hello All,
I am having a problem finding a script example to detect if a scrollbar has reached the end of a textbox. If anyone knows or has an example, I would apreciate it if you could post it. Thanks.
Bill Van Pelt
Textbox
I need to be able to display a Microsoft Word doc within a dynamic textbox. I would like to do this without converting the word doc to a txt file. Is this possible.....
Using <img> Tag Into A Textbox
I would like to know if it is possible to use the "<img>" tag when loading html text into a textbox...
The thing is that I'm designning a page where I need load some dynamic text with images according to the text next to it.
Is it possible, or is there another way to do this?
Thanks, Francisco
.jpg In Textbox?
Hello,
Please help! Is it possible to put some .jpg's in a textbox area so the user can scroll them?
Tnx
Add 1 To Textbox
if I have a textbox with a value of 1 and I want to set a command to add 1 to it, so its new value would be 2, what do I do ?
Because if I write text.text += 1; it returns 11
thanks
Textbox
Hello
can you help me. I have a problem?
The problem is I have a textfield with a scrollbar I need the script to refresh te scrollbar every time you click on a different button?
help me?
Textbox ?
Hi,
I have two textbox questions. The first one is. I have a input textbox. I want the textbox to default to zero if it is left blank. How do I do this?
The next question is I have a dynamic text box. The text box displays a calculation like 7.89903872676. I want the text box to only display something like 7.8990. How is the best way to do this? Thank you very much in advance for any help with this problem.
Thanks,
Jon
Textbox's
Hi, im trying to create a order form. in one frame i have 3 input text boxes named houseNo, street, postcode. I want to collect all the data inputted into these in to a dynamic textbox on another frame after clicking a button. Im sure one of u could help me as im very new to flash?cheers
[F8] Textbox
Whenever I test my movies, the text is cut off. Why?
Put A Textbox Above Anything Else
I have some movieclip and one textbox (dynamic text) but my movieclips hide so I can't see the text.
I have put the layer that have the text on top beside timeline but nothing happend.
Is that any way I can put the text above anything else with actionscript??
Textbox
Hey
Im using the following code on a button to take me to a certain scene depending on the number in the dynamic text box
on(release){
if (_global.check.text == 1) {
_level0.gotoAndStop("Pot_Con_Store");
} else if(_global.check.text == 0) {
_level0.gotoAndStop("Con_Store_Quiz");
}
}
The button is in a movieclip, but for some reason it just keep goin to the same scene regardless off the textbox.
Please could someone help im really stuck
Thanks in advance.
Textbox Help
um... how do I make a textbox with many links in it?
Textbox To Textbox
Hello,
I need to pull in a .txt file and parse it using the tutorial for dynamic text with CSS tutorial found here on Kirupa... however, what I need to do is from within textbox1 click on a link and have it load another .txt file (or variable withint the same external .txt file) into textbox2... I've attached a zip with my fla and .txt file!
asfunction, perhpas?
Thank you in advance!
Textbox
hello,
this is the first time i have used form stuff in a flash app.... where can i find a textbox... i looked in the form elements box but there is everything but a textbox...
Textbox Lines
I am creating a text box in my flash and i want to add text in it. I have followd the scroll button tutorial, and i need to add the text in the ation area. Here is the text thing.
onClipEvent (load) {
newstext = "insert text";
scrolling = 0;
frameCounter = 1;
speedFactor = 3;
}
How do i goto the next line in this if I want to have a word a line like this?:
Hello
Yes
No
... But it comes comes out with:
Hello Yes No.
Moving A Textbox With AS
Hello,
my problem:
I want to move a textbox by using the setProperty function!
I`ve made a preloader with a moving percent-bar and the number of current loaded percent shall allways have the same (_x -)position like the edge of the loadbar.
I`ve tried:
setProperty(_root.NAMEofTEXTFIELDvariable, _x, posit_x);
Is somebody out there who can help me?
Thanks.
=hollo=
What Is A Dynamic Textbox And How Can I Use One?
What r these text boxes and how would I use one to make a scoring thing for my game(its horrible dont ask) which is where a target is shot and falls. how would I make it add a point everytime a target was hit?
Thanx ion advance.
Textbox Coordinates
How do you get to the Textbox Coordinates in flash 4 - is their a box that pops up so you can place the text exactly where you want?
Dynamic Textbox
This may sound like a stupid question, but can you change the background in a dynamic textbox? If you can, I can't figure it out.
Space In Textbox
Hi Masters
i am facing a problem with the input textbox.
what i want that if i fill a something in textbox then it should not recieve the spacebar. I mean it should return the value only an it should not return the spaces which user fill before and after the value.
Please help me ia m in gr* trouble.
ritesh
|