flash-cs4

Convert an XML node to a MovieClip

I have an xml document that I would like to use to show MovieClips in my .fla: <linkedMovieClip>TestClip</linkedMovieClip> In my .fla, I created a symbol called TestClip and select Linkage > Export for Actionscript and named it TestClip. My code in my Document class traces the xml: var t:*= getDefinitionByName(String(slideItem.linke...

stopping on the last frame (flash)

I want my movieclip to play once and stop on the last frame. I use the following code in the loop of my movieclip class. (this is as3) if(currentFrame == 120) stop(); 120 is the last frame. It plays once. but the problem is it goes back to frame 1 again. is there a better method of stopping a movieclip on a particular frame. ...

Flash AS3 error when importing 3D-tweened movieclip

I've been working on an AS3 application and it's nearing completion. At the same time, one of the designers I work with has been building a movieclip in a separate .fla that acts as an intro animation to the application. The intro uses the 3D motion tweening capabilities of Flash CS4 / Player 10, and runs fine in the .fla in which it w...

How do I slowdown an animation in AS3 without decreasing the fps

I have this code that I found online that does an infinite rotating gallery, now my problem is that on enter frame it jumps and too fast. I want it to be as fast at after you hover out of the logo. Here is the code: //Import TweenMax import com.greensock.TweenMax; //Save the horizontal center var centerX:Number = stage.stageWidth / 2;...

Loading .bmp and .tiff file in Flash 10 using loader

Hi, I am developing a Image uploader using Flash 10. I am using Filereference object to browse images and Loader to show the image: Sample code: var tempFileRef:FileReference = FileReference(ev.target); var oLoader:Loader = new Loader(); oLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoad); oLoader.contentLoaderInfo...

Actionscript 3.0: keyboard events and a remote presenter

I have a simple Flash movie with the following code. The idea is to move from one frame to the next or back using the arrow keys on the keyboard: stop(); //listen for key press stage.addEventListener(KeyboardEvent.KEY_DOWN, myKeyDown); //if left or right arrow, go to previous or next frame function myKeyDown(e:KeyboardEvent):void { s...

Using external movieclips in Flash CS4 (Actionscript 3)

I'm building a Flash CS4 application (AS3) and I can't keep all my movie clips in the library because there will be hundreds of them, and new ones will be added all the time. Two parts to the question: How can I externally load in a movieclip to use during run time? After loading I still need to be able to manipulate it as if I creat...

Keyboard Control on characters made with Adobe CS4 Bone Tool ?

Is there any way to control a character made with Adobe CS4 Bone Tool via keyboard buttons? Its limbs are linked up by IK chains built by Bone Tool. ...

ActionScript controls Flash Bone Tool models to "bounce" realistically

Question 1: How to use ActionScript to control Flash-made-bone models to bounce realistically? My intention is to give audience the feeling of weight of the model. (Given that I know how to move the bones with IKMover.) Question 2: My 2nd question is about the options of Armature of the bones. When I switch to Authortime mode, the Actio...

Package external files into flash deliverable?

Is it possible to package all external files, such as images and videos, into the final .swf or equivalent file? I want to keep the external files separate because it is easier to change them out while developing, but I don't want them to be external when delivering the project. Does anyone know if this is possible? ...

LocalConnection working in local browser but NOT in remote site

Really puzzled by the flaky behavior of LocalConnection. Using a debug utility(LuminicBox) that uses localConnection to work. When the page containing the swf is loaded in a browser locally , localConnection works. When the identical page and swf are viewed 'live' on a remote site, localConnection fails. Anyone encounter this?? ...

Is there a way to get the file path of a live preview in cs4?

I have a component that is supposed to load in an xml file and display it. I have that working however now I need the live preview to work as well. Is it possible to load a file into the livepreview? It seems the breakdown is that the live preview can not see it's file location, so it can not path to the files to load. Thanks! ...

(Actionscript) Wave-like animation on objects

I have different cards, I need to reveal them in a wave like form, i.e. the cards open and close at different timings sequentially and systematically such that they form a wave. I have the cards in an array alr. How do I implement this animation in the most efficient way? Thx! ...

Best way to dynamically load an xml configuration file into a Flex4/Flash movie at runtime?

I've got a rather simple question about loading in an xml file at runtime in a SWF. I've found a couple different methods to load in the xml. myXml.load("file.xml"); HTTPService object URLStream object What is better way to load an xml file that always has the same name and is located in the same folder as the SWF on the web serve...

FMS connection.closed solution?

I have a problem in as3 video player with fms connection time out as what the discussion is going.Please help me to solve this problem. its often connection getting closed. what i should do. ...

Flash buttons take focus off of screen

In my flash movie, every time when I click on a button, it takes focus off of the stage. And I have to reclick the stage in order to interact with it again. Is there away to fix this issue. I am making a game and it will be very annoying if the player has to keep reclicking the stage in order to take control of the game every time they c...

Using the 4x4 Matrix3D from flash10 for non-affine 2D transforms

Hi! I've been having a very tiresome time when using flash10's Matrix3D class for 2D non-affine transformations. Basically, I have a square in a sprite and four points that form a quadrilateral, and I want to apply a transformation to the sprite to make those points the vertices of the sprite. There wouldn't be much problem solving thi...

ActionScript -- How do u make sth move somewhere and move back?

Using Tween class maybe? I tried the easeOut. But if will write 2 Tween, the 2nd one will overwrite the 1st one, so I only see the obj moving in the 2nd Tween direction, not the 1st Tween direction. I know the coordinates for the 2nd Tween below is not correct (cos all coordinates shld follow the defined reference point), so I need to f...

slowly rotate an object towards another object

I have an object that points in the direction of another object (i.e. it rotates to the direction that the second objects x and y coordinates are at) below is the code I use. var distx = target.x - x; var disty = target.y - y; var angle:Number = Math.atan2(disty, distx); var vx:Number = Math.cos(angle) * cspeed; var vy:Number = Math....

How to link library symbols in Flash CS4 to base classes from an external .swc (rsl)?

Hi all, This question stems from this question that I asked yesterday. I've followed Theo's advice and created a .swc with all the common classes and added the .swc as an external library to my module .swf. This all seems to have worked smoothly--I don't get TypeErrors and my classes are all present in the catalog.xml of the .swc file w...