Adobe Dreamweaver Forums



Last 10 THreads :         Bridge No Longer Rotates Automatically (Last Post : Michael_Palumbo@adobeforums.com - Replies : 1 - Views : 2 )           »          dollarFormat / numberformat problem (Last Post : izdabye - Replies : 0 - Views : 1 )           »          Call out side flex (Last Post : Amy Blankenship - Replies : 15 - Views : 16 )           »          captions for photos (Last Post : dc111652 - Replies : 0 - Views : 1 )           »          Re: CS4 GPU Acceleration and Intel X3100 (Last Post : Paul_B_Brown@adobeforums.com - Replies : 0 - Views : 1 )           »          error 1034 (Last Post : shottogan - Replies : 0 - Views : 1 )           »          Keyboard events don't work in player or projector (Last Post : tunghoy - Replies : 0 - Views : 1 )           »          Help with caption box question (Last Post : NZ-developer - Replies : 1 - Views : 2 )           »          Realistic Cat Hair and... (Last Post : chrisf111 - Replies : 0 - Views : 1 )           »          PLACING NEW LAYER BELOW THE ORIGINAL (Last Post : dave_milbut@adobeforums.com - Replies : 3 - Views : 4 )           »         


User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Flex
 
Tags:



Reply
  #11 (permalink)  
Old 11-03-2008, 04:37 AM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Attn LuigiL :-) Problems using Flex Component Kit


"LuigiL" <webforumsuser@macromedia.com> wrote in message
news:gdq4so$61u$1@forums.macromedia.com...
> Ok. From scratch:
> Create a new as3 fla file. From the Components view, drag an instance of
> the
> 3DWallPro to the stage. Select the instance on the stage and from menu
> 'Modify', select 'Convert To Symbol' and select Movieclip. Give the symbol
> an
> instance name like TheWall (this instance name becomes the identifier in
> Flex)
> and set the registration point to the upper left corner. Klik OK. Now
> select
> the symbol in the library and from menu 'Commands' select 'Convert symbol
> to
> Flex Component'. The output panel will report what has been done to
> convert the
> symbol to a Flex Component. Except for the fact that automatically a class
> has
> been assigned to the symbol with the name 'TheWall' (or the instance name
> you
> assigned in the previous steps).
>
> With
> Now when you look at the publish settings -> flash -> AS3 -> settings,
> check
> if 'Automatically declare stage instances' is off. OK and close the
> Publish
> Settings.
>
> Doubleclick the symbol on the stage. Select the instance of the 3DWallPro
> component. Give it an instance name like 'wall'.
>
> Now create a new actionscript class and save it as TheWall.as (remember,
> the
> name must match the instance name of the symbol). Make sure it extends
> UIMovieClip and import mx.flash.UIMovieClip
> Declare a
> public var wall:
> and here you need to assign to correct datatype which is most likely the
> tricky thing here.
> You already checked the datatype of the 3DWallPro by checking the linkage.
> That must be the datatype of the public var wall otherwise you won't have
> access to the API of the component. Assign the correct datatype. Save the
> class.
> Now publish.


I tried that as well, and it gave me a Type coercion error. It looks like
the correct type is _3DWallPro, despite the fact that this isn't referenced
anywhere. Or at least the error message in FB says
Error #1034: Type Coercion failed: cannot convert _3DWallPro@4d102a9 to
Wall3DPro.



I'm going to step back and take this from a button and get that working
exactly like I want, and hopefully that will shed some light.



Thanks again :-)


Reply With Quote
Sponsored Links
  #12 (permalink)  
Old 11-03-2008, 04:37 AM
LuigiL
 
Posts: n/a
Diggs:
Default Re: Attn LuigiL :-) Problems using Flex Component Kit

I'm almost tempted to buy the component to try this myself :-).
Reply With Quote


  #13 (permalink)  
Old 11-03-2008, 04:37 AM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Attn LuigiL :-) Problems using Flex Component Kit


"Amy Blankenship" <amySpamFilter@magnolia_pleaseNOspam_multimedia.co m> wrote
in message news:gdq5kp$76t$1@forums.macromedia.com...
>
> "LuigiL" <webforumsuser@macromedia.com> wrote in message
> news:gdq4so$61u$1@forums.macromedia.com...
>> Ok. From scratch:
>> Create a new as3 fla file. From the Components view, drag an instance of
>> the
>> 3DWallPro to the stage. Select the instance on the stage and from menu
>> 'Modify', select 'Convert To Symbol' and select Movieclip. Give the
>> symbol an
>> instance name like TheWall (this instance name becomes the identifier in
>> Flex)
>> and set the registration point to the upper left corner. Klik OK. Now
>> select
>> the symbol in the library and from menu 'Commands' select 'Convert symbol
>> to
>> Flex Component'. The output panel will report what has been done to
>> convert the
>> symbol to a Flex Component. Except for the fact that automatically a
>> class has
>> been assigned to the symbol with the name 'TheWall' (or the instance name
>> you
>> assigned in the previous steps).
>>
>> With
>> Now when you look at the publish settings -> flash -> AS3 -> settings,
>> check
>> if 'Automatically declare stage instances' is off. OK and close the
>> Publish
>> Settings.
>>
>> Doubleclick the symbol on the stage. Select the instance of the 3DWallPro
>> component. Give it an instance name like 'wall'.
>>
>> Now create a new actionscript class and save it as TheWall.as (remember,
>> the
>> name must match the instance name of the symbol). Make sure it extends
>> UIMovieClip and import mx.flash.UIMovieClip
>> Declare a
>> public var wall:
>> and here you need to assign to correct datatype which is most likely the
>> tricky thing here.
>> You already checked the datatype of the 3DWallPro by checking the
>> linkage.
>> That must be the datatype of the public var wall otherwise you won't have
>> access to the API of the component. Assign the correct datatype. Save the
>> class.
>> Now publish.

>
> I tried that as well, and it gave me a Type coercion error. It looks like
> the correct type is _3DWallPro, despite the fact that this isn't
> referenced anywhere. Or at least the error message in FB says
> Error #1034: Type Coercion failed: cannot convert _3DWallPro@4d102a9 to
> Wall3DPro.
>
>
>
> I'm going to step back and take this from a button and get that working
> exactly like I want, and hopefully that will shed some light.


OK, I'm a lot closer. I'm still a bit fuzzy on what's going on, but here's
what finally maybe got me an inspectable 3DWall in Flex (still nothing
visible on stage, but if I can see it in code I'm confident I can get
there).

New Project>New Symbol (FlexWall)
Drag 3Dwall onto stage of FlexWall.
Convert FlexWall to Flex component
Create FlexWall.as, extending UIMovieClip
Change FlexWall baseClass back to MovieClip
Change Document class to UIMovieClip
Turn off declare instances automatically
Turn declare instances automatically back on, and remove the public variable
wall from the AS.

I'm not sure what combination/sequence of settings worked, since there's a
lot of conflicting information out there. I'm going to try to go through
all this step by step at some point and write a tutorial, which will
hopefully clarify what's going on.

Thanks;

Amy


Reply With Quote
  #14 (permalink)  
Old 11-03-2008, 04:37 AM
LuigiL
 
Posts: n/a
Diggs:
Default Re: Attn LuigiL :-) Problems using Flex Component Kit

>>Change Document class to UIMovieClip

Hmm, don't know what the effect of that could be. The class that is connected
to the symbol is your 'gateway' to the 3DWallPro component. As far as I know
the Document Class doesn't affect the published swc. I'm curious what you come
up with. So, ultimately you should get a type coercion error when adding the
generated component to the application (the famous 'must extend IUIComponent')

>>Turn declare instances automatically back on

That would be a nice attempt when you can't datatype the public var so you can
see what the compiler thinks of the datatype.

In the train I thought about this and if I had to try to get this working I
would probably try to create a new component in Flash that 'has' an instance of
the 3DWallPro component. And ultimately wrap that in a symbol and convert it to
a Flex Component. Somehow my feeling is that it needs some kind of 'bridge' to
work.

Reply With Quote
  #15 (permalink)  
Old 11-03-2008, 04:37 AM
LuigiL
 
Posts: n/a
Diggs:
Default Re: Attn LuigiL :-) Problems using Flex Component Kit

We are discussing the conversion to a Flex Component but just to be complete on this: using SWFLoader and loading the component as a swf works ok. Thought I needed to mention this.
Reply With Quote


  #16 (permalink)  
Old 11-03-2008, 04:37 AM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Attn LuigiL :-) Problems using Flex Component Kit


"LuigiL" <webforumsuser@macromedia.com> wrote in message
news:gdqk3m$qki$1@forums.macromedia.com...
> We are discussing the conversion to a Flex Component but just to be
> complete on this: using SWFLoader and loading the component as a swf works
> ok. Thought I needed to mention this.


Yes, but I'm very stubborn :-)


Reply With Quote
  #17 (permalink)  
Old 11-03-2008, 04:37 AM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Attn LuigiL :-) Problems using Flex Component Kit


"LuigiL" <webforumsuser@macromedia.com> wrote in message
news:gdqhma$nfp$1@forums.macromedia.com...
>>>Change Document class to UIMovieClip

>
> Hmm, don't know what the effect of that could be. The class that is
> connected
> to the symbol is your 'gateway' to the 3DWallPro component. As far as I
> know
> the Document Class doesn't affect the published swc.


Something I came across somewhere suggested it as a solution to some
problem. Don't remember where/why, but it definitely seems to change the
behavior. I'm not sure I've nailed down the exact cause/effect relationship
of everything.

> I'm curious what you come
> up with. So, ultimately you should get a type coercion error when adding
> the
> generated component to the application (the famous 'must extend
> IUIComponent')


No, since it's extending UIMoviClip, that seems to be ok. It's kind of
aggravating it doesn't support commitProperties...I had to write that back
in.

> >>Turn declare instances automatically back on

> That would be a nice attempt when you can't datatype the public var so you
> can
> see what the compiler thinks of the datatype.
>
> In the train I thought about this and if I had to try to get this working
> I
> would probably try to create a new component in Flash that 'has' an
> instance of
> the 3DWallPro component. And ultimately wrap that in a symbol and convert
> it to
> a Flex Component. Somehow my feeling is that it needs some kind of
> 'bridge' to
> work.


But you ultimately wind up that you have that "has a" thing that you have to
refer to. So if you create a new MC and drag a 3DWall onto the stage, that
MC "has a" 3D wall in it that you need to be able to refer to somehow. If
you make its class file extend UIMovieClip, it "is a" UIMovieClip that "has
a" 3D wall.

The steps above did eventually result in a Flex component that shows the
images in Flex and can be passed a path to the xml and work. The next step
is allowing setting of other properties. I've written a public method on it
that doesn't appear to be visible from Flex.

I'm also getting a problem where it doesn't like my reference to
closeWall(), but I'm sure I'll get there eventually.


Reply With Quote
  #18 (permalink)  
Old 11-03-2008, 04:38 AM
LuigiL
 
Posts: n/a
Diggs:
Default Re: Attn LuigiL :-) Problems using Flex Component Kit

Great! Then by the end of the day you will have it working :-)
Strange that the Document class has any influence on this. You do mean the Document class of the main timeline in the fla?
Reply With Quote


  #19 (permalink)  
Old 11-03-2008, 04:38 AM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Attn LuigiL :-) Problems using Flex Component Kit


"LuigiL" <webforumsuser@macromedia.com> wrote in message
news:gdrttv$k7n$1@forums.macromedia.com...
> Great! Then by the end of the day you will have it working :-)
> Strange that the Document class has any influence on this. You do mean the
> Document class of the main timeline in the fla?


Yes. I keep getting errors about closeWall() not being defined, even though
I've commented out the reference to it. Very aggravating.


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 03:18 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk