Hey all, can anyone kindly tell me why my Setter function does not affect the trace in the Event Handler of my Class. I have commented the two problem areas of the code. Thanks very much in advance, Victor

CODE:


// ** AUTO-UI IMPORT STATEMENTS **
import com.acmewebworks.controls.BaseClip;
import mx.utils.Delegate;
import com.creativenetdesign.imageviewer.ImageViewer;
import mx.controls.Label;
import com.creativenetdesign.imageviewer.ControlPanel;
// ** END AUTO-UI IMPORT STATEMENTS **
class com.creativenetdesign.imageviewer.Main extends BaseClip{
// Constants:
public static var CLASS_REF = com.creativenetdesign.imageviewer.Main;
public static var LINKAGE_ID:String = "com.creativenetdesign.imageviewer.Main";
// Public Properties:
var imgViewerFrame:Number
// Private Properties:
// UI Elements:
// ** AUTO-UI ELEMENTS **
private var controlPanel:ControlPanel;
private var ImageViewer:ImageViewer;
private var labelTitle:Label;
// ** END AUTO-UI ELEMENTS **
// Initialization:
public function Main() {}
private function onLoad():Void { configUI(); }
// Public Methods:
// PROBLEM ***************************************************************
// This is the setter function that is beling called from the FLA timeline:
// imv_mc.setImageViewerFrame = 3
public function set setImageViewerFrame(frame:Number):Void {
   imgViewerFrame = frame;
//this trace works fine
trace("setImageViewerFrame() is setting var imgViewerFrame to "+frame)
   }
// END PROBLEM ***********************************************************
// Semi-Private Methods:
// Private Methods:
private function configUI():Void {
 trace("MAIN INIT")
 // init ImageViewer
controlPanel.addEventListener("controlClick", Delegate.create(this, handleButtonClicked));
 }
 //
 // PROBLEM ************************************************************
 // imgViewerFrame always traces out to UNDEFINED
 private function handleButtonClicked(obj:Object):Void {
trace("MAIN HEARD "+obj.type+" FROM "+obj.target+" image viwer is on frame: "+imgViewerFrame);
 // END PROBLEM ********************************************************
 var viewerOnFrame:Number = _level0.main.imageViewer_mc._currentframe
 //trace("VIEWER FRAME IS "+viewerOnFrame)
  if (obj.target == _level0.main.controlPanel.next_btn){
   if (viewerOnFrame == 1 ){
   _level0.main.imageViewer_mc.gotoAndStop(2)
  }else if (viewerOnFrame == 2){
   _level0.main.imageViewer_mc.gotoAndStop(3)
  }else if (viewerOnFrame == 3){
   _level0.main.imageViewer_mc.gotoAndStop(4)
  }
  else if (viewerOnFrame == 4){
   _level0.main.imageViewer_mc.gotoAndStop(5)
  }
  else if (viewerOnFrame == 5){
   _level0.main.imageViewer_mc.gotoAndStop(6)
  }
  else if (viewerOnFrame == 6){
   _level0.main.imageViewer_mc.gotoAndStop(1)
  }
 }
 //
 if (obj.target == _level0.main.controlPanel.prev_btn){
   if (viewerOnFrame == 1 ){
   _level0.main.imageViewer_mc.gotoAndStop(6)
  }else if (viewerOnFrame == 2){
   _level0.main.imageViewer_mc.gotoAndStop(1)
  }else if (viewerOnFrame == 3){
   _level0.main.imageViewer_mc.gotoAndStop(2)
  }
  else if (viewerOnFrame == 4){
   _level0.main.imageViewer_mc.gotoAndStop(3)
  }
  else if (viewerOnFrame == 5){
   _level0.main.imageViewer_mc.gotoAndStop(4)
  }
  else if (viewerOnFrame == 6){
   _level0.main.imageViewer_mc.gotoAndStop(5)
  }
 }
}

}
----- Original Message ----- From: "Kevin Cannon" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <[email protected]>
Sent: Monday, October 02, 2006 9:21 AM
Subject: Re: [Flashcoders] Disabling Nested MCs?


Hi Jake,

Ahh, I so that's how you do it. I think the current way I have tweens
working won't allow be to easily do that, but when I start using Fuse
Kit it should be a doddle.

Thanks,

- Kevin

On 02/10/06, Jake Prime <[EMAIL PROTECTED]> wrote:
Hi Kevin

Try:

map._visible = false;

This will disable all buttons in map, and if the whole map is 0 alpha
anyway will make no visible difference.

Jake

On 02/10/06, Kevin Cannon <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have an interactive map with various clickable countries on it. At
> certain times the map fades out to alpha = 0.
>
> When that happens the country movieclips are still clickable so I need
> to disable them.
>
> I expected map.enabled = false; to do it, but it seems to have no
> effect since the map movieclip itself has no actions.
>
> If there a way to disable the nested MCs without having to do it by
> manually disabling them all? I don't want to reinvent the wheel if
> there's a native way of doing it.
>
> Thanks,
>
> - Kevin
_______________________________________________
[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

_______________________________________________
[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


_______________________________________________
[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

Reply via email to