RE: [Flashcoders] Question about SWC elements for use in Flex

2011-09-21 Thread jchilcott
If you don't need to use Flex, then it's all good. However, if Flex is
required, it's not really an arduous task to create a wrapper. We do
this this for various sprites developed in FLA's to maintain
reuseability throughout.

jord

 Original Message ----
Subject: Re: [Flashcoders] Question about SWC elements for use in Flex
From: "Eric E. Dolecki" 
Date: Wed, September 21, 2011 1:24 pm
To: Flash Coders List 

Thanks for your response. I have to weigh whether or not I want to jump
through the extra hoop or not (I can create a non-MXML app where I can
do
things straight away).

Thanks again,
Eric




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Question about SWC elements for use in Flex

2011-09-21 Thread Eric E. Dolecki
Thanks for your response. I have to weigh whether or not I want to jump
through the extra hoop or not (I can create a non-MXML app where I can do
things straight away).

Thanks again,
Eric


On Wed, Sep 21, 2011 at 1:11 PM, wrote:

> (I hate webmail apps... resent)
>
> addElement() is meant for display objects that extend the
> SpriteVisualElement class, which are a part of the Flex libraries. What
> you need to do if you want to use Sphere as you have made it, is to
> create a wrapper display object that extends SpriteVisualElement and
> have the wrapper add your Sphere object via an addChild(). You would do
> an addElement() on your wrapper.
>
>
> jord
>  Original Message ----
> Subject: Re: [Flashcoders] Question about SWC elements for use in Flex
> From: "Eric E. Dolecki" 
> Date: Wed, September 21, 2011 11:04 am
> To: Flash Coders List 
>
> If I make an ActionScript Project - things work fine. I link the SWC,
> import
> the asset's stub class & I can use it. However I can't figure how to do
> the
> same for a Flex Project or Flex Mobile Project yet.
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Question about SWC elements for use in Flex

2011-09-21 Thread jchilcott
(I hate webmail apps... resent)

addElement() is meant for display objects that extend the
SpriteVisualElement class, which are a part of the Flex libraries. What
you need to do if you want to use Sphere as you have made it, is to
create a wrapper display object that extends SpriteVisualElement and
have the wrapper add your Sphere object via an addChild(). You would do
an addElement() on your wrapper.


jord
 Original Message 
Subject: Re: [Flashcoders] Question about SWC elements for use in Flex
From: "Eric E. Dolecki" 
Date: Wed, September 21, 2011 11:04 am
To: Flash Coders List 

If I make an ActionScript Project - things work fine. I link the SWC,
import
the asset's stub class & I can use it. However I can't figure how to do
the
same for a Flex Project or Flex Mobile Project yet.


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Question about SWC elements for use in Flex

2011-09-21 Thread jchilcott

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Question about SWC elements for use in Flex

2011-09-21 Thread Eric E. Dolecki
If I make an ActionScript Project - things work fine. I link the SWC, import
the asset's stub class & I can use it. However I can't figure how to do the
same for a Flex Project or Flex Mobile Project yet.


  Google Voice: (508) 656-0622
  Twitter: eric_dolecki  XBoxLive: edolecki  PSN: eric_dolecki
  http://blog.ericd.net



On Wed, Sep 21, 2011 at 10:51 AM, Eric E. Dolecki wrote:

>  *implicit coercion of a value of type mx.core.IVisualElement to unrelated
> type Sphere.*
> :/
>
>
> 2011/9/21 Cédric Muller 
>
>> what if you do 'var s:Sphere = new Sphere() as IVisualElement' ?`
>>
>>
>>  Apologies but I haven't done any Flex in a few years and I am getting
>>> back
>>> into it.
>>>
>>> I created a FLA and then created some visual assets in the Library, with
>>> Linkage names. I then published a SWC of these.
>>>
>>> In my Flex app project I linked the SWC with my project. Then I try to
>>> call
>>> the stuff up and place & I get an error:
>>>
>>> 
>>> 
>>> 
>>>
>>> TypeError: Error #1034: Type Coercion failed: cannot convert
>>> Sphere@46b0179to mx.core.IVisualElement.
>>>
>>> ?
>>> __**_
>>> Flashcoders mailing list
>>> Flashcoders@chattyfig.figleaf.**com 
>>> http://chattyfig.figleaf.com/**mailman/listinfo/flashcoders
>>>
>>
>> __**_
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.**com 
>> http://chattyfig.figleaf.com/**mailman/listinfo/flashcoders
>>
>
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Question about SWC elements for use in Flex

2011-09-21 Thread Eric E. Dolecki
*implicit coercion of a value of type mx.core.IVisualElement to unrelated
type Sphere.*
:/

2011/9/21 Cédric Muller 

> what if you do 'var s:Sphere = new Sphere() as IVisualElement' ?`
>
>
>  Apologies but I haven't done any Flex in a few years and I am getting back
>> into it.
>>
>> I created a FLA and then created some visual assets in the Library, with
>> Linkage names. I then published a SWC of these.
>>
>> In my Flex app project I linked the SWC with my project. Then I try to
>> call
>> the stuff up and place & I get an error:
>>
>> 
>> 
>> 
>>
>> TypeError: Error #1034: Type Coercion failed: cannot convert
>> Sphere@46b0179to mx.core.IVisualElement.
>>
>> ?
>> __**_
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.**com 
>> http://chattyfig.figleaf.com/**mailman/listinfo/flashcoders
>>
>
> __**_
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.**com 
> http://chattyfig.figleaf.com/**mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Question about SWC elements for use in Flex

2011-09-21 Thread Cédric Muller

what if you do 'var s:Sphere = new Sphere() as IVisualElement' ?`


Apologies but I haven't done any Flex in a few years and I am  
getting back

into it.

I created a FLA and then created some visual assets in the Library,  
with

Linkage names. I then published a SWC of these.

In my Flex app project I linked the SWC with my project. Then I try  
to call

the stuff up and place & I get an error:





TypeError: Error #1034: Type Coercion failed: cannot convert
Sphere@46b0179to mx.core.IVisualElement.

?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Question about SWC elements for use in Flex

2011-09-21 Thread Eric E. Dolecki
Apologies but I haven't done any Flex in a few years and I am getting back
into it.

I created a FLA and then created some visual assets in the Library, with
Linkage names. I then published a SWC of these.

In my Flex app project I linked the SWC with my project. Then I try to call
the stuff up and place & I get an error:





TypeError: Error #1034: Type Coercion failed: cannot convert
Sphere@46b0179to mx.core.IVisualElement.

?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders