actionscript-3

Tween multiple filters Actionscript 3

I have a circular graphic that has 7 images on it. It needs to spin and stop on the next/previous image. It should spin through more than the 50deg required to get to the next/prev image so I added 360. This part works fine. But when I try to add some motion blur type effect during the spin, the spin sometimes stops without completing. ...

UIComponent base class not working

I have a BaseComponentClass that I am using as the class that all my custom components extend. For some reason, none of my custom components show up at runtime. I am not getting any compile or runtime errors either. I am implementing all the protected UIComponent methods. My code looks like this: public class BaseComponentClass extends ...

Changing the direction of a ball on collision base on speed

I am creating a ping pong game. And I want to create the ability to control the direction of the ball based on the impact on the paddle. If the ball is coming down at vy = 4; vx = 4; and the paddle is moving to the left at vx = -5; I want the ball to slightly change its course depending on how fast the paddle is moving. It would probabl...

AS3: Security sandbox violation

I want to go live with my site. ...but I need help with a security violation I am incurring. I've seen various threads on this forum regarding a crossdomain.xml file to include and link to, but I don't get it... no matter what I try I still end up with the same result. You'll note below that it is not recommended to use crossdomain hac...

Flex: Disable range on Slider?

I have an HSlider with a minimum of 1 and a maximum of 6. Is there a way I can disable the range 3 - 6, so the user can only select from the range 1-3 on the slider. Note: Your first thought might be to tell me to set the maximum to 3. I dont want to change the maximum to 3, I want the user to know there is more, but currently not selec...

AS3: grouping sprites

I have a handful of sprites that I am attempting to group together via addChild(). Here is some pseudo-code demonstrating what I would like to accomplish: import nav.text.TextSprite; spr1:Sprite = new Sprite(); spr1.graphics.clear(); spr1.graphics.beginFill(0x000000); spr1.graphics.drawRect(0,0,100,100); txt1:TextSprite = new TextSpr...

Bouncing a ball off the 4 walls of a stage

Just curious. When I bounce a ball off the walls of the stage using the following technique. if(y > sRef.stageHeight || y < 0) { yDir = yDir * -1; } else if ( x > sRef.stageWidth || x < 0) { xDir = xDir * -1; } x += xspeed * xDir; y += yspeed * yDir; The above seems fine and works well. But If I choose to use angles inst...

Flash Range Slider Component

Is there something similar to this jquery component in flash or are there any ready examples on how to do that? Thanks. ...

Counter variable in SQLite

I'm working on a simple todo app that has a column for each day of the week. On startup, the app checks to see if there are any incomplete tasks from before the current date. If so, they're moved to the top of the current date's column. The app is cloud-based, but the tasks are backed up for offline mode with an SQLite db. I can easily ...

Flash Dynamic TextFiled Font Issue on BOLD

Hi, am using AS3 and i have one dynamic text filed. The properties Fontname "verdana" size "14" style "Bold" it is shown the correct font in BOLD if there is no value if i assign values like priceText.text=" Hello Wold" It will not show the correct font properties am not getting the bold style :( What need to change? ...

Actionscript 3: Do you need to remove EventListeners?

In actionscript 3, I dynamically create objects to which I add EventListeners. These objects are added to arrays and might be removed again later. And others might be added later again. Each time I create an object, I add these EventListeners to them. However, is it necessary to remove these event listeners too, when deleting these objec...

disable mouse wheel scrolling while cursor over flex app?

Is it possible to disable mousewheel scrolling on my webpage while the cursor is over my flex application? My flex application is a map that allows user to zoom in and out using the mousewheel; however, when I put my flex app onto my webpage, the scrollwheel causes the page to scroll instead of zooming in and out... Edit: I have added...

Do you have to disconnect or somehow close http connection when using HTTPService

Hello Do I have to disconnect or somehow close http connection when using HTTPService in Flex. For one I notice that on the status bar of the browser (Firefox) I see (when I envoke HTTPService) Transfering data from (server name here), even after I get all the results back from the HTTPService. One other quick question regarding HTTPSe...

External Interface not available

Im testing a program in FlashDevelop, which uses Flash player 10. Need externalInterface to work, but on running this simple test program, it displays "ExternalInterface is not available". What might be the problem here? How do I get ExternalInterface working? http://blog.flexexamples.com/2008/03/10/checking-to-see-if-the-externalinter...

Flex 3 combobox: filter XMLListCollection datasource

(I'm using Cairngorm) I have a combobox that displays items form an XMLListCollection that's in my model. I want to only view the items (XML) whose "sent" properties is false.. like item.sent == 'false'. This filter must apply only to this specific combobox, not everything that's bound to the XMLListCollection source. And of course it mu...

Flash ScrollPane, why is my scroll width/height broken when loading a .SWF?

I've got an AS3 app making use of the fl.containers.ScrollPane object, and I am setting the source to an SWF file like so: myMc.scrollContent.source = "assets/something.swf"; When running the application, the SWF is loaded as expected, but both the scrollbars, vertical and horizontal have tiny scroll tacks, that when moved, causes the...

Dispatching events: Does listener inherit the caller's properties?

I notice in actionscript 3 that when a handler gets called, its able to access the senders properties. If I dispatch an event from my custom class. can all the listeners inherit all my public properties and methods? ...

removeEventListener for anon function in AS3

I need to disable an onClick action until an animation has stopped. Animations can be started by 4 different buttons - all need to be deactivated. I use a listener to pass params to the function that will initiate the animation which is why I use an anonymous function in the add listener: up.addEventListener(MouseEvent.CLICK, func...

Custom button component protected property

In my custom button component, I want to get a handle on the textField (The internal UITextField object that renders the label) in the Button so I can modify some properties on it. It exists as a protected var in Button.as How can I do that in my mxml component? ...

Flex: How to call function of embedded swf?

I have a Flex 3.4 app that embeds a swf with mx:SwfLoader... That swf has a public function named "playIt". I've tried dispatching events to gettingHere.content, casting gettingHere.content as a MovieClip and other stuff... var swfApp:MovieClip = MovieClip(gettingHere.content); if (swfApp.hasOwnProperty("playIt")) { var helloWorl...