ActionScript 3.0 :: TextArea Vs TextField - What Is Better In General

Oct 3, 2010

I was just wondering, what is better in general? Having a TextArea component or just use a TextField with a scrollbar component over it? What consumes less memory? What is the implications of using a TextArea? Why use a TextArea over a TextField? I'm currently trying to deal with memory leaks and maintenance over time in my flash application, so every byte I save means a lot

View 1 Replies


Similar Posts:


Actionscript 3 :: What Is The Difference Between TextField , Label And TextArea

Aug 12, 2010

What is the difference between TextField, Label, and TextArea in flash. I'm trying to find the most lightweight class to display text because I will be making lots of them.

View 2 Replies

ActionScript 3 :: Converting TextArea Into TextField Component

Sep 19, 2011

I've a TextArea component in my MovieClip. When I double click on it, I want to switch to TextField component, allowing me to change its content. When I click outside, I want to restart its original class (TextArea).

I'm doing this, but didn't work:
element.addEventListener(MouseEvent.DOUBLE_CLICK, changeName);
private function changeName(e:MouseEvent):void{
e.target.type = TextFieldType.INPUT;
}
Where element is a TextArea (classic and dynamic text).

This is how my MovieClip looks. "Name" is the TextArea that I want to allow user changes. I'm setting it like this:
Nombre de instancia = Instance name (empty)
Texto clasico (classic text)
Texto dinamico (dynamic text)

The MovieClip is controlling my by own base class (called 'ConfLayer'). Inside it I have this:
public function doStuff(e:MouseEvent):void{
// element = TextArea 'Name'
element.addEventListener(MouseEvent.DOUBLE_CLICK, changeName);
} private function changeName(e:MouseEvent):void {
var tarea:TextArea = e.target as TextArea;
var tf:TextField = tarea.TextField; // this line throwing error
tf.type = TextFieldType.INPUT;
}

Because AS3 gives me errors, I tried this:
private function changeName(e:MouseEvent):void {
e.target.TextField.type = TextFieldType.INPUT;
}
When I double-click on TextArea element, the previous string removes and I can't write nothing.

View 3 Replies

ActionScript 3.0 :: TextField And TextArea Component Are Very Limited In Displaying And Formatting HTML Pages

Mar 25, 2009

i'm working on a game project and i got some trouble with displaying stuff in the game Launcher. everything is in AS3. I'm actually looking to achieve almost the same results as the World of Warcraft launcher with a news section. the way i think to work it is that i create either a textArea component or a textfield and display html page in it. This html page could contain text, image and flash SWF.

but here's the problem, textField and textArea component are very limited in displaying and formating HTML pages. So i don't know if i should continue to search and try developping this way or find another way for displaying dynamic stuff that can be easily updated.

View 2 Replies

ActionScript 3.0 :: TypeError: Error #1034: Type Coercion Failed: Cannot Convert Flash.text::TextField@3a062121 To Fl.controls.TextArea

May 22, 2009

I keep getting this error and I'm not sure why.

TypeError: Error #1034: Type Coercion failed: cannot convert flash.text::TextField@3a062121 to fl.controls.TextArea.
at SrHome_fla::MainTimeline/frame3()
at flash.display::MovieClip/gotoAndPlay()
at SrHome_fla::intro_mc_3/frame139()

Here is the code that I am using that produces that error.

import fl.controls.*;
var info_txt:TextArea = photoArea_mc.photoSquare_mc.info_txt;
var image:XML = new XML(<image/>);
image.@fileName = "pic1.jpg";

[code]....

View 1 Replies

ActionScript 3.0 :: Make The Text In A Textarea Go Until The Length Of The Textarea?

Nov 3, 2009

A little much put in the title, but my question is just that. I have the following AS3 code for my textarea...

addChild(Texta1);
Texta1.alpha = 0;
Texta1.blendMode = BlendMode.LAYER;

[Code].....

Unfortunately, when I start placing text in this text area. Either through code or user input, the text will be placed on a new line after about 80-100 pixels. Yet I want it to start a new line after 320 pixels (it's length).

View 0 Replies

ActionScript 2.0 :: General Code For MC's?

Sep 29, 2009

I have a flash doc with two MC's and two frames.In frame 1, the user can select one of the MC's, and in frame 2, he can move ONLY that MC.Is there a way to write a general code in frame 2 and not having to write an "IF" depending an extra variable I had to create?Because in the future I will have lots of MC's.Here is the little code I have and the link with the .fla

Frame 1

Quote:
stop();
extra_var = 0;[code].............

View 0 Replies

Professional :: General Feedback For Adobe

Nov 20, 2011

I'm sorry if this is the wrong place to post this, but I looked for a place to send general "feedback" and could not find one.I just wanted to let the management at Adobe know a couple things related to recent Public Relations blunders. Ever since the announcment that you were ending Flash Player for Mobile, I have had many conversations with people about this topic and there is SO much misinformation due to your announcement, it's going to tank Flash as a broader platform.

- Some think Flash doesn't work on Macs
 
- Some think the Flash player is cancelled on ALL platforms (PC included)

- Some think Flash in its entirety is coming to an end.
 
This perception seems to come from people of various levels of technical knowledge, from basic users where it's understandable they might be confused about the specifics of the recent news (but still not a good thing!) on up to key decision makers who don't know tech but are key to making certain spending decisions with regard to tech platforms (CEOs). This is a horrible place for Flash to be in right now and you need to quickly change the perception with a "Flash is alive and well" type of announcement.Remember, most people only retain sound bites and a few words from headlines. You may have announced "Adobe ends Flash Player for Mobile" originally, but what people retained was "Adobe ends Flash Player". You need to make a new announcement that the short attention span people will come away from with knowledge that all is well. "Flash not dead" for example.Man, whoever plans your PR needs to be fired. You could have killed off the Mobile player back before the MAX conference and then followed up with the news about Flash Player 11 and Stage 3D. That would have a perfect one-two punch, but instead you reversed it and all the excitement from FP11 @ MAX was blown away.

View 3 Replies

Java - AMF/JAX-RS Some General, Some Enunciate-specific?

Nov 10, 2011

I'm completely new to Java. My task is to set up the client/server architecture for an upcoming Facebook game. On the server-side, I have:

[Code]...

View 1 Replies

ActionScript 3.0 :: Align Objects In General?

Jun 4, 2010

Here I aligned Left Center...

How to generalise?

I have created three movieclips." image","crop","fixedPoint"

I am rotating the image 0,90,180,270,360..

image always align with fixed point.

ActionScript Code:
import flash.geom.Rectangle;
function alignObject()
{

[Code]....

View 4 Replies

ActionScript 3.0 :: General Query About Text Editors

Sep 17, 2009

i have a few problems that i have stumbled apon and i'm using Learning Actionsript 3.0 book to help me, but i am using FlashDevelop as my chosen editor for learning rather than Flash IDE editor, is it OK for me to upload my FlashDevelop projects for people to see and help? because like i said i'm using it for my AS 3.0 learning.Do many of you use FlashDevelop for your AS 3.0 code?

View 2 Replies

ActionScript 3.0 :: General Bitmap Depth / Index

Feb 4, 2012

I was wondering what's the best way to manage an images depth. Currently I have 2 layers. On the top layer I have a png image of a window. The inside of the window frame is transparent so you can see though it. On the bottom layer I have a png image of a background that you cannot see though. I used addChild(MyMovieClip); to put an image onto the stage. It is in front of the window. I used addChildAt(MyMovieClip, 0); and the image ended up behind the background. I used addChildAt(MyMovieClip, 1); and the image ended up in front of the window again.

[Code]..

View 1 Replies

Create General Popup That Can Have Many Different Types Of Dataproviders?

May 9, 2011

If I have a flex component that is a general popup, it's basically just a white popup that I pass an Array named "modules" to.[code]...

View 2 Replies

ActionScript 3.0 :: What Methodology Use In General When You Want To Make A Custom Class Object?

Jan 4, 2011

new to ActionScript 3 and while I'm trying to write as "clean" code as possible (creating various custom classes instead of everything in the document class for example), sometimes I stumble upon behaviors that would not arise if I had put everything in the same place.I have a project which involves fireworks which is working fine, but I'd like to add a smoke trail to the rockets (a custom class rocket object) and so far I can't get it done.

So I will ask my question first: what methodology do you use in general when you want to make a custom class object leave a trail of particles behind it? Do you include the trail generation in the class? in a separate class? on the document class?what I've been doing (and what I feel is the "cleanest" and most reusable way to do it) is to put the trail generation in the custom class rocket object. This object is just composed of some graphics and the function that generates the particles(which are another custom class).The actual handling of the firing and the movement of the rocket is done by the document class.So the problem I'm having is that when I generate a particle on a frame, if I add it to the rocket object, it follows it (local coordinates), and if I add it to the stage then I can't remove it from within the rocket object...

View 4 Replies

ActionScript 3.0 :: Calling Random Functions And General Game Queries?

Jul 24, 2011

I am currently making a game with Flash CS5 and AS3... namely Tetris I have created my main menu and the objects and so on and have a few questions
 
1) How do I quit the game should a player press the quit button?

2) How do I get a button (Z and X) to rotate an object whilst the object is moving downwards (it is moving downwards using the timer function)?

3) How do I get the object to stop once it reaches the bottom of the screen? (im thinking something along the line of the hit detect but havent had much luck)

4) Any ideas on how to get flash to detect if a line is complete and therefore delete it? (it needs to segment blocks off the graphic)

5) My final and most important question (the bit im working on at the minute) how do i get flash to call random functions so that random tetrominoes appear on screen so that the game is different everytime and the blocks are random as the player plays)

View 2 Replies

ActionScript 2.0 :: Image Start To Flicker And Cause The General Movement To Slow Down

Jan 6, 2010

I have an awkward problem with a carousel I have built. When the images are scaled down to give the 3d 'flipping' effect, they start to flicker and cause the general movement to slow down. Someone mentioned cacheAsBitmap.. .

View 3 Replies

ActionScript 3.0 :: Flash General Error And Exception Handling Function?

Jun 8, 2010

Is there a way to handle errors and exceptions in AS3 as one would do so using `set_error_handler` and `set_exception_handler` in PHP?

View 4 Replies

ActionScript 3.0 :: General Flash Security: Validating Events Online?

Jun 16, 2010

Given the nearly plain-text nature of Flash, from a security standpoint, we must assume that your SWF can be decompiled into human readable format. That said, how can we ensure the validity of any online calls? For example, recording a high score might make a call similar to this:

Code:
var url:String = "http://someserver.com/tracker/scoreTable.aspx?mode=record&score=" + _userScore + "&checksum=" + MD5.hash( /* stuff */);
var loader:URLLoader = new URLLoader( );
loader.load( new URLRequest( url ) );

You can do all the MD5 hash checking to make sure the data received matches what was sent, but how can you verify the validity of the call? For instance, one could decompile the SWF and figure out how to build the query string manually, or they could reverse engineer it from monitoring the internet calls from the SWF itself. They could even use a run-time memory editor to change the figures that store the information while playing the game, so that when the recordHighScore call is made, it sends 1,000,000 instead of 1,000. How does one authoritatively validate data and protect against abuse?

View 3 Replies

Flex :: Databinding Array To Canvas As Objects General Client Architecture?

May 27, 2009

I have creating a distributed note taking application in flex, it basically is a notepad I can keep in my desktop tray. When I add notes and goes back to a server and saves it in a database.

To am struggling to design the application correctly, I want to have a Syncing service that polls the webserver for changes and updates an Array of Note objects. The problem is that my note corresponds mxml component, aka SingleNote component. There are four different cases when being, a. a note is updated from the server poll, in that case I want to singlenote to update the settings b. a note is added to the array from the server, in that case a new SingleNote needs to be created c. a SingleNote is added from client, in that case a Note is added to array, and sent back to server d. a SingleNote is change from client, in that case the Note is updated in the array and sent back to server

The properties are SingleNote(Width, X, Y, Text).

View 1 Replies

ActionScript 3.0 :: Save Text Of Textarea And Reuse It To Replace Text In Textarea?

Oct 11, 2010

Is it possible to save text of textarea in some variable or so and with its textformat (more than one color) and then reuse it to replace text in textarea?
 
I tried saving htmlText of textarea but the problem is when i replace it in textarea <p> tags causes problem.There will always be another extra line.

View 3 Replies

Actionscript 3 :: Save Text Of Textarea And Reuse It To Replace Text In Textarea?

Oct 11, 2010

Is it possible to save text of textarea (flash 10, as3, cs5) in some variable or so and with its textformat (more than one color) and then reuse it to replace text in textarea?

I tried saving htmlText of textarea but the problem is when i replace it in textarea tags causes problem. There will always be another extra line.

If anyone wants to view p tags problem try following. Just click on text and then move your down arrow key, cursor will go to next line.

[Code]...

View 1 Replies

Media Server :: General Hardware Guidelines For Customers To Hear Permission-based Audio Stream

Oct 19, 2009

We're running a permission-based audio stream to be amplified through in-store sound systems, but are unsure about basic hardware requirements. What basic features must all hardware have to log into our server via username/password and receive audio signal?

View 4 Replies

ActionScript 2.0 :: Exchange A Filename/url (like "XMLtoLoad") By A More General Variable?

Jun 25, 2003

I have the following question: How can i load a dynamic xml, i.e. the .xml file that will be generated automatically and thus gets different names.I want flash to "listen" to a variable "file", that is "file" represents the name of the xml-file to load. Like showXml.swf?file=abcd1234.xml. btw i don't exactly use the xml extension so it becomes showXml.swf?file=abcd1234

I using a general name = "XMLtoLoad" to load my xml.My AS right now is somthing like:

file = XMLtoLoad;
_root.xmlDocument.load("XMLtoLoad");

how can i exchange a filename/url (like "XMLtoLoad") by a more general variable? Or maybe i should ask how can i convert the name after "?file=" to a URL within AS

View 2 Replies

ActionScript 3.0 :: General Programming - Difference Between Using "this" And 'this' When Set A Variable?

Jan 30, 2010

What exactly is the difference between using "this" and 'this' when you do something like set a variable?

View 2 Replies

ActionScript 3.0 :: Create A Fade Effect For Dynamic TextField (content Of Textfield From XML File)?

Oct 5, 2011

I parse an xml file that his content is:

Code:
<?xml version="1.0" encoding="utf-8"?>
<operators>
<operator><name>OPerator1 </name></operator>

[Code].....

I display the name of operator in a TextField after parsing the xml file my problem is to loop through this different TextField with a fade effect.

View 0 Replies

ActionScript 2.0 :: Make A Movieclip And A Textfield To Resize To The Content Of The Text In The Textfield?

Dec 21, 2005

how can i make a movieclip and a textfield to resize to the content of the text in the textfield? I mean, if I have a textfield with 3 letters font name XXX and then the content of the field change, how can i resize te textfield so the text dont autoadjust to the 3 letter space?

View 3 Replies

ActionScript 2.0 :: Loading Text & JPG Nito TextField Makes Textfield White

Jun 18, 2008

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... The AS I'm using:

[Code]...

View 3 Replies

ActionScript 3.0 :: Changing Background Color Of TextField When Said TextField Is Selected By User?

May 5, 2010

I am looking to change the background color of a input textField when the user selects that testfield to start populating it. I have done a bunch of searching and I keep coming up with this type of answer...

Code:
myTextField.onSetFocus = Set(evt:Event){
// Change color
}

Problems...

1) Is onSetFocus/onKillFocus still available? From what I can tell it is not.

2) I have my text objects encapsulasted in a class so I do not believe I am able to do it like I have been suggested.

View 2 Replies

ActionScript 3.0 :: Remove The Textfield And Replace It With A Fresh Textfield At A Later Time?

Jun 2, 2009

I'm using the following to remove a textFeild from the stage I then need to add this textField back to the stage at a later time....i tried using addChild the problem is the text that was in the text field prior to the removal is still in the textfield when i re add it......How do i remove the textfield and replace it with a fresh textfield at a later time?....using msgTa.text =""; is not an option.

View 4 Replies

Professional :: Prevent A Textfield To Get Blurred, When Using The 3D Rotation Tool On A Textfield

Dec 12, 2010

I just recently started playing with cs5 and it's new features. I tried to rotate a textfield with the 3D rotation tool, but when you do this, the textfields gets blurry.And it seems like it's not a vector text anymore, because when you zoom in, it still is blurry.Is there a way to prevent that?

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved