Actionscript 3 :: A Real DrawText Call In Flex?

Dec 22, 2009

I am now developing a Flex application in which I need to control each pixel of my control of Flex. I want to calculate that how width and how height of some text used in my control and do some layout stuff.After some searching I find that the only way to draw text in Flex is to use something like TextField. So, I use TextField to display text and try to get the width and height of the text through:

textfiled.getLineMetrics(0).width/.height;

But the real textfield is much more bigger than this, so I do:

textfield.width = textfiled.getLineMetrics(0).width;
textfield.height = textfiled.getLineMetrics(0).height;

But, the textfield get part not displayed, and I am surprised by this effect. I know there should be a 2-pixel gutter around the text, but what the remain space? Why nearly 20% part of the text height/width are not displayed?

how can I get a real drawText call in Flex, I mean something like Windows's drawText method...

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Does NetConnection.call() Work In Real-time

Jan 18, 2010

I need to communicate to the server in real-time. I can't let clients write to remote shared objects so I have to forward their requests to the server which checks if the data is valid and then writes it to a remote shared object. Should I use NetConnection.call() to forward clients' request to the server or is there something faster than that?

View 3 Replies

ActionScript 2.0 :: Get The Real X And Y Positions Of An Object In The Real Movie?

Jan 19, 2005

im just wondering if theres a way to get the real x and y positions of an object in the real movie ( the root screen) that is locted in another movie

i have an object which is within 2 movie clips, first one and then another , and then my object, now i want to know what the real x and y positions of it is, not the locations realtive to the movieclip it is inside.

View 5 Replies

Flex :: Get The Real Objects Width?

May 3, 2010

when I check the width of my objects I always get 0. Here is an example:

newTag = new LinkButton();
newTag.label = dataManager.tagViewTimelineModel.tags.getItemAt(i).name;
newTag.setStyle("color","#FFA500");[code]....

I guess because width is a property I can set, but it is not automatically computed by Flex. How can I know how big are my objects (as conseguence of the included text ?)

View 3 Replies

PHP :: Flex - Output Of C File In Real Time?

Oct 31, 2009

I have a C executable (named myprogram). When I run it by ./myprogram I get some output statements on the standard output of my Linux shell. I used run.php to get access to whatever is being printed to the standard output:

#run.php
<?php
$output = shell_exec('./myprogram');
echo $output;
?>

Then I called an HTTPService having id="service" to access this run.php file and I also set the text attribute of a TextArea to {service.lastResult}. When I run my Flex app, the interface kind of halts for a moment and then the TextArea displays all the 20 lines at once. But if program is run from Linux shell they appear one by one. Is there a way by which I can display a line as soon as it gets printed to standard output? This will then make the TextArea show the output in real time.

Or is Flex unable to do this? Rather how can a PHP program achieve such effect i.e. showing, whatever is being printed on standard output, concurrently in the browser in real time? Myprogram outputs 20 lines each after some microseconds. I want only the first line of standard output to appear in TextArea of Flex or in the browser (but in real time) while the program may then continue running the program.

View 3 Replies

Flex :: Who Uses IntelliJ For Real Commercial Projects

Jul 6, 2010

Just a simple question: Would you prefer IntelliJ? If so, what are the Pro- and Cons?

View 2 Replies

Php :: Real-Time Communication Between Flex Application?

Nov 19, 2010

I have a Flex/AIR application communicating with a PHP server application. Recently my client requested real-time-like connectivity between the applications to replace what we currently have; refresh buttons which have to be clicked to refresh data.So effectively the server needs to push data to the client when something changes. I can write the code that detects when something changes, but I'm not sure about the push side of things.

View 4 Replies

Flex :: View States Used In Real-World Projects?

Sep 3, 2009

I've just found out about View States in Flex (v3.0), but I am not really sure how widely this is used in real-world applications. Is it a good practice to use it? Are there any pitfalls such as maintainability for instance?

View 3 Replies

Make Real-time Connection Java And Flex?

Jun 10, 2011

I'm still new at Flex. I want to make a flex code that request data to server everytime. I use java as a server. i have successfully generate a linked-list of data at server from asterisk cli command. like this

[Code]....

View 2 Replies

Android :: Flex - App For Visualizing Real Time Data?

Mar 26, 2012

I want to build an android application that visualize some real time data , to get the position of objects and update it in real time and give me a simple animation . studied OpenGL ES for couple of days but it seems quite complicated but I dont think it fits to my needs

View 1 Replies

Actionscript 3 :: Dynamic/Real-Time Update Using 2 Different States In Flex Project?

Sep 16, 2010

I am trying to update a visual component giving some information in 1st state, while I make changes in the 2nd State...Question : Is it possible ? If yes, then is just data binding the solution? how ?!

Clearer Description :

State 1 : Has a form, in which I enter some data value for 3 boxes.

State 2 : Has 3 boxes, who have to change in color based on what values were entered in State 1.

Purpose : User 1 will enter data in with State 1 open, while User 2 should be able to see the dynamic/real-time effect while he is in State 2.

View 1 Replies

Flex :: Call Function After Remote Call?

Jan 31, 2011

I have a function in Flex which has three function in it.

public function update():void
{
A(); \Dispatches a event with Remote Call

[code].......

View 1 Replies

Javascript :: Reference The Html Object That Made The Call To SomeFunction Directly Using The ExternalInterface.call Call?

Jun 28, 2011

i have some actionscript that makes a

ExternalInterface.call('someFunction');

call.is it possible to reference the html object that made the call to someFunction directly using the ExternalInterface.call call?

Assume that the object that makes the call also has some Callbacks (via ExternalInterface.addCallback) that are accessible via javascript.

Currently:

Actionscript source
ExternalInterface.call("someFunction");
ExternalInterface.addCallback("someCallback",someASfunction);

[code]....

View 1 Replies

Flex :: Error :faultCode:Channel.Call.Failed FaultString:'error' FaultDetail:'NetConnection.Call.Failed: HTTP: Failed'"

Mar 11, 2011

I have a Flex and Java application and i am using BlazeDS between flex and java. Generally my application works fine. I observed when ever i try fetch data little faster(not giving gap between two fetch commands) then i am getting the error "Server error :faultCode:Channel.Call.Failed faultString:'error' faultDetail:'NetConnection.Call.Failed: HTTP: Failed'"

I guess when ever load is increasing on BlazeDs, i am getting the error. I am calling the java service using following code

[Code]...

View 1 Replies

Call A CGI Script In FLEX 3 And Display The Result Back In Flex Application?

Nov 14, 2011

How can i call a CGI script in flex 3? Also how can i retrieve the result of exection of that cgi script?

For example, lets say my CGI script(hello.cgi) just display "hello world". How can i call this script from flex 3 and then retrieve the result, i.e. hello world , so that it can be displayed on my flex application.

View 1 Replies

Flex :: Preloader - Call Flex InitComplete At A Specific Time?

May 31, 2010

Below is the overriden on complete function for a preloader in Flex.

private function initComplete(e:Event):void
{
//dispatchEvent(new Event(Event.COMPLETE));
cp.status.text="Configuring... Please Wait";
}

What I want to do is when the app has finsihed loading I want to change the preloaders text to "configuring".Then I want to go and do a bunch of setup stuff in my code.Once I've done all the setup I wanted how can I get the Preloader to dispatch its Event.complete from else where in my code?I tried Application.application.preloader but it comes up null.So I guess my question really is how to access a preloader from anywhere in my application. Would a better approach be to have all setup classes as members of my preloader class?

View 2 Replies

Flex :: Call A Webservice With An Attachment From Flex Webservices?

May 6, 2010

If it's possible to call a webservice with an attachment from Flex Webservices?

View 1 Replies

Flex :: Flex - Function Call Inside Of Component?

Sep 1, 2010

I want to call an App function inside a (I know about the Component scope already).What I mean is this:

<mx:Script>
<![CDATA[
public someFunction():void {

[code]......

View 1 Replies

ActionScript3 :: Get Real Url Of Page In Which Swf Is Placed?

Nov 27, 2010

So I tried

var url:String = String(this.loaderInfo.url);
var request:URLRequest = new URLRequest(url);
try {

[Code]....

but thay bouth return me to [URL] while I had url [URL] I use flash builder. So what shall I do to recive real full link - not swf link?

View 1 Replies

Flash :: Use FXG In Real World?

Feb 26, 2012

Have anybody found or seen real world example of using FXG files in real world applications?

View 1 Replies

ActionScript 3.0 :: Masking In Real Time?

May 30, 2009

I'm currently using the Graphics library to draw bands of color across an image (bitmap).So, I draw a square of colored bands, and mask it with the bitmap image. Unfortunately, when I use a mask (or even set the blend mode to .LAYER, OR use a shader filter) the FPS drops to un-usable levels.Is there some way that I can draw the bitmap shape I want without killing the FPS? I was thinking that I could like, draw the bitmap on top of the sqaure of Graphics, and then make a certain color transparent.

View 7 Replies

Delete A Shape For Real In JSFL?

Sep 24, 2009

I have this big JSFL project I'm working on that involves deleting a raw shape (ungrouped) and then replacing it with another one. The problem is that the original shape doesn't always actually get erased (I haven't figured out the precise circumstances where this happens yet though).  Even if it does get deleted, though, when I draw the new shape on the stage (using Path.makeShape), the new shape has extra vertices where its edges cross those of the original shape. So even if I end up with the correct-looking shape on the stage without the one that was there before, my shape I just created is likely to have extraneous vertices (and I need the vertices to be unchanged).

View 2 Replies

Javascript :: Create A Web Real Time App?

Mar 13, 2010

I want to create an application like this:

[URL]

What is the most efficient way to create this real time application ?Flash ? Long polling ? Http Streaming ? or anything else ?

View 3 Replies

Actionscript 3 :: Make Swf Address Be A Real URL And Not Use A #?

Mar 14, 2011

Is it possible to make swfaddress, or any script really, to allow flash to change the URL displayed(without actually switching to a new page) in the browser to anything I choose? I realize that swfaddress makes the url so that it will always refer back to an originating swf file, which is great, but a web template I'm working on will always load a swf, no matter what URL you visit on the site. The difference will be what content is immediately loaded. As you navigate through the flash to different articles, I want to be able to change the URL to be that of the article as if it was an html page, as I'm going to have matching html content for SEO purposes. This is going to be a large site and I want to optimize it for sharing and searchability

View 2 Replies

Php :: Real-time Streaming Of An MP4 File

Apr 8, 2011

Is it possible to play the video (mp4) in real time using some flash player? What I mean by in real-time is that player would receive data on the fly, not from alredy saved file but e.g. php script (which sends appropriate content-type header) THAT IS DOWNLOADING AND 'ECHO-ing' THE FILE AT THE TIME PLAYER PLAYS IT - like e.g. some kind of live stream.

View 3 Replies

Html :: Have Real 3d Models In Flash?

Sep 30, 2011

[URL] I was told HTML5 might be involved, how? And how to have real 3d models in Flash?

View 1 Replies

ActionScript 3.0 :: Creating A Real URL W/ AS Code?

Jan 15, 2009

how do most people deal with different URLs in flash/AS3?

for ex., I want to have a site like:

mysite.com/
mysite.com/images
mysite.com/videos

but i know this has been annoying to deal with in the past. how do people create these real links currently w/ flash?

View 6 Replies

ActionScript 3.0 :: Real Width And Height Of A MC?

Aug 10, 2010

Lets say that I have a MC called "myMovieClip", and in it there is a: Layer 1: 100px X 100px square Layer 2: 200px radius circle And Layer 1 is set as a mask for Layer 2. Is there a simple way to get the dimensions of the visible elements of the mask effect, and not the bounds of all of the elements in "myMovieClip"?

View 2 Replies

Professional :: Drawing In Real Time In A Film

Aug 1, 2010

Drawing in real time in a film

View 6 Replies

ActionScript 1/2 :: Make A Real Movement Animation?

Jan 6, 2011

how to make a real movement animation.I saw some game makeing movement program i saw its not that hard .They register movement from on other movement or video some litlie spots are placed in some colors and registring the movement and applyed in the new animation.

View 1 Replies







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