-          Is your CS3 SWF using AS2 or AS3?

-          Are you bringing it into Flex a) dyanamically, at runtime, as
a loaded, played swf, b)  dynamically, at runtime, as a class pulled out
of a loaded SWF, c) statically at compile time, by embedding a SWF, or
d) statically, at compile time, by exporting a SWC from CS3 and placing
it in your lib path?

 

Ely.

 

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of thegiffman
Sent: Monday, September 24, 2007 12:34 PM
To: flexcoders@yahoogroups.com
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";
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;
}
}
}

 

<<image001.jpg>>

<<image002.jpg>>

Reply via email to