actionscript-3

Flash player loads on initial pageview, but incomplete load when cached

I have a strange flash player problem which seems to be most apparent in FireFox (3.0 and 3.5, on PC). Visit the page: http://prnewswire.com/container/tgifridays/tgifridayssocialmedianewsrelease-woody-jackdaniels/ On the initial page load, you should see a flash video player, with a paused video,and when you mouse-over the video you...

How to give dynamically created buttons actions for each one

Hi, first time posting here. I'm using a loop to create 3 buttons, but my problem is assigning the button actions to each button. My button listener/action code only works on the last button created :( I tried to target buttons by the name that I gave them ($navButton.name = "button" + i) but that threw up an undefined error for button1...

MVC-ish : Who is responsible for loading the data?

I just got out of a small project and I've tried to follow a somewhat domain-driven design (well, what I think it is...). I've struggled a bit were some of my domain class started to need to load something. I'm not sure this is the right place for it. Let's take for example a boring image slideshow. For my domain classes, I would define...

xml in actionscript 3

Im using the following code to make a simple countdown time for a website: //Create your Date() object var endDate:Date = new Date(2009,8,5); //Create your Timer object //The time being set with milliseconds(1000 milliseconds = 1 second) var countdownTimer:Timer = new Timer(1000); //Adding an event listener to the timer object countdow...

Simulating engine noise in Flash 10

I'm working on a "retro" motorbike game in flash, similar to the Road rash series on the mega drive and after having a long play with the sound sampling capabilities of flash I can't manage to find the "right" way to generate the noise. I've been trying to basically change the frequency on a sine wave in line with the revs, so as the re...

AS3 code feedback

I have just started coding in AS3 and it would be really great to get some feedback from the experts; on my coding style, things I'm doing wrong, thing I can improve on, best practises, and so on... Also if you have some extra tips or tricks, that would be great. Here's my first bit of AS3 code, took me 5 hours, puh: package { import...

Controlling Movie Clips from the main time line instead of using their individual time lines?

I have a Flash website template (four pages) that I made using AS 3.0 and Flash CS4. It is for an assignment involving movie clips. Currently on the main time line there is only one frame, and three layers: actions/menu/content. The actionscript on the main time line is simply: content_mc.stop (); There is a movie clip on the stage c...

Flex, AIR: Search for .pdf files in specified folder

I need ActionScriot code that will parse a given folder and search it for .txt files. Any links or code samples will be helpful. (Adobe Flex 3.3/AIR) Thanks, Sri ...

Best IDE for ActionScript 3 coding.

What do you think which is best IDE for coding ActionScript-3 with most of the support.. I know following IDEs..If anyone knows any other better... Flash CS3 - horrible - but have to use to debug! FlashDevelop - My favorite Seppy - No much AS3 support FlexBuilder - Heavy on system ...

How to implement 'domain protection' in ActionScript 3.0

I want to limit my SWF file so that it cannot be stolen and hosted on another server. So if the domain serving the SWF file isn't on a list of approved domains, the SWF will not load normally but will instead display a message that links to one of the approved locations. What I'm unsure about is how to access the domain that is hosting t...

as3 - dispatchEvent from a parent swf to a child swf

I have one main "parent" swf that loads several other swfs. If something happens in the main swf I need to tell one of the child swfs about it. This seems to work well the other way around. Any of the children can simply dispatchEvent(), and I can set up the main swf to listen for the event. However, I can't get the child swf to catch a...

Calling addChild() from children? Children add themselves?

With the display list in Actionscript 3.0, I'm often inclined to have children add themselves to their parent because they often already have that reference. That would look like: _myParent.addChild(this); or when removing... this.parent.removeChild(this); By the wording of the addChild() syntax, this way seems backwards -- ...

Does removeChildAt() clear up cpu resources?

I am loading/unloading several swfs from one main swf. When I load a new swf I do something like this: contentContainer.addChild(the new swf); //add the new swf contentContainer.swapChildrenAt(0,1); contentContainer.removeChildAt(1); //remove the previous swf My question is, when I removeChildAt(), does the old swf keep "playing" and ...

Refering a component id throw a variable

I'm developing a flex application and I want to access a component by using it's id. I know I must use .property of the component. The problem is I have the component Id in a String var and now I don't know how to access to it's properties. Does anybody know what I have to do? ...

flash vertical menu - adding code for scrollpane

I got a flash vertical menu which has auto scroll but it scrolls too fast and the only way to slow it down is to increase the height of the button. I would like to replace the code with a scrollpane so i can control the menu : CODE:: ** CODE CHUNK I NEED TO REMOVE - THEN ADD THE ADDITIONAL SCROLLPANE CODE- i hope** menu_mc_Europe.onEn...

flash as3 - one video object, multiple video files

I have one video object and 3 thumbnails which, when clicked, will play different video files. What is the best practice for this situation? Currently I have one net connection, one net stream, and one video object. When a thumbnail is clicked, I just say ns.pause(), then ns.play(video2.flv). This sort of works, except if I play video1....

Display AxisRenderer outside Flex Chart

Hi, Is there a way to display the Vertical Axis outside the graph? I need the limits of the graph to be displayed between the vertical axis, without overlapping the series over the graph. See that screenshot of what I have: I need to get something like: Or I should create a custom axis renderer component that get data from this g...

What is a good Flash Socket Server for a Newbie?

I have been debating which Flash Socket Server to use for a virtual world (multiplayer game). I want something that has a very abstract api and requires little to no server side programming. From what I see only Smartfox and ES sort of cater to game development. I'm open to any suggestions and if anyone knows which API is easier to le...

Flex Dynamically Created Components Added to Custom Components

Hi I am created a dynamically adding a VBox, that contains two images. Into a Custom Component that is derived from UIComponent. The problem is the Vbox that contains the two image is only a really tiny size. I would like the VBox stretch to the size of the two images. This is how I am creating the Vbox.... var open:Image = new Image(...

How can I add new line to a dynamic text in Flash using AS3

How can I add new line to a dynamic text in Flash using AS3 ...