Link to home
Start Free TrialLog in
Avatar of yarekGmail
yarekGmail

asked on

flex includes flash

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
Avatar of -null-
-null-

Hi

How are you importing it into flex?

-null-
Avatar of yarekGmail

ASKER

<mx:Image src="danse.swf" />
ASKER CERTIFIED SOLUTION
Avatar of -null-
-null-

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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 !
I tried with SWFLoader  : STATIC image as well !