actionscript-3

Can I start or seek to sub-second intervals with NetStream?

I am working on a Flash Video player and am implementing the ability to start a video at x time within the span of an FLV (served from FMS). I am able to start it x seconds into a stream without any issue using netStream.play(source, startTime); but as far as I can tell, it only supports seconds. I am looking to be able to give a star...

Problem getting variables from Class and passing a reference of that Class

Hi everyone, once again I'm getting plagued by the dreaded Flash error: Cannot access a property or method. I'm building a new video player and I need to send the total width of my progress bar(created in PlayerControls.as) to my VideoPlayer.as class. As well as control the width of the progress bar from an update function inside my Vid...

Flex tree droplocation indicator stuck (edit 2/4/10, almost a totaly different question)

OK I've got a little more research on this done so I'm going to totally rephrase the question: I have two trees, I want to be able to drag items from one tree to the other. In the receiving tree I have some logic that allows or denys the drop. I am using the native cursor feedback Like this : DragManager.showFeedback(DragManager.COPY); ...

RGB gradient based on percentage of file loaded

I'm working on my first Flash project, and for my preloader I'd like to do a really simple gradient based on the percentage loaded. The preloader says "77% loaded...", where the number 77 is a dynamic text instance called percentLoaded. I'd like the textColor of percentLoaded to change on a gradient from #000000 to #FFFFFF, in gray-sca...

Problems passing functions in flex / actionscript 3

I'm new to flex and I am building a wrapper class for the WebService object to make my main code mxml cleaner. I am trying to pass a function to a class method to set as the result event handler for the soap call and it is not working as expected. Here is the class: package { import mx.rpc.events.ResultEvent; import mx.rpc.soap...

Flash - Button control

I am doing a simple Flash button that controls the playing of a moving clip. I want the movie to go to frame one and play when I mouse over the button and I want it to go to frame 12 and play when I mouse out. I have stop(); at frames 1, 12 and 25 to prevent looping. The mouse_over part works fine, but the mouse_out part is unresponsi...

Can you increase the visual size of a flash cs3 Checkbox Component?

I want to use the checkbox component in my flash app, but it's really tiny. According to this article 1, the size and scale parameters only affect the invisible bounding box. Does anyone know of a quick solution on how to scale up (enlarge) the visual area of the checkbox component in flash CS3? ...

a PROGRESS event when uploading ByteArray to server with AS3 & PHP

I'm currently creating a series of as3 / PHP classes that upload - encode + download images. Anyone know if there's a way to report progress while posting a ByteArray to the server? the ProgressEvent is not working - at least not in the case of uploading a ByteArray - it reports progress only after it's been uploaded here's a stripp...

Flash (AS3) doesn't like draw method, but only when swf is run on server?!

I have a swf (AS3) that runs fine locally, but when I put the swf on a server and run it in a browser, it crashes when it tries to use the draw method: var bmp:BitmapData=new BitmapData(ldr.width,ldr.height,true,0x00FFFFFF); bmp.draw(ldr); ldr is a Loader that has at this point successfully loaded a jpg from some other server. I can a...

AdvancedDataGrid hell: data on grouping rows

I need a hierarchical grid that shows data in columns for the parent rows as well as the child rows. - a parent | 1234 | data | data | a child | 2222 | data | data | a child | 212 | data | data | I've tried to make ADG work, but by default it has all columns except the grouping column blank for parent rows. I think I could use ...

Returning a byte string to ExternalInterface.call throws an error

I am working on my open source project Downloadify, and up until now it simply handles returning Strings in response to ExternalInterface.call commands. I am trying to put together a test case using JSZip and Downloadify together, the end result being that a Zip file is created dynamically in the browser, then saved to the disk using Fi...

Flex 3 event bubbling set to false.. how to make it bubble then??

I have a flex app with lots of nested views and popup windows.. I'd love to catch all the CHANGE events in the application at the top level.. all of them, simply to notify the user that he has changed something (trust me it makes sense in my app). Now, I tried to add an event listener in the Application creationComplete handler like thi...

What kind of algorithm does an HTML SELECT element uses to show results as you type?

I'm trying to replicate an HTML SELECT element (drop-down-list or combobox) in Flash (AS3). In most browsers, when you have one in focus and you type something, the combobox will try to find the value within its options and show the closest one. I was wondering what kind of algorithm is used for that. I don't think its Levenshtein or si...

How to make them all the sam speed (AS3)

I currently have an animation that rotate infinitely but it's just too fast to begin with... I tried lowering the fps to 12 but it would just be skip.... Is there a possibility to make the animation slower by this code: //Import TweenMax import com.greensock.TweenMax; //Save the horizontal center var centerX:Number = stage.stageWidth /...

403 Forbidden: The server understood the request....

Building an actionscript Twitter client and using OAuth for the sign in process. Having an extremely frustrating issue with the following error message. '403 Forbidden: The server understood the request, but is refusing to fulfill it.' The following 2 steps ALWAYS work after I click my 'Sign In with Twitter' button, I make it to the T...

Flash AS3 for loop query

I was hoping for a way that I could save on code by creating a loop for a few lines of code. Let me explain a little, with-out loop: icon1.button.iconLoad.load(new URLRequest("icons/icon1.jpg")); icon2.button.iconLoad.load(new URLRequest("icons/icon2.jpg")); icon3.button.iconLoad.load(new URLRequest("icons/icon3.jpg")); icon4.button.ico...

Displaying Flash output window data into text field

Hi, is it possible to display the output window's contents into a textField so it can be seen in the SWF? Has anyone tried this? ...

Flex4, centering and resizing a image inside a group container

I'm looking for the best way to get a flex 4 image object to resize and horizontally center whenever its parent container (a custom component based on group) resizes. I cannot set horizontalCenter="0" to accomplish the image centering because I use a move transition to "slide" the image in and out of view. I'm externally setting the im...

atom feed xmlns attribute messes up AS3's XML-parsing?

Wanna see something interesting? var xml:XML = XML(<feed><entry /><entry /><entry /></feed>); trace(xml.entry.length()) // returns 3 Makes sense, right? Now let's add this attribute... var xml:XML = XML(<feed xmlns="http://www.w3.org/2005/Atom"&gt;&lt;entry /><entry /><entry /></feed>); trace(xml.entry.length()) // returns 0 We...

Properties undefined at their definition (1120 error)

I've got a truly bizarre undefined error going here in my ActionScript (code simplified here): package { public class Main extends Sprite { private function Test() { var testVar:Number = 10; } } } This returns an error: 1120: Access of undefined property testVar on line 4. If I'm reading that corr...