We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

flex includes flash

yarekGmail
yarekGmail asked
on
Medium Priority
636 Views
Last Modified: 2013-11-11
Hello
FIRST, rename the attached file to danse.SWF -it is a FLASH file, not a BMP, but EE does not allow uploading SWF files!

Here is a Flash10 files which includes BONES in RUNTIME. (open it with FLASH10 for bones interactions)

It works fine : you can move arms and legs !

When I do include this to FLEX (FLEX4 SDK), it is just a still image with no bones interaction.
My question is: HOW to include BONES in RUNTIME in FLEX ?

regards
danse.bmp
Comment
Watch Question

Commented:
Hi

How are you importing it into flex?

-null-

Author

Commented:
<mx:Image src="danse.swf" />
Commented:
Hey

Whilst mx:Image can load an SWF file, it is used for displaying static content, which is why you are seeing an image of your swf movie.

Instead you need to use the mx:SWFLoader tag:

http://livedocs.adobe.com/flex/3/html/help.html?content=controls_16.html

hth

-null-

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
I do not think mx:SWFLoader  will change anything:

I found that on
http://www.mad.com.au/blog/?tag=inverse-kinematics

Tip - loading a swf with a Bones Armature (IK) into another swf
Monday, November 10th, 2008
A few people have asked me how to load a swf file that contains an armature, into another swf file. If you just try to do it the armature doesnt work. The trick is that you need to register the armature in the loader file. I have attached a couple of very simple files to demonstrate. The bones.swf contains a simple armiture set to Runtime. The loader.swf loads the bones.swf and registers the armature. For more info check out the new IK class in Flash CS4.


import fl.ik.*;
import flash.display.*;

//load the bones swf
var request:URLRequest = new URLRequest("bones.swf");
var loader:Loader = new Loader();
loader.load(request);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, init);

//set up the vars
var boneClip:Sprite;
var myArmature:IKArmature;

function init(e:Event):void{
      //add the clip to the stage
      boneClip = Sprite(loader.content);
      addChild(boneClip);
      //set up IK
      IKManager.setStage(stage);
      myArmature = IKManager.getArmatureAt(0);
      myArmature.registerElements(stage);
      IKManager.trackAllArmatures(true);
}


TROUBLE IS:

import fl.ik.*;

THAT NOT WORK ON FLEX : THERE IS NO SUCH LIBRARY !

Author

Commented:
I tried with SWFLoader  : STATIC image as well !
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.