Update Textfield Contents
hey all,
i've got a textfield i want to change the contents of by clicking on buttons. theoretically, all my content will be stored in an xml file or text file, and will be read out into variables. those variables represent the content which should change in my textfields. i've tried things like TextField.text = "whatever", TextField.text = variableName, TextField.replaceSel(variableName), TextField.replaceSel("text"), sheesh, nothing is working and, i admit, this could be due to the fact that im not especially proficient with flash to begin with.
i know that naming textfields corresponding to variables assigns the variable content(text) to the textfield. but, i want to be able to change that text on the fly.
any help would be appreciated.
thanks,
-carlos
FlashKit > Flash Help > Flash ActionScript
Posted on: 08-14-2002, 02:27 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Update Contents In Flash
Hi, I want to learn how to update text and graphic content to Flash by XML, like update everyday news and stuff, is there any detail tutorial please?
Page Flip - Update Contents
Hi guys and gals,
I am having a little problem here, i am doing a project on some educational software, and in one segment of it, i am using a interactive book to display the contents. The book can flip to the next page so on and so forth. Only problem i have now is that, the contents in the can't be updated, or rather i don't have a clue how to update it. I have search everywhere on Flashkit.com and other webbies, but to no avail. I have attached the FLA file, for your analysis. And if you have done similar projects that you think could help me, please send to my mail: dahlia_x85@yahoo.com.sg Thanks alot. Merry Xmas and Happy New Year.
Print Contents Of A Textfield
Hello,
I'd like to print the contents of a textField from flash. I printed frames, and the entire movie, but all I'd like to do is print the text fields contents. (even the stuff that the user would need to scroll to see.)
Is there a way to do this?
thanks,
-J
Textfield Contents Disappear
I cant figure it out! What did I do! I published my movie and now all my text fields go blank. And I can't edit them, or code text into them. They arent under masks, and even have thier fonts embeded, and some are directly on the stage. Why is this happening? Below is a link to my .fla if you can help Please do! Thanks!
www.chasebrammer.com/files/summitView.fla
Print TextField Contents
Hi
I am trying to build a button that i can use to print the contents of a textField. My books only give advice on printing a frame - does anybody know how to do it?
bb
How Do I Delete Contents Of A TextField?
I have one textField - centre stage preloaded with createTextField - I am loading text into it from separate XML files each time a series of buttons are clicked.
Sometimes the text comes up 'undefined' (only when online). Are all these text files loading into one field piling up and confusing the Flash Player? Do I need to delete the contents before loading the next block of text? If so, how is this done?
Thanks
Charles
Adjusting Dynamic Textfield, To Fit Its Contents
I have a dynamic textfield "name" that is inside an mc on the main stage. This textbox gets changed by a variable being updated on a ClipEvent in another mc. How can I have the "name" text shrink and grow to the width of the contents?
Copy Textfield Contents To Clipboard
Another wacky request...
Is there a way using ActionScript to copy a textfield contents-i.e. via a button click event- to the Windows clipboard? Or in othr words programmatically copy a textfield to the Windows clipboard?
Or more direct, I would like to save a textfield directly to the users hard drive as a .txt file. However, this feature(fscommand) has been removed due to security reasons- I'm told from FlashMX.
In reading the definiative Guide I'm unclear if "copy a filed to clipboard" in possible in FlashMX using the Selection Object.
I'm trying to avoid buying a third party app that could do this, however i'm open to suggestions for apps or extensions.
Thanks - This group rocks!!!
Ike
Attaching Action To TextField Contents
My question here is how can I attach a say - a getURL action to the word "Available"....
Code:
box.displayAvail = function(time){
box.createTextField("signUpLink", 0, 0, 50, 100, 45);
nameField.text = "Available";
Much Thanks for your advice!!!!
Printing Hidden Contents Of Scrollable Textfield
Hey guys,
Do you have any idea as to how to print the text inside a dyanamic textfield. now the problem is that the textbox is say 100/100 pixels and has a scrollbar attached to it and is set to multiline. Now is there a way to print all the text of the dynamic textfield.
Please respond ASAP...
Textfield That Won't Update Itself
I am a beginner , and this is my first question on this forum , forgive my stupidity
I just created one texfield on the stage with a variable name "myNumberTotal"
I created one buttons on the stage with this code:
on(Release) {
_root.myNumberTotal += 10;
}
Then on the frame i put this code :
var myTotalNumber:Number;
Then i test the movie , what happens is the textbox show me "undefined" , when i click it , it shows me NaN but i thought i already declared it as a number datatype .... Please please lend me a hand in this issue .. thanks
AS3 Textfield Won't Update
Hey Guys,
I am new to this forum and fairly new to flash. I have a textfield that is being created and added to a movieclip. I am loading external data from a databse and populating the textfield with the information.
However, the textfield is not being updated in the movieclip. The text property of the textfield is getting changed but it is not updating in the movieclip.
Has anyone ever run into this? Is there something I have to do to update the display of the textfield?
Any help would be greatly appreciated. Thank you.
John
TextField.maxscroll Update
hi,
posted a similiar question yesterday (see below), but I've managed to generalize it quite a bit:
When the size of my textField is changed dynamically, the .maxscroll value is not updated. Seems it waits for the next user interaction. How come? Is there any command to sort of update it? Hilfe!
( http://www.actionscript.org/forums/s....php3?t=108570 )
TextField Doesn't Update
The following event handler takes a few seconds to run. I want to give the user a courtesy message while processing happens. The problem is that the "Updating . . ." message never appears. After the processing delay only "Done" shows up. I've worked around the problem by putting the "Updating . . ." message in an event handler for SliderEvent:THUMBDRAGGED. But processing doesn't really begin until the thumb is released. I'd rather have my program tell the truth.
Code:
public function sliderChanged(e:SliderEvent):void {
myStatus.text = "Updating . . .";
removeDots();
placeAllDots();
thresholdText.text = thresholdSlider.value.toString();
myStatus.text = "Done";
}
[help] TextField.styleSheet Update
I am using attachMovie to place a movieclip on the stage. This movieclip contains an html text field, which I populate with text by setting the textfield variable equal to my string. I am attempting to apply some CSS styles to the text by using TextField.styleSheet, but it doesn't work... at first. If I try to apply the styleSheet later, it works fine.
This feels like one of those issues where the styleSheet has to be applied in a specific order (before text is loaded, after text is loaded, or only when Mars and Venus align on a Thursday) but I just can't put my finger on it. Does anyone have experience working with TextField.styleSheet, and have advice for me?
ActionScript Code:
var thisClip = _root.attachMovie("myClip","_myClip",_root.getNextHighestDepth());
thisClip.txtVar = "<body> Hi there </body>";
thisClip.txtField.styleSheet = myStyleObject; //Style sheet defined elsewhere
I have also tried delaying thisClip.txtField.styleSheet = myStyleObject; by placing it in a setInterval construct.
Thanks!!!!
AS3 - Dynamic Textfield Will Not Update
I have two buttons called buttonLeft and buttonRight. These buttons don't update the month_txt dynamic textfield. I have traced the statement and the textfield should update but doesn't. Can anyone tell me where I am going wrong with this?
Code:
package {
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.Event;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
import flash.text.Font;
import flash.display.SimpleButton;
import flash.events.MouseEvent;
import myFont;
import NavButton;
import right;
import left;
public class Calendar extends MovieClip {
var calendar:MovieClip = new MovieClip();
var monthsOfYear:Array = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
var daysOfWeek:Array = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
var daysOfMonths:Array = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
var currentDate:Date;
var myDate:Date;
var month_mc:MovieClip = new MovieClip();
var day_mc:MovieClip;
var days_mc:MovieClip = new MovieClip();
var daysNo:Number;
var startDay:Number;
var i:Number;
var buttonRight:right;
var buttonLeft:left;
public function Calendar(__x:Number, __y:Number, fetch:String = null) {
if (fetch) {
currentDate = new Date(fetch);
} else {
currentDate = new Date();
}
myDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1);
publishMonth();
publishDays();
calendar.x = (235-170)/2;
calendar.y = (203-140)/2;
this.addChild(calendar);
//////////////////////buttons don't update dynamic textfield!////////////////////////////////////////////////
buttonRight = new right();
addChild(buttonRight);
buttonRight.x = 210;
buttonRight.y = 40;
buttonRight.addEventListener(MouseEvent.MOUSE_UP, getNextMonth);
buttonLeft = new left();
addChild(buttonLeft);
buttonLeft.x = 20;
buttonLeft.y = 40;
buttonLeft.addEventListener(MouseEvent.MOUSE_UP, getPreviousMonth);
}
public function getNextMonth(event:MouseEvent) {
var nextMonth=currentDate.month+= 1;
var month_txt:TextField=new TextField;
month_txt.text=monthsOfYear[nextMonth] + " " + currentDate.getDate() + ", " + currentDate.fullYear;
trace(month_txt.text=monthsOfYear[nextMonth] + " " + currentDate.getDate() + ", " + currentDate.fullYear);
}
public function getPreviousMonth(event:MouseEvent) {
var previousMonth=currentDate.month-= 1;
var month_txt:TextField=new TextField;
month_txt.text=monthsOfYear[previousMonth] + " " + currentDate.getDate() + ", " + currentDate.fullYear;
trace(month_txt.text=monthsOfYear[previousMonth] + " " + currentDate.getDate() + ", " + currentDate.fullYear);
}
//////////////////////////////////////////////////////////////////////
public function publishMonth() {
var month_txt:TextField = new TextField();
month_txt.text = monthsOfYear[currentDate.getMonth()] + " " + currentDate.getDate() + ", " + currentDate.fullYear;
//trace(month_txt.text = monthsOfYear[currentDate.getMonth()] + " " + currentDate.getDate() + ", " + currentDate.fullYear);
month_txt.autoSize = TextFieldAutoSize.CENTER;
month_txt.embedFonts = true;
var month_tf = new TextFormat();
month_tf.font = "Arial Black";
month_tf.color = 0xFFFFFF;
month_tf.size = 14;
month_txt.setTextFormat(month_tf);
month_txt.selectable = false;
month_mc.x = 40;
month_mc.y = 0;
month_mc.addChild(month_txt);
calendar.addChild(month_mc);
}
Update Text In Textfield
i don't see what's wrong here:
when i delete the _txtFld.appendText(text); in the updateText function the text disappears after i call it. with the append text, it sets the new text.
thanks for any help.
Code:
public class MyTextField extends textFormating {
private var _txtFld:TextField;
public function MyTextField(text:String) {
setNewTextFormat(12, 0xFF0000);
_txtFld = new TextField;
_txtFld.text = text;
_txtFld.multiline = true;
_txtFld.wordWrap = true;
_txtFld.autoSize = TextFieldAutoSize.LEFT;
_txtFld.embedFonts = true;
_txtFld.mouseEnabled = false;
_txtFld.selectable = false;
_txtFld.setTextFormat (txtTitel);
addChild(_txtFld);
}
public function updateText(text:String):void {
_txtFld.appendText(text);
_txtFld.text = text;
trace(_txtFld.text);
}
}
Update A Dynamic Textfield From An Eventlistener
Having a 5 day nightmare over this!
I really need to update the text in a text field from the event.PROGRESS Handler below, its alot of code to read but it all traces and works fine, just cant get info from the handler to the textField..
The Salt and Vinegar (UN OPENED) pringles on my desk are yours!
ActionScript Code:
package
{
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.*;
import flash.net.*;
import flash.display.*;
import flash.net.URLRequest;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.Font;
import flash.text.*;
import xmllist;
public class imagemc extends MovieClip
{
public var holder:MovieClip = new MovieClip;
public var holder_Preloader:MovieClip = new MovieClip;
public var holder_Sprite:MovieClip = new MovieClip;
public var holder_Preloader_Text:TextFormat = new TextFormat;
public function imagemc (xmlArray,URLimages):void
{
//trace ("CLASS CONSTRUCTOR : IMAGEMC");
for (var i:int=0; i<xmlArray.length; i++)
{
buildSlideContent (xmlArray,URLimages,i);
}
}
public function buildSlideContent (xmlArray,URLimages,i):void
{
// CREATE MAIN CLIP
var holder:MovieClip = new MovieClip();
holder.graphics.lineStyle (1, 0xFF0000, 1);
holder.graphics.moveTo (0, 0);
holder.graphics.lineTo (760, 0);
holder.graphics.moveTo (760, 0);
holder.graphics.lineTo (760, 390);
holder.graphics.moveTo (760, 390);
holder.graphics.lineTo (0, 390);
holder.graphics.moveTo (0, 390);
holder.graphics.lineTo (0, 0);
holder.x = 20;
// CREATE PRELOADER CLIP //
var holder_Preloader:MovieClip = new MovieClip();
holder_Preloader.graphics.lineStyle (1, 0xFF6600, 1);
holder_Preloader.graphics.moveTo (0, 0);
holder_Preloader.graphics.lineTo (760, 0);
holder_Preloader.graphics.moveTo (760, 0);
holder_Preloader.graphics.lineTo (760, 390);
holder_Preloader.graphics.moveTo (760, 390);
holder_Preloader.graphics.lineTo (0, 390);
holder_Preloader.graphics.moveTo (0, 390);
holder_Preloader.graphics.lineTo (0, 0);
holder_Preloader.x = 0;
// IMPORT TEXT
var Font_Levenim:Font=new Font1();
var Font_Levenim_Format:TextFormat = new TextFormat();
Font_Levenim_Format.font=Font_Levenim.fontName;
// CREATE TEXT FIELD //
var holder_Preloader_Text:TextField = new TextField();
holder_Preloader_Text.defaultTextFormat = Font_Levenim_Format;
holder_Preloader_Text.embedFonts = true;
holder_Preloader_Text.x = 0;
holder_Preloader_Text.y = 10*i;
holder_Preloader_Text.width = 350;
holder_Preloader_Text.height = 20;
holder_Preloader_Text.border = false;
holder_Preloader_Text.background = false;
holder_Preloader_Text.text = "HELLO WORLD";
holder_Preloader_Text.textColor = 0xFF0000;
holder_Preloader_Text.multiline = false;
holder_Preloader_Text.wordWrap = false;
holder_Preloader_Text.selectable = false;
// CREATE IMAGE HOLDER SPRITE
var holder_Sprite:MovieClip = new MovieClip();
holder_Sprite.graphics.lineStyle (1, 0xFF6600, 1);
holder_Sprite.graphics.moveTo (0, 0);
holder_Sprite.graphics.lineTo (760, 0);
holder_Sprite.graphics.moveTo (760, 0);
holder_Sprite.graphics.lineTo (760, 390);
holder_Sprite.graphics.moveTo (760, 390);
holder_Sprite.graphics.lineTo (0, 390);
holder_Sprite.graphics.moveTo (0, 390);
holder_Sprite.graphics.lineTo (0, 0);
holder_Sprite.x = 80;
// CREATE IMAGE
var ldr:Loader = new Loader();
var url:String = URLimages+xmlArray[i];
var urlReq:URLRequest = new URLRequest(url);
ldr.load (urlReq);
ldr.x = 0;
ldr.name = "LD_IMG_"+i;
holder.name = "MC_HOLDER_1_"+i;
holder_Preloader.name = "MC_PRELOADER_1_"+i;
holder_Sprite.name = "MC_HOLDER_1_IMG_"+i;
holder_Preloader_Text.name = "TF_PRELOADER_TEXT_1_"+i;
addChild (holder);
holder.addChild (holder_Preloader);
holder.addChild (holder_Sprite);
holder_Preloader.addChild (holder_Preloader_Text);
holder_Sprite.addChild (ldr);
configureListeners (ldr.contentLoaderInfo);
}
private function configureListeners (dispatcher:IEventDispatcher):void
{
dispatcher.addEventListener (Event.COMPLETE, completeHandler);
dispatcher.addEventListener (HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
dispatcher.addEventListener (Event.INIT, initHandler);
dispatcher.addEventListener (IOErrorEvent.IO_ERROR, ioErrorHandler);
dispatcher.addEventListener (Event.OPEN, openHandler);
dispatcher.addEventListener (Event.UNLOAD, unLoadHandler);
dispatcher.addEventListener (ProgressEvent.PROGRESS, progressHandler);
}
private function completeHandler (event:Event):void
{
trace ("HANDLER : COMPLETED > " + event + event.currentTarget.loader.name);
}
private function openHandler (event:Event):void
{
trace ("HANDLER : OPEN > " + event + ldr);
}
private function progressHandler (event:ProgressEvent):void
{
///////////////// NEED TO UPDATE "TF_PRELOADER_TEXT_1_"+i HERE ///////////
trace ("HANDLER : PROGRESS LOADED > " + event.bytesLoaded + " total: " + event.bytesTotal);
}
private function securityErrorHandler (event:SecurityErrorEvent):void
{
trace ("HANDLER : SECURITY > " + event);
}
private function httpStatusHandler (event:HTTPStatusEvent):void
{
trace ("HANDLER : HTTP STATUS > " + event);
}
private function ioErrorHandler (event:IOErrorEvent):void
{
trace ("HANDLER : I O ERROR > " + event);
}
private function unLoadHandler (event:Event):void
{
trace ("HANDLER : UNLOADED > " + event);
}
private function initHandler (event:Event):void
{
trace ("HANDLER : INIT > " + event);
}
}
}
Update Text Of Dynamic Textfield
I have created a dynamic textfield, but I doesn't change after the defined number of iterations .
At the end of the script is a conditional setting, changing the textField.
However, the text just dissapears.
Anyone ?
Attach Code
import flash.events.*;
import flash.geom.Rectangle;
import flash.text.*;
// first make an array to put all our snowflakes in
var snowFlakes : Array = new Array();
// dynamic text
//define textfield
var dyntext_NDW : TextField = new TextField();
dyntext_NDW.type = TextFieldType.DYNAMIC;
dyntext_NDW.x = 120;
dyntext_NDW.y = 150;
dyntext_NDW.width=600;
//dyntext_NDW.height = 200;
dyntext_NDW.autoSize = TextFieldAutoSize.LEFT;
dyntext_NDW.multiline = true;
dyntext_NDW.text = "text1";
trace ("how many ?");
// define formatting
var format1:TextFormat = new TextFormat();
format1.color = 0xFF0000;
format1.size = 30;
format1.font = "Courier";
format1.font = "AFKlampenborg";
var format2:TextFormat = new TextFormat();
format2.font = "Courier";
dyntext_NDW.setTextFormat(format1);
var startRange:uint = 6;
//put on stage
addChild (dyntext_NDW);
// and decide the maxium number of flakes we want
var numFlakes : uint = 250;
// and define a rectangle to store the screen dimensions in.
var screenArea:Rectangle = new Rectangle(0,0,800,300);
addEventListener(Event.ENTER_FRAME, frameLoop);
// and define the function that is called on an ENTER_FRAME event
function frameLoop(e:Event)
{
var snowflake : SnowFlake;
// if we don't have the maximum number of flakes...
if(snowFlakes.length<numFlakes)
{
// then make a new one!
snowflake = new SnowFlake(screenArea);
// add it to the array of snowflakes
snowFlakes.push(snowflake);
// and add it to the stage
addChild(snowflake);
}
// now calculate the wind factor by looking at the x position
// of the mouse relative to the centre of the screen
var wind : Number = ((screenArea.width/2) - mouseX);
// and divide by 60 to make it smaller
wind /=60;
function dynText():void {
dyntext_NDW.text = "NDW 123 overwrite";
addChild (dyntext_NDW);
}
// now loop through every snowflake
for(var i:uint = 0; i<snowFlakes.length; i++)
{
trace ( "flakes = ", i);
snowflake = snowFlakes[i];
// and update it
snowflake.update(wind);
// update tekst
if (i==20) {
dynText();
}
}
}
Update A Textfield From A Function Inside An As File
I'm trying to update a text field on my stage based on the results of a function. My function is in a as file however when it gets to the
textField.text="something" part it errors out with the following message
ReferenceError: Error #1065: Variable mainDisplay is not defined.
here is the line in my functin code
mainDisplay.text="GAME OVER TRY AGAIN";
how do i reference the textField mainDisplay from the function contained with the as file
I have tried stage.mainDisplay
any help would be appreciated.
regards
[MX2004] How To Update Textfield Only When Changed? - Urgent
I have 2 textfields...
They have to be related to each other so when I change the data in one of them, the other changes too (not identically... calculations and stuff)
And when I change the second one the, first one has to change accordingly... like a 2-way thing
Has that something to do with listeners mby? Never used them b4
[MX2004] How To Update Textfield Only When Changed? - Urgent
I have 2 textfields...
They have to be related to each other so when I change the data in one of them, the other changes too (not identically... calculations and stuff)
And when I change the second one the, first one has to change accordingly... like a 2-way thing
Has that something to do with listeners mby? Never used them b4
Moock's VirtualPet - TextField Update Not Working
Hi...
I've followed Colin Moock's AS3 notes to create a VirtualPet
I've got it working from the code at: http://www.adobe.com/devnet/actionsc...n_moock_f6.pdf
...but am now trying to add a textField on the stage that will display the % of calories remaining.
Extra code I have created in VirtalPet.as:
1. private var petView (An instance of VirtualPetView)
2. petView.displayInfo() (Called from the digest() method, which is called by the Timer every second)
Extra code I have added in VirtualPetView.as:
1. The method, displayInfo()
2. The method, createTextField(whichField:TextField, x:Number, y:Number, align:String, size:Number, color:Number, bold:Boolean)
3. The textField calories_txt, created in VirtualPetView by the above method.
The problem:
It displays correctly at first: "50% remaining". However there is no change to the textField content after that, as the VirtualPet becomes more and more hungry.
The method which should update the textField is called displayInfo(), and is definitely being called, as a trace action within the function is working properly, giving the correct value of remaining calories.
Please see the source code in the zip file attached.
Link In External File To Update Text In Other Textfield?
hi,
I am trying to create a link in a external text file, that will make a text appear in another textbox on the stage.
ie i have two textbox's on the stage, one called SubMenu one called MainText. Both are filled reading from an external text file. Now I would like to create a hyperlink in the SubMenu textfile that will make a new text appear in the MainText.
Anyone have any idea?
what i have sofar is this (the SubMenu text file):
SubMenu=Galleries
<p><a href="http://www.adamandtheweightfansite.com/NewsText.txt" target="MainText">Gallery 1</a></p>
<p>Gallery 2</p>
MainText or _MainText doesnt make a difference. It keeps opening it in a new browser.
I think that if we can make this work, we will have created a way to update menu's without any flash knowledge.
Any help is greatly appreciated. Oh im using MX Pro
Lisa
Dynamic Text Field Won't Show Update Until NEXT Update Happens
Hi,
In a very simple Flash file with bascially just a dynamic text field and a button I attached some very simple code to the button that updates the text fields .text parameter, like this:
on(click) {
some_textfield.text = some_value;
}
With trace(...) I have verified that "some_value" is what I want it to be. However, the txt field doe NOT get updated! It gets that (b ythen old) value the NEXT time I press the button!
So when I start the flash movie and click the button nothing happens, the next time I see the value I should have seen the first time, etc. - always one event late. Since the trace() I put inside the on(click) handler shows the correct value I'm really at a loss to explain why the text field is not updated.
Any explanations?
PS: By the way, I'm using font "_sans" so there's no font to embed, but trying Arial with "embed numbers" (I want to display an integer number) doesn't work either. I only mention that because I think to have observed something like the above strange behavior caused by embedding (or not) the characters.
Edited: 09/04/2007 at 09:23:57 AM by Hasenstein
Player 9 Update-Firefox Update And Bandwidth
Hi,
I have a site of mine online which I created some 2.5 years ago probably with Flash MX--Recently, my hosting company informed me that I had allotted my bandwidth allowance--I had recently installed the latest version of the Flash Player as well as the latest version of Mozilla Firefox--It seems that through viewing my site in the updated Firefox browser with the updated player there was some code in my swf which apparently kept trying to download the mp3 file --Some 271769 hits in a few hours resulting in using 1341.07 GB of bandwidth, all originating from IP address, btw--The hosting company is threatening to charge me at the rate of $10 per 5GB over my allotted bandwidth-I get 20GB free per month--That means they are planning to charge me over $2,600 --
Anyway, here is the code:
Code:
jimi = new Sound();
jimi.loadSound("jimi.mp3", true);
jimi.onSoundComplete = function() {
jimi.loadSound("jimi.mp3", true);
};
Which has not caused any problems in over 2 years and countless viewings until the recent installations of the most current security updates to the Flash 9 Player and Firefox-
Does anyone know if the code is now incompatible with the new player and/or firefox and if there is a way to fix this without redoing the entire site in AS3?
Thanks
---Yvette
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 thankful
The AS I'm using:
_target.container.t.html = true
_target.container.t.condenseWhite = true
_target.container.t.autoSize = "left";
_target.container.t.htmlText = _data.texto
The 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' />
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!
[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
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!
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
[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;
}
|