Dynamically Resizing A Text Field With Auto Scroll If Beyond Screen Resolution.
Quote:
Originally Posted by Delmundo
Dynamically resizing a text field I have a dynamic textfield that I'm reading data into from a text file. All works fine, except that I need to physically drag the textbox down to create more space for the content.
The content will invariably not be of one length, it'll be changing on a weekly basis, so my question is: is there a way of setting the size of the textfield depending on how much content it contains, so all the content is displayed?
Firstly thank you for the advice and information you posted regarding the above link. I found it really helpful, exactly what I was hunting for. I have done a bit more research trying to see if there were a way for me to have scroll bars appear for my resized text feild if the content were to go beyond the viewable area. This would regard screen resolution I guess?
So if viewers were on a smaller screen size the scroll bars would appear, but no scroll bars for people on large monitors.
The best exmple of it I have seen is here choose PRESS then check out the way Biography resizes.
Hope I am clear.
Thanks for your prior help
ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 06-09-2005, 04:31 AM
View Complete Forum Thread with Replies
Sponsored Links:
Auto-resizing And Screen Resolution
Hello:
I develop my Flash movies to fill the entire browser window, regardless of whether window is maximized or minimized and regardless of screen resolution. If necessary, the movie is letterboxed transparently in the browser window, preserving aspect ratio.
I preview the movies on my 1600x1200 monitor and all the anti-aliased text and graphics look super sharp and clear, even when I resize the window.
When I see these movies on other monitors with lower resolution (1280, 1024), the graphics (and text expecially) look "aliased" and jagged.
I was creating movies at 600x400 and switched to 1500x1000 to allow more interpolation and less extrapolation. This did improve the problem but not get rid of it.
What to do? Maybe this deals with the screen's refresh rate. Maybe it's because the movies are 3:2 and the monitor is 4:3? I used 3:2 to take into account the space taken up by the browser GUI and it seemed to create the least letterboxing.
Thank you.
View Replies !
View Related
Dynamically Resizing A Text Field To Content And Scroll If Beyond ScreenResolutionY
Day 4 researching this and still trying to see if there were a way for me to have scroll bars appear for my auto size text field if the content were to go beyond the viewable area. This would regard screen resolution I guess?
So if viewers were on a smaller screen size the scroll bars would appear, but no scroll bars for people on large monitors. I am aiming for a design that will be effective for most resolutions.
The best exmple of it I have seen is here choose PRESS then check out the way Biography resizes.
Hope I am clear.
I am mindful that I may be biting off more than I can chew but I would really love to add this functionality to my design.
Apprecite any ones ideas
View Replies !
View Related
Dynamically Resizing A Text Field - Doable?
Hey hey,
i'm filling a text field with variables from an external text file, but i dont know how much text there will be. is there a way increase the height of the text field depending on a known number of variables?
eg
textfield._height = 50 * num_of_var;
i'm not sure how to reference the text field since you can't name it. it is inside a movie clip but i don't want to stretch the MC, just the text field inside it.
FK
View Replies !
View Related
Resizing Dynamically Created Text Field
I've only got 360 pixels in width to work with. My dynamically entered text may be longer than that and I want to resize it, in essence "squishing" it to fit the area. I've tried putting the created text field in a movie clip and resizing it to no avail. Here is the code I am using.
headfmt = new TextFormat();
headfmt.color = 0xFFFFFF;
headfmt.font = "Arial Black";
headfmt.bold = true;
headfmt.size = 14;
headline.createTextField("headtext", 10, 0, 0, 30, 24);
headline.headtext.type = "dynamic";
headline.headtext.autoSize = "left";
headline.headtext.text = "HEADLINE ONE GOES HERE WITH EIGHT TO TEN WORDS IN IT";
headline.headtext.setTextFormat(headfmt);
"HEADLINE ONE GOES HERE WITH EIGHT TO TEN WORDS IN IT" is much longer than 360 pixels (approx. 540 px). How can I squish it down to fit the 360 px. area at runtime? Is there a way to convert text to shapes at runtime?
View Replies !
View Related
Dynamically Resizing Text In A Fixed Width Field
Hello!
I'm creating a series of fixed width text fields which will have text brought into them from a feed, using createTextField();.
I'd like to be able to dynamically resize the text so that it fills the entire width of the text field automatically.
Is there a way of doing this without parsing the string and working out the equivalent font size for the number of characters? Or does anyone know of a method, class or component that could deal with this?
View Replies !
View Related
Auto Size Screen Resolution?
Guys, I'm just wondering how do you do know Auto Size Screen Resolution?
like this website here http://www.suzanneneville.com/flash.html
You try to resize your browser and you will get what I mean..
Anyone please help out??
Thanks
View Replies !
View Related
Resizing The Screen Resolution
Hi folks @ flashkit.
Does anybody here have a small exe or whatever code that we can call it using fscommand to change the user screen resolution?
Here it's not for web ,just for playing back from CD,...
For those who think this is useless I should remind of how FLash gets slow when it has to for example resize a 640*480 movie (mpg,..) in a 2048*1536 screen resolution.
Best regards
Sepehr
CGTAL active media
View Replies !
View Related
Can Flash Auto-detect Screen Resolution?
Can anyone tell me if Flash is able to auto detect screen resolution from a .EXE file?
I'm creating a stand-alone movie that will launch when a CD is inserted (autorun.ini) and would like Flash (or another script) to automatically detect the screen resolution.
Can anyone help me?
Thank you
View Replies !
View Related
Flash Resizing To Fit Screen Resolution?
I made this site to fit the average screen (1024 x 768), but people with higher resolutions (1280x1024) are complaing it's tiny on their screens.
http://www.sunsetclubcharlotte.com/
Is there anything that can be done to make Flash automatically resize for higher resolution monitors?
Thanks.
View Replies !
View Related
Help With Screen Resolution Detection And SWF Resizing.
I have spent the last eight hours trying to script this out myself but I haven't had any luck. So I thought I would come here as you all have always been so helpful.
I'm trying to script something (possibly using capabilities.screenResolutionX) that will detect the user's screen resolution and resize my SWF to a certain size.
I am trying to use capabilities.screenResolution but I haven't gotten it to work for me. I'm willing to try anything though I just want something that works. It doesn't have to be what I have already tried.
What I am doing....
I love how my SWF looks in 800x600 but when you get higher up in resolutions my SWF gets smaller which I don't like. So I want to be able to size my SWF depending on the user's resolution.
Thanks for any help you can give me.
View Replies !
View Related
Resizing A Flash Movie To Fit Screen Resolution
Ok...I know that I can use fscommand to get a movie to fullscreen in the flash player...but how can i do it in a browser window? From the splash page, the main page opens full screen using javascript, but the flash movie stays at it's set dimensions, even when i change the width and height parameters (to a percentage...can this be done?) in the HTML.
Is there a way to get the movie to resize to always fit the window that is opened, and hence each individual users resolution?
thanks....
friz b
View Replies !
View Related
Resizing .swf To 100% Of Screen While Keeping It's Content At It's Native Resolution
I've posted this question before on the design board because it deals with aesthetics but I think this may be a better forum for it.
I think the issue I'm asking about is how one might resize an .swf to 100% of a viewers screen height and width while keeping the content center screen and at it's native resolution. Below is a link to an example:
Just wondering how this might be achieved???
How do they get the BG image to go 100% of the screen height and width without affecting the resolution (clarity) of the main content section? Maybe I'm incorrect, but isn't the BG image imbedded within a .swf? When reviewing the html container documents source it showes the browser being told to display the "mainswf" at 100%.
My guess then would be that the content portion of the site is a separate swf that is loaded into the "mainswf" (only a guess though).
If this is the case, how is the resizing of the main movie not affecting the content's resolution?
Or...maybe...my assumption is incorrect...and their achieving this in an altogether different manner.
Anyone got an idea?
Thanks!!!!!
View Replies !
View Related
Auto Tab From One Text Field To The Next
I would like to know how to have one text field tab over to the next automaticly.
Example you have 3 input text boxes (a,b, & c).
Once the user clicks in box A and enters his/her (one)character, it automaticaly jumps you over to box B.
And again, after the user clicks their (one)character, it tabs them over to box c.
And I'm using MX.
Thanks for any input you may have.
View Replies !
View Related
Auto Tab Text Field
I am creating a crossword puzzle that has for example 5 single character text boxes in a row that the user can fill out. Right now the user has to either press tab or click in the next text input box to fill in the next letter. Is there a way to make it automatically tab to the next text input field after a single character has been entered into the first box? That way they could just type the word and not have to worry about tabbing and clicking. Thanks in advance.
View Replies !
View Related
Auto Stretch Text In Dynamic Field
Hi.
Does anyone know how I can tell Flash to make all the contents (text) of a dynamic text field stretch to fit the window, as well as shrink them if the window is too small?
I basically want to tell Flash: I have a SWF that is 400 x 200, which contains only one dynamic text field. Now make the text in that field (or the field itself) resize to maximize itself in the 400 x 200 area, no matter how many characters or lines it has.
is this possible? I've seen what appears to be this scenario on the front page headline of http://www.ESPN.com.
Thanks in advance for any suggestions!
View Replies !
View Related
Input Text Field Auto Complete?
Hi, I'm working on a search field for a Flash app and was wondering if anyone's done this before? What I'd like it to do, if it's not clear enough, is to suggest word endings based on the array's contents that's being searched.
Is this a huge undertaking or is it even possible?
View Replies !
View Related
Auto Height On Dynamic Text Field
Hi all
I have a small SWF file which loads text for an associated loaded movie clips. The text length can vary and at the minute I am duplicating the FLA's so that each movie has its 'own' text loader file mc. The reason why I am doing it this way is because I need the scrollbar to appear or not based on the amount of text that is loaded and I am currently disabling/enabling the scrollbar manually and then savin/publishing the SWF's file.
How can I get my text loader file to display/adjust the height of the dynamic text box/scrollbar automatically?
I have posted some code below in the hop ethat it is easy enough for some guru out there to provide a solution.
Attach Code
// This is the code that is executed when the text loader swf is called
function textLoader() {
myData = new LoadVars();
myData.onLoad = function() {
scrollpane_mc.txt.myText_txt.html = true;
scrollpane_mc.txt.myText_txt.htmlText = this.details;;
};
myData.load("text/amec.txt");
}
var myCSS = new TextField.StyleSheet();
myCSS.load("css/myStyle.css");
myCSS.onLoad = function() {
scrollpane_mc.txt.myText_txt.styleSheet = myCSS;
textLoader();
};
// this is my scrolling code
txt.setMask(mask);
scrollbar.onMouseDown = function() {
if (this.hitTest(_root._xmouse, _root._ymouse) && txt._height>mask._height) {
this.startDrag(false, scrollbarBG._x, scrollbarBG._y, scrollbarBG._x, scrollbarBG._height-this._height)
txt.onEnterFrame = scrollThumbs;
dragging = true
}
};
scrollbar.onMouseUp = function() {
stopDrag();
dragging = false;
delete this.onEnterFrame;
};
function scrollThumbs() {
var funkyVar = -this._parent.scrollbar._y*(((this._height-this._parent.scrollbar._height)/(this._parent.scrollbarBG._height-this._parent.scrollbar._height))-1)
this.Y = (funkyVar-this._y)*.2;
this._y += this.Y;
if(Math.abs(funkyVar-this._y)<1 && !dragging){
delete this.onEnterFrame
}
}
View Replies !
View Related
Auto Scroll Text
i have an mp3 player that uses a xml to get songs, but some of the songs have longer names. i need a code that will make the text automatically start scrolling onRollOver of the textbox, and stop when you can see the whole name. onRollOut it goes back to its original position. thanks in advance.
View Replies !
View Related
Resizing Text Field
Interested if anyone knows how to dynamically resize a text field while maintaining the font size. The function would be like resizing a window on yur desktop. the window and text field resize while the text adjusts to fit in the newly sized window not changing the font size. Any help would be great. Thanks.
Or is there a source file around I could download
View Replies !
View Related
Resizing A Text Field?
I've got a movie with a text field.
The text field (multi line) is being updated dynamically, by reading a external text file. If there's alot of text in the external text file, Flash will only display as much text as it can fit into the text field, the rest will be hidden!
How can I force Flash to display all the text?
Thanks.
View Replies !
View Related
Resizing Text Field
I was wondering what command would work to dynamically resize a TextField. I am going to load data into the field, and I want it to keep a constant width, but if it becomes multi-lined, I want it to automatically increase height. Is there a way to do this?
View Replies !
View Related
Auto-resizing Flash File When Resizing Windows, HOW?
Hello everyone,
I have been to one web site tonight at my friend's house and I have forgotten whats the web site address. But this thing amazed me and stupid me doesnt know how to do.
you know whenever you build a web site you usually build for certain resolution right (1024x768 or 800x600 etc.. when i visited this web site, whenever i resize the window (make the window bigger smaller etc) the flash movie will follow the window size (extact fit).
I really want to know how to do that...? Anyone please help?
Help would be fully appreciated.
Ella
View Replies !
View Related
Resizing Dynamic Text Field & Maintaining Text Font Properties
I have created a dynamic text field and have specified the height and width in the property inspector. The font is set at Verdana, 12, multiline. After searching these forums I also clicked the Character button and set it to embed font outlines for all characters.
My problem is that when I try to type or paste text into the field it is stretched to fit the field dimensions. I just want to preserve the Verdana 12.
Any help is greatly appreciated.
View Replies !
View Related
Auto-scroll Dynamic Text
Hi you all!
Learned lots and lots from so many of you (THANKS!)but still need help with this:
I want to auto-scroll a list of about 600 company names. The text in the variable needs to be up-dated quite often.
So - is there a way to either load dynamic text into a mowieclip (really tried to find info on this all over but no success or I'm blind...) 'cause if my text is in a mc I can auto-scroll it...
or - is there another way to make dynamic text auto-scroll?
Would really make my day if you could help me figure this out!
View Replies !
View Related
[MX] Text Scroll (Auto From Right To Left)
I'm trying to do a smooth automatic text scroll from right to left.
Heres the code I made up but it's not as smooth as I'd like it to be:
ActionScript Code:
myTxt_mc.onEnterFrame = function() { this._x -= 3.5; if (this._x <= -3360) { this._x = 341; }}
Anyone know how to make it smoother?
Foo
View Replies !
View Related
[MX] Text Scroll (Auto From Right To Left)
I'm trying to do a smooth automatic text scroll from right to left.
Heres the code I made up but it's not as smooth as I'd like it to be:
ActionScript Code:
myTxt_mc.onEnterFrame = function() { this._x -= 3.5; if (this._x <= -3360) { this._x = 341; }}
Anyone know how to make it smoother?
Foo
View Replies !
View Related
Auto Scroll In Dynamic Text?
Hi! Everyone
How can I create auto scroll like that ?
click here
it's placed in bottom right.
I try to do this but it very inflexible not soft like that movie
my code:
Code:
var nInum:Number = setInterval(display,100)
functon display ():Void{
txtContent.scroll++;
}
it's very ugly.
Please help me!
Thank you so much
Best regards.
View Replies !
View Related
Resizing A Dynamic Text Field?
Hello.
I want to create a dynamic text field that is a specific size, say, 400 x 300. I draw the text field and I'll get 400.2 x 300.7 , or as close as I can get it. If I go up to change the dimensions it will distort the text. By the way, this is a dynamic text field.
Any ideas?
View Replies !
View Related
Resizing A Dynamic Text Field
Hi
Im busy building a right -> left news ticker... here are my questions (for now )
1. Is there a way of setting a dynamic, single-line text field to adjust its width depending on how much text it pulls in from an external .txt file? - so that ALL text is displayed.
2. Assuming that the above is possible, how would I go about evaluating the width of the dynamic text field once the text has been pulled in from the .txt file.
Any help or suggestions most welcome.
View Replies !
View Related
Resizing Dynamic Text Field
Here's another one.
I placed a dynamic text field in my page and the text is much longer than the assigned space so I have to vertically shorten it.
Problem is everytime I open the file again, the whole text field is much longer than I need it so i have to do a tug-o-war again.
I don't know exactly how to do it but I'm doing it on a hit-or-miss thing. Everytime I see the box on the lower right of the text field turns to black, that's the time the box can be shortened/resized vertically.
While it's white, can't shrten the box to hide the excess text at the bottom.
Any easy way to do this and to make it permanent?
Really need help. Client breathing down my neck.
View Replies !
View Related
Dynamic Text Field Resizing
Hi all. I'm VERY new to Flash and I can't figure this out. I have a dynamic text field that I want to make long enough to fit the text I am going to put in it, but when I try to make it wider by setting the width, it stretches the text in the field. I don't want it to do that. I want to text to stay the same and just be centered in the box, but I want the box to be pretty big so that I can add longer text messages later. Any idea on how to do this?
View Replies !
View Related
Resizing Dynamic Text Field
Here's another one.
I placed a dynamic text field in my page and the text is much longer than the assigned space so I have to vertically shorten it.
Problem is everytime I open the file again, the whole text field is much longer than I need it so i have to do a tug-o-war again.
I don't know exactly how to do it but I'm doing it on a hit-or-miss thing. Everytime I see the box on the lower right of the text field turns to black, that's the time the box can be shortened/resized vertically.
While it's white, can't shrten the box to hide the excess text at the bottom.
Any easy way to do this and to make it permanent?
Really need help. Client breathing down my neck.
View Replies !
View Related
Resizing Text Input Field Stretches Text?
I made a Text Input field, made it multiline and resized it by dragging it to make it square for a comments field.
When I tested it, the font was HUGE inside the text area. It seems to have stretched with the resizing of the field.
Is there a way to fix this so you font size stays the same and is not effected by resizing?
View Replies !
View Related
Auto Submit From Flash Form Cfinput Text Field
I have a Flash Form in ColdFusion 8 that consist of a CFInput Text field, and a CFGrid. When the user scans a barcode, I want the form to validate that there is a value, then submit the form (without using a submit button).
Since I'm still a newbie at ActionScript 3.0, I was hoping someone could shed some insite. Should I use the onBlur action in the cfinput tag? What actionscript commands do I need to force a submit?
View Replies !
View Related
Auto Scrolling Dynamic Text Field(news Ticker)
> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--B_3272625483_2679871
Content-type: text/plain;
charset="US-ASCII"
Content-transfer-encoding: 7bit
Does anyone know how to make a scrollable dynamic text field scroll on its
own and also with user interaction?
Thanks in advance for your help.
Bill
--B_3272625483_2679871
Content-type: text/html;
charset="US-ASCII"
Content-transfer-encoding: quoted-printable
<HTML>
<HEAD>
<TITLE>Auto scrolling dynamic text field(news ticker)</TITLE>
</HEAD>
<BODY>
<FONT FACE=3D"Verdana, Helvetica, Arial"><SPAN STYLE=3D'font-size:12.0px'>Does =
anyone know how to make a scrollable dynamic text field scroll on its own an=
d also with user interaction?<BR>
<BR>
Thanks in advance for your help.<BR>
<BR>
Bill</SPAN></FONT>
</BODY>
</HTML>
--B_3272625483_2679871--
View Replies !
View Related
How To Auto-add Scroll Buttons To Loaded Text?
Hi,
Does anyone know where I can find a tutorial on how to automatically add scroll buttons to an MC when the amount of text loaded from an external file exceeds the available space in the dynamic textbox?
The closest I've found was one on http://www.nooflat.nu/ that adds a slider but no buttons but I'm sure I've seen one with buttons before - just can't remember where!
I've tried searching the forums but the dodgy titles people give their posts make it pretty difficult to find what I'm looking for - more descriptive posts please!
Thanks,
Andy
View Replies !
View Related
Mp3 Player > Dynamic Text > Auto Scroll
Hi!
I've created a flash mp3 player with the help of a tutorial..
And everything works really good and nice..
But I have one question..
Im using the following script (from the tut.)
Code:
stop();
playlist = new XML();
playlist.ignoreWhite = true;
playlist.onLoad = function(success) {
if (success) {
_global.songname = [];
_global.songband = [];
_global.songfile = [];
for (var i = 0; i<playlist.firstChild.childNodes.length; i++) {
_global.songname[i] = playlist.firstChild.childNodes[i].attributes.name;
_global.songband[i] = playlist.firstChild.childNodes[i].attributes.band;
_global.songfile[i] = playlist.firstChild.childNodes[i].attributes.file;
// trace(songname[i]+" "+songfile[i]+" "+songband[i]);
}
}
_root.createEmptyMovieClip("sound_mc", 1);
_global.song_nr = random(songfile.length);
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr], songband[song_nr]);
};
function timer(sound_obj) {
time = sound_obj.position/1000;
min = Math.floor(time/60);
min = (min<10) ? "0"+min : min;
sec = Math.floor(time%60);
sec = (sec<10) ? "0"+sec : sec;
timeDisplay_txt.text = min+":"+sec;
}
MovieClip.prototype.songStarter = function(file, name, band) {
if (this.sound_obj) {
this.sound_obj.stop();
delete this.sound_obj;
}
this.sound_obj = new Sound(this);
this.sound_obj.loadSound(file, true);
this.onEnterFrame = function() {
if (this.sound_obj.position>0) {
delete this.onEnterFrame;
this._parent.display_txt.text = name+" / "+band;
timeInterval = setInterval(timer, 1000, this.sound_obj);
} else {
this._parent.display_txt.text = "loading...";
}
};
this.sound_obj.onSoundComplete = function() {
clearInterval(timeInterval);
this._parent.timeDisplay_txt.text = "00:00";
(song_nr == songfile.length-1) ? _global.song_nr=0 : _global.song_nr++;
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr], songband[song_nr]);
};
this._parent.volume1.dragger.onPress = function() {
startDrag(this, true, 0, this._y, this._parent.volBG._width, this._y);
this.onEnterFrame = function() {
var p = (this._x/this._parent.volBG._width)*100;
this._parent._parent.sound_mc.sound_obj.setVolume(p);
};
};
this._parent.volume1.dragger.onRelease = function() {
delete this.onEnterFrame;
stopDrag();
};
this._parent.volume1.dragger.onReleaseOutside = function() {
stopDrag();
};
};
btn_play.onRelease = function() {
clearInterval(timeInterval);
this._parent.timeDisplay_txt.text = "00:00";
this._parent.sound_mc.songStarter(songfile[song_nr], songname[song_nr], songband[song_nr]);
};
btn_stop.onRelease = function() {
clearInterval(timeInterval);
this._parent.timeDisplay_txt.text = "00:00";
this._parent.sound_mc.sound_obj.stop();
};
btn_fw.onRelease = function() {
clearInterval(timeInterval);
this._parent.timeDisplay_txt.text = "00:00";
(song_nr == songfile.length-1) ? _global.song_nr=0 : _global.song_nr++;
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr], songband[song_nr]);
};
btn_rev.onRelease = function() {
clearInterval(timeInterval);
this._parent.timeDisplay_txt.text = "00:00";
(song_nr == 0) ? _global.song_nr=songfile.length-1 : _global.song_nr--;
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr], songband[song_nr]);
};
playlist.load("ntlist.xml");
And I would like to have the dynamic text field with the instancename: display_txt to scroll from left to right ( and right to left ) automatically
How can I do this?
Thanks in advance!
See ya,
Ash
View Replies !
View Related
Auto Scroll TextField As Text Added?
Here's a routine that creates the effect of text being typed into a TextField...
ActionScript Code:
var textString:String = /* a block of text of any length */
// tField is a dynamic text field already on the stage
var count:uint = 0;
addEventListener(Event.ENTER_FRAME, typeout);
function typeout(e:Event){
tField.text = textString.substr(-textString.length, count);
if(count < textString.length) count ++;
if(count == textString.length) removeEventListener(Event.ENTER_FRAME, typeout);
}
This does the job it's supposed to. My question is, if the text is more lines than the allotted lines in the TextField, I'd like the the TextField to automatically scroll down as each new line is added. I'm assuming it has something to do with bottomScrollV, but I'm stuck on how to implement it. Any suggestions? Many thanks!
View Replies !
View Related
|