Is there a way to set multiple fonts in flash.text.TextFormat similarly as in flash.text.StyleSheet? What I'm trying to do is to have global common TextFormat for all texts in my project, and I would like to make it flexible by providing multiple fonts. I was deciding between flash.text.TextFormat and flash.text.StyleSheet, and in the en...
This is quite a simple question. I can create a brand new FLA in CS3 and add
trace("hello");
to the first frame, run it, and nothing happens. I create the same file with the same frame action in CS4 and "hello" appears in the output window. It's not major because typically I don't write any timeline scripts, but if I wanted to write ...
I'm curious how, in ActionScript 3, to parse the font attributes of an HTML formatted content string. Lets take the following example content string:
var content:String = '<font face="Archer-Bold" size="12" color="#000000">My Content</font>';
I'd like to parse that string and create an object with the font attributes in it. So a resul...
I'm in the process of making a game (a shmup) and I've started to question the accuracy of the timers in ActionScript. Sure, they're accurate enough when you want to time things on the order of a few seconds or deciseconds, but it seems to perform pretty poorly when you get to finer ranges. This makes it pretty tough to do things like ...
As a relative newbie in the Java world, I am finding many things frustratingly obtuse to accomplish that are relatively trivial in many other frameworks. A primary example is a simple solution for asynchronous http requests. Seeing as one doesn't seem to already exist, what is the best approach? Creating my own threads using a blocking t...
I'm somehow creating a stack overflow in Flex 3...I'm trying to get data out of a modal dialogue window as such:
Main application:
var myPopup:MyPopup;
function buttonClick( event:MouseEvent ):void
{
myPopup = MyPopup( PopUpManager.createPopUp( this, MyPopUp, true ) );
myPopup.addEventListener( CloseEvent.CLOSE, handler, false, 0, tru...
I'm a Flex rookie tasked with enhancing an existing application. One of those enhancements is getting the field that currently shows the time to smoothly fade back and forth between showing the time and the date.
I know the proper way to do this is to embed the font file in the application so I can fade the label in and out directly. ...
I'm trying set the alpha to 50% on some radiobuttons in AS3.
The problem is that the radiobutton labels won't change.
Anyone know how to fix this?
...
I've got a class like this:
class Foo extends UIComponent {
var someDispatcher:*;
...
}
And I want to listen for events fired by someDispatcher... But, of course, someDispatcher may not be bound until "later":
<components:Foo someDispatcher="{someOtherComponent}" />
What's the best way to listen for events from someDispatch...
I've ran into a weird problem with getCharBoundaries, I could not figure out what coordinate space the coordinates returned from the function was in. What ever I tried I could not get it to match up with what I expected.
So I made a new project and and added simple code to highlight the last charater in a textfield, and all of a sudden i...
Ok, so I'll try to be as descriptive as possible.
I'm working on a project for a client that requires a jibjab-style masking feature of an uploaded image.
I would like to be able to generate a database-storable object that contains anchor/control positions of a bezier shape, so I can pull it out later and re-mask the object. This all i...
In our product we use a small flash applet for realtime communication with server application (rpc).
We sell this product to corporative clients with internal security police, sometimes strange :)
As i known (but not sure) flash socket connect to specified host directly, using system (or intranet) proxy settings, if needed. This is suit...
Hi All,
I have a cvery strange problem and just cannot work it out and was wondering if anyone on here knows the solution.
The problem i am facing is as follows.
we have a flash game and it works on the computers in the office (flash player 10 and flash player 9.0.159)
however when we try to run it on one of our laptops it fails and j...
Hi guys -
Here's my problem:
I have a Flash swf that uploads files from local machine and if they are images it resizes them if needed. This involves creating a JPGEncoded bytearray from a bitmapData object. After im finished with the bitmapData I dispose() of it.
I am noticing that flash will get stuck while resizing an image someti...
I develop a 2D shooter game with lots of objects and aggressive scrolling.
QUESTION: which way is better?
CHOICE 1 - use native Flash rendering:
derive game objects from Bitmap, use existing x, y, width, height, bitmapData
add all objects as children UIComponent.addChild(...) to sccreen
clip visible area using "scrollRect"
CHOICE 2...
I am making a input field for keywords, and while the users writing I'm displaying suggestions for keyword on a list underneath the caret position.
The input field is single line, so I am using the arrow up/down key to select a suggestion and Enter to insert it.
And it's mostly working, with the big exception that the up/down key also ch...
Flex's text-editing controls (mx:TextField, mx:TextArea) offer functions for doing "stuff" with the selected text (selectionBeginIndex, selectionEndIndex, setSelection), but the text-displaying controls (mx:Label, mx:Text) don't seem to offer anything of the sort.
After some tinkering, I've tried subclassing Label then writing functions...
i'm trying to implement the example found here:
http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7d9a.html
I have successfully shared movieclips but the fonts don't seem to be available.
I am using AS3 for Flash - not Flex.
Thanks,
Josh
...
Is there an upper bound to the size of a sprite in as3 / flash 10?
I know bitmapData has limitations...
...
I have the code
`if(_snd !=null)
{
_channel.stop();
}
_snd = new SoundBeep();
_channel = new SoundChannel();
_channel = _snd.play();`
but if the user clicks a few times fast, flash waits a bit, then beeps them fast. I'm not sure what's going wrong. Any ideas?
...