actionscript-3

FLVPlayback component memory issues

My website is entirely flash based, it moves around a 3D model which was given to me as chunks of video that I've converted to FLV files. I'm using the FLVPlayback component to control the video inside of my program. While running memory checks using System.totalMemory I've noticed that whenever a video is loaded, it will eat up a chunk ...

How can I resize a swf during runtime to have the browser create html scrollbars?

I have a swf with loads text into a Sprite that resizes based on the content put into - I'd like though for the ones that are longer than the page to have the browser use its native scroll bars rather than handle it in actionscript (very much like http://www.nike.com/nikeskateboarding/v3/...) I did have a look at the stuff nike did but ...

Is there a way to render svg data in a swf at runtime?

I'd like to render to svg data in a swf at runtime (not in Flex - not using degrafa) - how would I go about doing that? ...

Drawing a custom label on a pie chart in Yahoo's Flash Library ASTRA

Has anyone looked at Yahoo's ASTRA? It's fairly nifty, but I had some issues creating a custom label for a pie chart. They have an example for a line chart, which overrides an axis's series's label renderer. My solution was to override the myPieChart.dataTipFunction. For data that looks like: myPieChart.dataProvider = [ { category: "...

Are there any good programs for actionscript/flex that'll count lines of code, number of functions, files, packages,etc...

Doug McCune had created something that was exactly what I needed (http://dougmccune.com/blog/2007/05/10/analyze-your-actionscript-code-with-this-apollo-app/) but alas - it was for AIR beta 2. I just would like some tool that I can run that would provide some decent metrics...any idea's? ...

Any way to have an ActionScript 3 (Flex/AIR) project print to standard output?

Is there any way to have a binary compiled from an ActionScript 3 project print stuff to stdout when executed? From what I've gathered, people have been going around this limitation by writing hacks that rely on local socket connections and AIR apps that write to files in the local filesystem, but that's pretty much it -- it's obviously...

how do I import a class to use inside Flex application?

I have an actionscript file that defines a class that I would like to use inside a Flex application. I have defined some custom controls in a actionscript file and then import them via the application tag: <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:scorecard="com.apterasoftware.scorecard.controls.*" ... ...

How do I loop through result objects in Flex?

I am having problems manually looping through xml data that is received via an HTTPService call, the xml looks something like this: <DataTable> <Row> <text>foo</text> </Row> <Row> <text>bar</text> </Row> </DataTable> When the webservie result event is fired I do something like this: for(var i:int...

What is the best way to calculate Age using Flex?

What is the best way to calculate Age using Flex? ...

How do you reference a bitmap on the stage in actionscript?

How do you reference a bitmap on the stage in flash using actionscript 3? I have a bitmap on the stage in flash and at the end of the movie I would like to swap it out for the next in the sequence before the movie loops. in my library i have 3 images, exported for actionscript, with the class name img1/img2/img3. here is how my layers i...

Strip all HTML tags except links

I am trying to write a regular expression to strip all HTML with the exception of links (the <a href and </a> tags respectively. It does not have to be 100% secure (I am not worried about injection attacks or anything as I am parsing content that has already been approved and published into a SWF movie). The original "strip tags" regula...

What is the best approach to moving a preexisting project from Flash 7/AS2 to Flex/AS3?

I have a large codebase that targetted Flash 7, with a lot of AS2 classes. I'm hoping that I'll be able to use Flex for any new projects, but a lot of new stuff in our roadmap is additions to the old code. The syntax for AS2 and AS3 is generally the same, so I'm starting to wonder how hard it would be to port the current codebase to Fl...

How to organize a complex Flash project

Let's compile a list of tips. (Understandably there will be some subjectivity involved, but some pointers would be useful to someone overwhelmed by tackling a large project within the Flash framework.) ...

What's the cleanest way to simulate pass-by-reference in Actionscript 3.0?

Actionscript 3.0 (and I assume Javascript and ECMAScript in general) lacks pass-by-reference for native types like ints. As a result I'm finding getting values back from a function really clunky. What's the normal pattern to work around this? For example, is there a clean way to implement swap( intA, intB ) in Actionscript? ...

Flash hyperlinks spacing error

I have a weird bug involving Flash text and hyperlinks, htmlText in a TextField with <a> tags seem to truncate surrounding space: Once I place my cursor over the text, it "fixes" itself: Here is the HTML in the textField: <p>The speeches at both the <a href="http://www.demconvention.com/speeches/" target="_blank">Democratic Nation...

Lack of operator overloading in ActionScript 3.0

One of the things I miss the most in ActionScript is the lack of operator overloading, in particular ==. I kind of work around this issue by adding a "Compare" method to my classes, but that doesn't help in many cases, like when you want to use things like the built in Dictionary. Is there a good way to work around this problem? ...

displaying HTML inside a Flex application.

I have some HTML that is generated via a Rich Text Editor outside of my Flex application but would like to display it inside Flex. The HTML is simple HTML tags, things like styles, anchors, and possibly image tags, is there a control that would let me render this HTML in flex or am I going to have to roll up my sleeves and roll my own?...

Accessing a web service in a Flash CS3 AS3 project.

Since CS3 doesn't have a web service component, as previous versions had, is there a good, feature-complete, AS3-only (no Flex dependencies) library for accessing web services with AS3? ...

Open Source Actionscript 3 or Javascript date utility classes?

I was wondering if anyone could point to an Open Source date utility class that is fairly robust. I find myself rolling my own when I want to do a lot of things I take for granted in C# and Java. For instance I did find a decent example of a DateDiff() function that I tore apart and another DatePart() function. Another examples would be ...

Best way to implement 1:1 asynchronous callbacks/events in ActionScript 3 / Flex / AIR?

I've been utilizing the command pattern in my Flex projects, with asynchronous callback routes required between: whoever instantiated a given command object and the command object, the command object and the "data access" object (i.e. someone who handles the remote procedure calls over the network to the servers) that the command objec...