Mailing List
Home
Forum Home
Flash Pro
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
[Flashnewbie] how to exit OnClipEvent()? [was: Animated Menu Example]

[Flashnewbie] how to exit OnClipEvent()? [was: Animated Menu Example]

2004-02-14       - By andrew

 Back
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

Hi All:

I spent 10 hours with ASTDG and got my animated menus to work.

Each menu button does it's thing with an OnClipEvent handler...for example:

//attached to button on main Timeline

onClipEvent (enterFrame) {
if (mainTimeline.b3Pressed == true) {
 if (subTab != 3) {
  //then move it to pos 0
  this.gotoAndStop(8);
  if (this._x>10) {
   this._x -= 2;
  }
  if (this._x<=10) {
   getURL("http://" + navPath + "/theNextPage.asp", _self);
 }
 }
}
if (mainTimeline.b0Pressed || mainTimeline.b1Pressed ||
mainTimeline.b2Pressed == true) {
 this.gotoAndStop(1);
 this._alpha = 50;
}
}

I'd like to post the rest of my code because I know it's not properly
constructed, but almost everything works on a demo basis, except for one
thing:

At the end of the buttons moving around, I need to refresh to a new page
(depending on which button was clicked). I have the getURL function embedded
in the OnClipEvent, but this doesn't work...because there's only one frame
in the main TimeLine, when I test this in the browser (IE 6) the page gets
caught in an endless loop and the getURL never fires (or rather, it fires
repeatedly but too quickly for the getURL action to actually occur).

What can I do to "stop everything" once the button has finished it's
transition, and then fire the getURL?

TIA, Andrew


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Supported by Fig Leaf Software
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Lower Prices for Certified Training! Check out new lower prices for
Certified Macromedia Training from Fig Leaf Software. Expand your
skill set with courses in ColdFusion, Flash, Rich Internet
Applications and .NET in the new year.  Fig Leaf Software provides
the highest caliber instruction at our training centers in Washington  
D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at
your location.

Get the details at http://training.figleaf.com/
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe, e-mail: flashnewbie-unsubscribe@(protected)
For additional commands, e-mail: flashnewbie-help@(protected)





Earn $52 per hosting referral at Lunarpages.