Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 620
  • Last Modified:

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
0
yarekGmail
Asked:
yarekGmail
  • 3
  • 2
1 Solution
 
-null-Commented:
Hi

How are you importing it into flex?

-null-
0
 
yarekGmailAuthor Commented:
<mx:Image src="danse.swf" />
0
 
-null-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-
0
 
yarekGmailAuthor 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 !
0
 
yarekGmailAuthor Commented:
I tried with SWFLoader  : STATIC image as well !
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now