?
Solved

Flash button symbol control...

Posted on 2007-07-25
7
Medium Priority
?
214 Views
Last Modified: 2010-04-03
Hi all
Just a quick question, I animated flash buttons in Max and then imported each frame into flash to create really slick looking buttons. Everything works fine except I have no Idea why flash runs the over event right after the down event with a button symbol. I want the down event to finish playing and stay there....
eg. http://3dtree.co.za/buttons.html
Any ideas? Should I rather use the onRollOver functions and make it a normal mc symbol?
0
Comment
Question by:unluckynelson
  • 4
  • 3
7 Comments
 
LVL 34

Expert Comment

by:Aneesh Chopra
ID: 19564902
you should create it as movieclip instead of button, and use gotoAndPlay onRollOver, onRollOut of movieClip
0
 
LVL 1

Author Comment

by:unluckynelson
ID: 19564951
cool thanks
I also thought I should do that...
I wrote this then but now nothing works:

this.home_mc.onRollOver = function() {
      this.home_mc.gotoAndPlay(2);
}
this.home_mc.onMouseDown = function() {
      this.home_mc.gotoAndPlay(3);      
}

Where frame 2 and 3 inside the home_mc has hover and clicked movie clips....they also have stop(); functions...
What am I doing wrong?
0
 
LVL 34

Expert Comment

by:Aneesh Chopra
ID: 19565083
there is nothing like "onMouseDown"

it should be

this.home_mc.onPress= function() {
      this.home_mc.gotoAndPlay(3);      
}

-------------------
Aneesh Chopra
-------------------

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 34

Expert Comment

by:Aneesh Chopra
ID: 19565092
sorry, I mean to say. yes we have "onMouseDown" but we can't use button event with movieclip events on same instance of any movieClip at same point of time.

0
 
LVL 1

Author Comment

by:unluckynelson
ID: 19565133
ok, found my error... I removed the this. reference, now it works:

this.home_mc.onRollOver = function() {
      home_mc.gotoAndPlay('2');
      trace('Hovering');
}
this.home_mc.onMouseDown = function() {
      home_mc.gotoAndPlay('3');      
        trace('Clicking');
}
Can anyone explain why the this.home_mc.onRollOver reference works but this.home_mc.gotoAndPlay(); doesn't? In the exact same statement?

      
0
 
LVL 34

Accepted Solution

by:
Aneesh Chopra earned 2000 total points
ID: 19565623
because, inside function, this refernce to the "home_mc" and inside "home_mc" we dont have another "home_mc"

just trace "this", inside function and outside function, you will get the reason..

-------------------
Aneesh Chopra
-------------------
0
 
LVL 1

Author Comment

by:unluckynelson
ID: 19565654
Awesome, thanks a lot for your help. That clarifies things...
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses
Course of the Month15 days, 10 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question