Jump to content


movieclip nesting


  • You cannot reply to this topic
4 replies to this topic

#1 hulkster

    Young Padawan

  • Members
  • Pip
  • 7 posts
  • Location:Norfolk, VA U.S.A.
  • Interests:gettin' the heck outa dodge<br><br>going to Germany

Posted 29 August 2005 - 08:34 AM

Hello all,

I cant get this to work, -heres the scenerio:

I have a movie clip called btn1, when its rolled over I want it to open movie clip twoinone.
twoinone has two movie clips that act simply as a sub-menu. The two movie clips are called sub1 and sub2. When one is rolled over I would like another movie clip to play, and this final action is where I have the problem. I get 2inone to show up, but when I try to target sub1 or sub2 nothing happens. i.e. when I mouse over sub1 the cursor doesnt turn into a hand or anything for that matter. heres my code

btn1.onRollOver = function() {
twoinone.gotoAndPlay(2);
};

twoinone.sub1.onRollOver = function() {
twoinone.gotoAndPlay(1);
};

its the second bit function that does nothing - I have also tried it as an if statement

if(twoinone._currentframe = 2){
twoinone.sub1.onRollOver = function(){
twoinone.gotoAndPlay(1);
}
};

-what am I doing wrong?

........ ok a simple work around would be to go directly to the mc (sub1) and put
on (rollover){
desired effect;
}

but I would really like to control the majority of ActionScript centrally (from the main timeline) There must be a way to do this.
thanks
hulkster

Edited by hulkster, 29 August 2005 - 11:49 AM.


#2 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 29 August 2005 - 02:49 PM

have you tried it with _root.parent?

#3 hulkster

    Young Padawan

  • Members
  • Pip
  • 7 posts
  • Location:Norfolk, VA U.S.A.
  • Interests:gettin' the heck outa dodge<br><br>going to Germany

Posted 29 August 2005 - 03:44 PM

thank you for posting,
No, that did not seem to work either.

#4 Swas

    Young Padawan

  • Members
  • Pip
  • 2 posts

Posted 03 September 2005 - 04:59 AM

It May seem like nothing, but i may have noticed an error in your if Statement:

if(twoinone._currentframe = 2){

would it need to be:

if(twoinone._currentframe == 2){

because other wise, it would keep saying its on the second frame, thus nothing would happen :S im a little rusty, but I think that could be part of the problem, please correct if im wrong :unsure:

#5 hulkster

    Young Padawan

  • Members
  • Pip
  • 7 posts
  • Location:Norfolk, VA U.S.A.
  • Interests:gettin' the heck outa dodge<br><br>going to Germany

Posted 06 September 2005 - 07:33 PM

Hello,
thanks for the reply. I have already tried what you suggested -I am not clear on what the difference is but have seen that example in prior posts. -Anyway thanks but it is not the answer. I think that my code is simply juvenile and shall try another method. Again thanks.
-michael





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users