RE:[Flashcoders] Component and Live Preview problems
Explore native MM livePreview code to see in details how it works. Also, I think you should check items in "contents", which is the clip you really see in LivePreview, rather then "xch", which manages Preperties/Component inspector. Here's a code I used in similar situation (just to see what you have on the screen in IDE): if(_global.isLivePreview){ for (var i in _root.xch) { trace("_root.xch["+i+"] = "+_root.xch[i]); } for (var i in _root.contents){ trace("_root.contents[ "+i+" ] = "+_root.contents[i); } } -- Best regards, GregoryN http://GOusable.com Flash components development. Usability services. > <[EMAIL PROTECTED]> wrote: > > Thanks for the reply. I am using UIComponent. The code that is in the live > preview fla > is: > > [code] > > function onUpdate() { > > pushBtn.buttonText_txt.text = xch.btnLabel; > > > } > > > [/code] > > > The strange thing is that in the component's FLA I can drag as many instances > from the > library on the stage and it works fine. Once I convert it to SWC, the > problems start. I > did trace out the the xch properties, but I couldn't seem to find the > component's name. > > I did read the other replies to my post and looks like it is somewhat of a > flawed design > and it has to be hacked to get it to work properly. > > > Thanks for the assistance. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE:[Flashcoders] Component and Live Preview problems
Thanks for the reply. I am using UIComponent. The code that is in the live preview fla is: [code] function onUpdate() { pushBtn.buttonText_txt.text = xch.btnLabel; } [/code] The strange thing is that in the component's FLA I can drag as many instances from the library on the stage and it works fine. Once I convert it to SWC, the problems start. I did trace out the the xch properties, but I couldn't seem to find the component's name. I did read the other replies to my post and looks like it is somewhat of a flawed design and it has to be hacked to get it to work properly. Thanks for the assistance. GregoryN greg at gousable.com wrote: >Do you subclass UIComponent or just MovieClip? >What code do you use for onUpdate? > >Try to trace components names etc while in live preview. > >-- >Best regards, >GregoryN > >http://GOusable.com >Flash components development. >Usability services ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Component and Live Preview problems
Do you subclass UIComponent or just MovieClip? What code do you use for onUpdate? Try to trace components names etc while in live preview. -- Best regards, GregoryN http://GOusable.com Flash components development. Usability services. > > -- original message: > I posted this on FlashNewbie and didn't have much luck getting it resolved. I > also found > a number of posts on Actionscript.org referencing this same problem, but I > couldn't find > any solutions, so I thought I would try here. I created a custom button > component with > live preview enabled for the label. The live preview works great with only > one button > component on stage. However, if I put another instance of my btn component on > stage, both > btn components are updated to the most recent component's label. Both buttons > have > different instance names. > > Any ideas on how to resolve this issue? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Component and Live Preview ~ problems
I wrote a post on working with live preview on my lame ass blog at http://www.judahfrangipane.com/?p=13. Judah JesterXL wrote: It's because LivePreview variables are different SWF's, but same depth. Gary wrote the original LivePreview.as file (in includes in Flash MX 2004's install directory), and you can take a look at it to see how it works. I had the same problem with my Flowchart components. Basically, things were getting created correctly in different movieclips, but the actual data was referencing a previous component. I had to hack the LivePreview.as with a few modifications on the 2 main functions that update the component, but I never fully resolved it. My suggestion is to start tweaking that file since it's the one that pretty much runs LivePreviews. ...or, create your own, and do it the MX way where you code the refreshing yourself, export a SWF, and point your component to that vs. using the internal Flash MX 2004 component LivePreview-auto-gen. - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Monday, January 30, 2006 11:21 PM Subject: [Flashcoders] Component and Live Preview ~ problems Hello All --- I posted this on FlashNewbie and didn't have much luck getting it resolved. I also found a number of posts on Actionscript.org referencing this same problem, but I couldn't find any solutions, so I thought I would try here. I created a custom button component with live preview enabled for the label. The live preview works great with only one button component on stage. However, if I put another instance of my btn component on stage, both btn components are updated to the most recent component's label. Both buttons have different instance names. Any ideas on how to resolve this issue? Thanks for any and all replies. ___ 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 -- "Always bear in mind that your own resolution to succeed is more important than any one thing." "You can have anything you want - if you want it badly enough. You can be anything you want to be, do anything you set out to accomplish if you hold to that desire with singleness of purpose." - Abraham Lincoln ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Component and Live Preview ~ problems
It's because LivePreview variables are different SWF's, but same depth. Gary wrote the original LivePreview.as file (in includes in Flash MX 2004's install directory), and you can take a look at it to see how it works. I had the same problem with my Flowchart components. Basically, things were getting created correctly in different movieclips, but the actual data was referencing a previous component. I had to hack the LivePreview.as with a few modifications on the 2 main functions that update the component, but I never fully resolved it. My suggestion is to start tweaking that file since it's the one that pretty much runs LivePreviews. ...or, create your own, and do it the MX way where you code the refreshing yourself, export a SWF, and point your component to that vs. using the internal Flash MX 2004 component LivePreview-auto-gen. - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Monday, January 30, 2006 11:21 PM Subject: [Flashcoders] Component and Live Preview ~ problems Hello All --- I posted this on FlashNewbie and didn't have much luck getting it resolved. I also found a number of posts on Actionscript.org referencing this same problem, but I couldn't find any solutions, so I thought I would try here. I created a custom button component with live preview enabled for the label. The live preview works great with only one button component on stage. However, if I put another instance of my btn component on stage, both btn components are updated to the most recent component's label. Both buttons have different instance names. Any ideas on how to resolve this issue? Thanks for any and all replies. ___ 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] Component and Live Preview ~ problems
Sorry, using Flash 8. Thanks for any insight. Derek Vadneau flashcoderlist at ThunderUnderground.com wrote: >I remember this happening with my components at one point, but I think the >issue was with MX04 - pre 7.2. I'm not 100% on that but I do remember the >problem occurring. > >Are you using MX04? If so, are you using the 7.2 update? > >If not, I'll see if I can dig up some info about what I did ... >record-keeping is not my strong-suit ... > > >Derek Vadneau ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Component and Live Preview ~ problems
The 7.2 update did clear up many things. Components Live Preview was always a bit flaky however. The one most notorious for showing up incorrectly was the numeric stepper. On the positive side, they have always shown up correctly when actually compiled. They often don't look right in the editing environment. Kevin Jackson On 1/30/06, Derek Vadneau <[EMAIL PROTECTED]> wrote: > I remember this happening with my components at one point, but I think the > issue was with MX04 - pre 7.2. I'm not 100% on that but I do remember the > problem occurring. > > Are you using MX04? If so, are you using the 7.2 update? > > If not, I'll see if I can dig up some info about what I did ... > record-keeping is not my strong-suit ... > > > Derek Vadneau > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > [EMAIL PROTECTED] > Sent: Monday, January 30, 2006 11:22 PM > To: flashcoders@chattyfig.figleaf.com > Subject: [Flashcoders] Component and Live Preview ~ problems > > > Hello All --- > > I posted this on FlashNewbie and didn't have much luck getting it > resolved. I also found a number of posts on Actionscript.org referencing > this same problem, but I couldn't find any solutions, so I thought I would > try here. I created a custom button component with live preview enabled > for the label. The live preview works great with only one button component > on stage. However, if I put another instance of my btn component on stage, > both btn components are updated to the most recent component's label. Both > buttons have different instance names. > > Any ideas on how to resolve this issue? > > Thanks for any and all replies. > > > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > -- Kevin Jackson [EMAIL PROTECTED] Who so would be a man must be a nonconformist. - Ralph Waldo Emerson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Component and Live Preview ~ problems
I remember this happening with my components at one point, but I think the issue was with MX04 - pre 7.2. I'm not 100% on that but I do remember the problem occurring. Are you using MX04? If so, are you using the 7.2 update? If not, I'll see if I can dig up some info about what I did ... record-keeping is not my strong-suit ... Derek Vadneau -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Monday, January 30, 2006 11:22 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Component and Live Preview ~ problems Hello All --- I posted this on FlashNewbie and didn't have much luck getting it resolved. I also found a number of posts on Actionscript.org referencing this same problem, but I couldn't find any solutions, so I thought I would try here. I created a custom button component with live preview enabled for the label. The live preview works great with only one button component on stage. However, if I put another instance of my btn component on stage, both btn components are updated to the most recent component's label. Both buttons have different instance names. Any ideas on how to resolve this issue? Thanks for any and all replies. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders