actionscript-3

move a displayobject based on another objects rotation

Ive probably ran into some code like this before. just cant remember where. I have 2 display objects on my stage. One is rotating and the other is positioned 90 degrees from the rotating object. As the object rotates, the other object adjusts its x and y positioning from the rotating object.. If this doesnt make sense, then let me expla...

underline line thickness always one pixel...

...regardless of font size. Its an mx:Text object. (The Text object is actually being used as a mask so don't know if that's the problem.) If underline is set with the <u> tag in Text.htmlText, or Text.textField.setTextFormat, the underline thickness is always just one pixel which is not acceptable. (There are other problems with <...

How do I create variable paths using e4X?

I need to know how I can parse a variable path in Flex 3 & e4X. For example, I have two XML strings where the name of one element is the only difference. <NameOfRoot> <NameOfChild1> <data>1</data> </NameOfChild1> </NameOfRoot> <NameOfRoot> <NameOfChild2> <data>2</data> </NameOfChild2> </NameOfRoot> Cu...

Getting domain in AS3

I know how to get the URL of the page, but how can I extract simply the domain and the domain alone? It must return the same value with or without www, and it must also return the same value regardless of file, with or without trailing slash, etc. So www.domain.com would return domain.com, and domain.com/index.php would return the same...

underline cont.

This is a continuation of the question below. Basically I discovered its no problem at all to draw lines or shapes or whatever directly onto an mx:Text object using its graphics property (Text.graphics.lineTo, etc.). If just displaying that text, then any such drawn lines are displayed as well. However, if that Text object is used a...

testing flash movies performance agaisnt range or computers and browsers

I am half way done with making my first flash web game. I put alot of work into it and dont really know how great the performance will be on browsers and range of different types of computers. This is my first time working with flash in general. I was wondering if there is any tools to test my game out against browsers and hardware. The ...

Flash as3 process XML Doctype Entities

Hi there, i've got a XML similar to the following example: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE descriptor-layout [ <!ENTITY prefix "http://www.myurl.com" > ]> <xml> .... </xml> the prefix Entity is used in several tags like this: <child src="&prefix;/mypath/mydata.xml" /> So my question is, wether there is any...

Parse XML in Actionscript

Hi, I need to parse an XML like this: <?xml version='1.0' encoding='UTF-8' standalone='yes'?> <pictures> <pic> <name>clouds1</name> <file>clouds1.jpg</file> <date>20/12/09</date> </pic> <pic>..........</pic> .... </pictures> using ActionScript. I have this: constructor{ var loader = ne...

Actionscript 3 ExternalInterface, Pass variable to javascript?

Hi, How would I go about passing a variable to a javascript function using ExternalInterface? ...

Flex DataGrid / ArrayCollection sorting

I am attempting to create a resortable data grid in FLex 3. I have the grid set up and have accomplished the drag and drop functions as necessary but i need to get the row index of an item based on the data in the rows. The datagrid is being used as a playlist and the current index (before sort) needs to be updated with the index of i...

Sorting in Advanced Datagrid

Hi, I have a Advanced Datagrid with sorting. I think it is string sorting by default. But i need the sorting in number. How can i achieve the number sorting. for example: i have row numbers like 1 to 100 . i need number sorting like 1,10,100. thanks, ravi ...

How set background of row dynamic using flex?

Look my source: Template: [code] <mx:Script source="ListStatus.as" /> <!-- Template --> <mx:DataGrid id="grid" width="100%" height="100%" doubleClick="editRecord();"> <mx:columns > <mx:DataGridColumn width="30" resizable="false" draggable="false"> <mx:itemRenderer> <mx:Component> ...

Actionscript 3 menu with active state

Ive got a simple menu that upon hover of each item, plays a movie clip, then on mouse_out it plays the movie clip in reverse. What I'm trying to do is to have a third state (active) that is shown upon clicking. I'm thinking I need to do something along the lines of: When clicked, gotoAndStop(5) //Five being the location of my active f...

FlashDevelop - training materials, tutorials, books (Flex/Flash development without FlexBuilder)

Hi, I want to start Flash/Flex/ActionScript development and got lost with the technologies, documentation and tools available. Searches pointed me to Adobe FlexBuilder and Adobe Flash (Designer, CS3, CS4). Then, I found FlashDevelop, learned that Flex SDK and compilers are free. Also, you can make a complete Flash application in FlashD...

ActionScript 3 Object to name value string

In a Flex application I am trying to turn an Object into a QueryString such as name1=value1&name2=value2... But I am having trouble getting the names of the Objects children. How do I enumerate the names instead of the values? Thanks ...

How do I filter out secific nodes of XML?

Take this XML example: <root> <grandParent GPid="1" hidden="false"> <parent Pid="1" hidden="false"> <child Cid="1" hidden="false"/> <child Cid="2" hidden="true"/> </parent> <parent Pid="2" hidden="false"> <child Cid="3" hidden="false"/> <child Cid="4" hidden="false"/> </parent> </grandParent> ...

How to make those fancy flash banners that expand beyond their box

Hi All, I am building a flash banner, which needs at one stage to expand beyond its 728x90 box. Something similar to the Corei7 ad currently on wired.com but not as drastic. I know ads like that are annoying, but getting evicted in winter is not an option. Viewing source on pages are difficult since they are almost always wrapped up in ...

Is there a way to time how long a function takes?

I have some function I want to time, but I have no idea how to do it. In javascript I can just get the current time in milliseconds, run the rest of my function, get the current time in milliseconds again and alert the difference. Viola, I know how long the function ran. In ActionScript, it runs everything at once, so my start and end t...

how big is too big for a swf file

I am making a flash game. And I want to know how big is too big for a swf file. Also, Ive been looking at my swf file and right now its at 38.2k. Is the swf file that gets created during debugging, is this the correct size for the file that will eventually be placed on the web. thanks ...

Flex AS3 Project Convert to CS4

Hi, Has anyone got experience in converting AS3 projects (no mxml) in Flex, to Flash CS4? Are there any resources out there as to what works in Flex Builder that doesn't work in Flash, and how to get the project running? I read somewhere that (for instance) certain Metadata tags don't work. If I've got all my code in the src folder,...