Never mind, Alex pointed out that you included the code at the bottom of
your email.

 

When you bring a symbol across from CS3 in flex using Embed, we strip
off code and replace it with an implementation that allows it to be
usable as a skin.  If you need to keep the code on the symbol, you need
to bring it across as a SWC instead.

 

So, try this:

 

1)      Open the publish properties in CS3.  In the flash options
section, click the 'export SWC' checkbox.

2)      Give your symbol a linkage id of 'Foo' (or whatever you want).

3)      Publish your SWC.

4)      Place the generated SWC in the lib path of your flex app.

5)      In your code, set the source of your SWFLoader to Foo (no
quotes).

 

That should work.

 

 

Generally, when bringing assets from CS3, use the following guidelines:

1)      Is this asset going to be used as a skin?

a.       Yes? Then does this asset have code associated with it?

                                                               i.
Yes? Then use the Flash CS3 component integration Kit.

                                                             ii.
No?  It's safe to use Embed() (or the CS3 Component integration kit).

b.      No? Do you want it to live in flex containers?

                                                               i.
Yes? Then use the Flash CS3 component integration kit.

                                                             ii.
No? Then it will be the source of an image/SWFLoader, or a child of a
custom UIComponent.  
Does it have code associated with it? 

1.       Yes?  Then make a SWC, and use the lib-path to bring it in.

2.       No? it's safe to use Embed() (or make a SWC, if you like).

We realize this decision tree is a little bit more complicated than we'd
like it to be, and are looking into improving it.

 

Ely.

 

 

 

 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ely Greenfield
Sent: Monday, September 24, 2007 1:03 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Flex ignoring Actionscript Timeline Actions

 

 

 

 

-          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