Not sure what exactly you're having problems with.
If you want the component (on stage) to be interactive, that's not going to
work (AFAIK).
You could create a paramater available in the Property Inspector to toggle info
on and off.
import mx.utils.Delegate;
class LivePreviewTest extends MovieClip {
private var __showInfo:Boolean = false;
function LivePreviewTest() {
}
private function setShowInfo() {
trace("LivePreviewTest ::: setShowInfo");
trace(" - showInfo: "+__showInfo);
}
[Inspectable(defaultValue="false",enumeration="true,false")]
function get showInfo():Boolean {
return __showInfo;
}
function set showInfo(val:Boolean):Void {
__showInfo = val;
if(_global.isLivePreview) setShowInfo();
}
}
regards,
Muzak
----- Original Message -----
From: "John laPlante" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, June 01, 2007 7:45 PM
Subject: [Flashcoders] Trying to understandi Live Preview
> Live Preview has often been a difficult topic to understand. But a couple of
> very useful posts are available about it.
> http://readlist.com/lists/chattyfig.figleaf.com/flashcoders/0/243.html
> http://proalias.com/pipermail/flashcomponents_proalias.com/2005-April/000159.html
>
> But, I wonder if it is possible to include user interaction in Live Preview.
> I build components for people who build computer
> tutors and I would like to associate contextual instructions with the
> component that an author could reference when building a
> tutor with my components. I know that I could put instructional text on the
> stage and hide it if _global.isLivePreview = false or
> undefined. But, ideally, the help could be shown / hidden in the
> LivePreview. The file mm_livepreview.as has a stage listener.
> Also, in that file, it dynamically creates a movie clip and calls setSize on
> it. I tried adding onPress and onRelease event
> handlers to that movie clip but these don't seem to work. In the posts that
> I've read, claims are made that the LivePreview
> interpreter is like the flash player but has some differences. I wonder if
> I'm out-of-luck trying to add this kind of
> interactivity.
>
> mc.onRelease = function(){
> trace("initHelp : infoButton_btn.onRollOver");
> };
> mc.onPress = function(){
> trace("initHelp : infoButton_btn.onRollOut");
> };
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com