What happens if you don't embed humanGuy and load it externally?

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of thegiffman
Sent: Monday, September 24, 2007 12:34 PM
To: [email protected]
Subject: [flexcoders] Flex ignoring Actionscript Timeline Actions

 

Hi Folks,

I'm running into what appears to me to be a fairly nasty problem. I
have a fairly simple animation I want to load into flex. It's a
little guy who jumps and waves his hands. The first frame in flash
CS3 is an idle frame with a stop, then the "jump" animation (ended
with a gotoAndStop(1)), then the "hi" animation (ended with the same
return to idle). The swf is exported in AS3, and I bring it into flex
using a SWFLoader and the following code.

Flex seems to completely ignore any actions on the flash timeline -
the animation, which in the swf starts as idle, now plays continually
through the timeline. I can control the animation using flex by
calling "gotoAndPlay", but it will then simply loop forever. This is
bad - very bad for any sort of application that uses flash animations.

I have 2.0.1, lest anyone suggest that. So - any suggestions?

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> "
layout="vertical" xmlns:com="com.*">
<com:FlexPerson id="person" />
</mx:Application>

package com
{
import mx.controls.SWFLoader;

public class FlexPerson 
extends SWFLoader
{
[Embed(source='../humanGuy.swf', symbol="PersonContainer")]
public static var PersonClass:Class;

public function FlexPerson():void
{
super();
this.trustContent = true;
this.source = PersonClass;
}
}
}

 

Reply via email to