actionscript-3

getting image size in actionscript

Can i get the height of an image from its url info in Actionscript 3. I have the image url. I want to draw the image in my UI and i want to set the height of the drawing area dynamically upon getting the image. ? ...

how can i start a video from a specific second in as3

hi, i have a problem about action script 3. i have a flv video and its totaltime is 6 seconds. i want to start it from 2. seconds with seekSeconds(). if i write bigger than 6 values in seekSeconds it will only play the video from head to end.İf i write smaller than 6 ,it won't work.what can i write in seekSeconds() to start the video fr...

Editable List for AS3

I'm looking for an editable list that allows users (not programmers!) to rename items by double clicking and typing within a textbox that should appear. Here's what I tried out: Flash CS3 List - no renaming Flex List - cannot rebuild my entire application within a Flex App. Too much trouble. Yahoo Astra Tree - no renaming! Do you kn...

How do I reference xml nodes in AS3 whose names are keywords, like <object>x</object> or <name>x</name>?

I'm trying to parse some xml in AS3, but the nodes I'm trying to call up are named keywords like 'name' and 'object'. Can I escape these words somehow? ...

Alternative to as3isolib?

Hi everyone, I've been working on a Flash game that involves an isometric space. I've been using as3isolib for a while now, and I'm less than impressed with how easy it is to use. Whether I'm approaching it the wrong way or it's just not that great to use is a question for another post. Anyways, I've been thinking of a different way ...

Validate DataGridColumn cells individually

How can I validate the cells in a DataGridColumn individually? (ActionScript 3.5) The validation is configured per-cell, based on fields in the given row. For example FIELD VALUE TYPE age 13 Integer height 13x3 Integer registered true Boolean temperature 98.G6 ...

Moving Flex MXML Application into Flash

is it possible to move a flex mxml project into flash? i have the project complete in mxml with actionscript but due to the fact that flex is limited in its visual animations ( no timeline! ) i would prefer to switch to using flash. the project is relatively huge, all done in mxml and i cant just re-create it in flash, it will take mon...

getting some part of the stage??

hi, i'm using jpeg encoder script. in the script example, a movie clip is converted to jpeg. differently i want to convert the stage but only some part of it such as x:320-500, y:0-600. is it possible? function createJPG(m:MovieClip, quality:Number, fileName:String) { var jpgSource:BitmapData = new BitmapData (m.width, m.height); ...

Flex 4 Dates, Bug or what? im so confused

Hi I'm not sure whether it's a bug or what. But it's making my life worse. I'm doing a Flex 4 application that has a calendar component in an invisible 'state' when I pass comp2.selectedDate(2006,2); and debug at line 3, date has only 2006 year and 0 month. Why so? Why isn't it getting month = 2 as well? Thanks in advance public fu...

How to add Facebook Like button to a Flex app?

I am working on a Flex AS3 application and wanted to add the Facebook Like button inside the app. I am unable to find any API or anything apart from the http://developers.facebook.com/docs/reference/plugins/like code generator. Any ideas on how this might be accomplished? I am quite new to the recent changes in the Facebook Platform, s...

How to start with an own flash animation in AS3?

I'm trying to learn actionscript, and I want to create a flash header for my website, but i have no idea how to begin. I read some books with actionscript 3 in the last few months, and i can do everything whats led by a tutorieal or an article about something, but just dont know how to start with an own one. Could you suggest me someth...

Is their a way to convert DocX, OpenXml, or RTF to TextFlow in AS3?

Basically we want to be able to open up a docx file in as3 or Flex 4 and convert it to a text flow while preserving formatting, embedded images, tables, columns, etc. I know theorectically it's possible as the new Text Layout Framework is powerful enough to pull it off, but I haven't been able to find any case where someone has achieve...

How can I pass an array from PHP to Actionscript 3/Flash?

Here's what I have in PHP: for ($i = 0; $i < 355; $i++) { echo "vote"; echo "$i"; echo "=$votesArray[$i]"; if($i != 354) { echo "&"; } } Which should send data to Flash that looks something like "vote0=2&vote1=5&..." and so on. Here is the Actionscript 3 side: var i:int; for (i = 0; i < 355; i++) { ...

Action Script 3.0 calling other layer

I created simple web site .That includes on main scene 3 layer. one Buttons,Actions and Pages.In buttons layer I created new 5 button and connected them as a movie clip.In button movie clip I added new layer for actions.All of them works normal.But when I press button I want to move my Pages layer to next one or one of frame.But gotoAndS...

AS3 Loading XML from a different domain

Hi I am trying to load an xml file from wikipedia into my flash movie. loader = new URLLoader(); loader.addEventListener(Event.COMPLETE, tweetLoaded); loader.load(new URLRequest("http://en.wikipedia.org/w/api.php?action=query&amp;rvprop=content&amp;format=xml&amp;pageids="+subNum)); loader.addEventListener(IOErrorEvent.IO_ERROR, onIOEr...

Drying out/refactoring flex/actionscript code

I have something like 10 components that have code that's very similar, except for the target that it's applied to and some other minor differences. For example, I return xml to component1 and component2 that differs in this way: component 1: event.result.names.name component 2: event.result.phones.phone I then bind these to a List, ...

Problems with using MXML components as ActionScript classes

I have two MXML component files and try to work with them as classes. One of them has a simple function: GUIFriend.mxml <mx:Script> <![CDATA[ public function createName(f:Friend) { return 'friendProfile: ' + f.uid; } ]]> </mx:Script> And the other tries to use it: GUIFriendContainer.mxm...

Compiling with Flex4 SDK

I'm trying to compile an existing Flex3 project with the Flex4 SDK. I'm getting this error: Warning: This compilation unit did not have a factoryClass specified in Frame metadata to load the configured runtime shared libraries. To compile without runtime shared libraries either set the -static-link-runtime-shared-libraries option to tru...

Mouse coordinates action

Is there a way to do it in Flex to say: if mouseClick x<300&y<200 currentState=''; Thanks, ...

ActionScript 3 - Tweening rotateAroundExternalPoint

i'm unsuccessfully trying to rotate a rectangle around an external point while tweening. i'm trying to lock the top of the red rectangle to the line while it tweens from left to right and rotates from 0º to 90º. the image above shows 3 states of the tween. state 1 shows the red rectangle at the start of the line with no angle. stat...