Jump to content


coding a MovieClip


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

#1 saps

    Young Padawan

  • Members
  • Pip
  • 46 posts
  • Gender:Male
  • Location:Earth

Posted 31 January 2008 - 01:26 AM

hey everyone, I have a lil' problem, I make this MovieClip and put some code in it so an effect to work, but now I have some porblems in loading the second frame in the main timeline, I use this code i found in a tut here:

onClipEvent (enterFrame) {
if (go) {
nextFrame();
} else {
prevFrame();
}
}

onClipEvent (load) {
var go;
stop();
enter_btn.onRollOver = function() {
go = true;
};
enter_btn.onRollOut = function() {
go = false;
};
enter_btn.OnRelease = function (){
//what you want your button to actuall do when clicked goes here.
}

I have some problems in the onRelease function, I try to make it like an usual button action but cant make it load, I used the gotoAndPlay(); but dont work that way, now the question is how I make that frame load coding the movieClip
trigger_btn.onRelease=function(){ ... whats the function I could use?
hope someone can help, peace.

#2 saps

    Young Padawan

  • Members
  • Pip
  • 46 posts
  • Gender:Male
  • Location:Earth

Posted 01 February 2008 - 02:15 PM

... anyone out there can help??? :biggrin:

#3 curthard89

    Young Padawan

  • Members
  • Pip
  • 226 posts

Posted 04 February 2008 - 03:48 AM

cud u please refrase what u need help with, i dont understand, but im more then happy to help if i understood

#4 saps

    Young Padawan

  • Members
  • Pip
  • 46 posts
  • Gender:Male
  • Location:Earth

Posted 05 February 2008 - 01:55 AM

sure, aum... I made this MovieClip that I'm using as a button, I put some animation in it and it all works wonders but I just can figured out yet how to give the action to that button MovieClip so it load the next scenario of my flash movie, that button is one of my main menu, let's say I want to load the third scenario wich is my gallery i gave this action to it: hoverOver.onRelease=function(){
hoverOver.gotoAndPlay("gallery");
}
but it doesnt work that way, the gotoAndPLay dont work for it and I just dont know wich is the action of the onRelease function, maybe I need a handler for that Mc but as it is my first site I'm not familar yet with the MovieClips events, and I'm sure it'll need more than that function I'm typing in, I dont know if you'll know what I'm talking about but I'll bring home tomorrow my file so you can see it... well, any help now is good. ty man.

#5 curthard89

    Young Padawan

  • Members
  • Pip
  • 226 posts

Posted 05 February 2008 - 09:03 AM

you have a instance called

hoverOver

now if u put an onRelease state on that,

the inside should not be hoverOver.gotoAndPlay

as now ur talking to the inside of that movie clip

instead, it should be

this.gotoAndPlay

as ur refering to the nodes parent which is itself

make any sense?

if not, then if you want to call "itself" which you are, you can specify its location from the root

so _root.hoverOver

location obviously depends on what other movieclips it is inside etc.

Edited by curthard89, 05 February 2008 - 09:17 AM.


#6 saps

    Young Padawan

  • Members
  • Pip
  • 46 posts
  • Gender:Male
  • Location:Earth

Posted 05 February 2008 - 04:34 PM

actually I'm not trying to load anything inside that MovieClip, not even the animation code is in the Clip, I have all that coding in my actions layer in the main timeline, now when I type _root.hoverOver.gotoAndPlay... flash pops window errors saying that MovieClip events needs to go within on handlers, then I try
onClipEvent(load){
hoverOver.onRelease=function(){
_root.hoverOver.gotoAndPlay("gallery");
}
then errors desapeared but it still wont load my gallery... have no idea whats wrong with me man.
I dont want to load no animation inside that Mc button cause it has none, the animation is coded and done in the main timeline, and in the main timeline I have my layers scene (you know, the one to give names to frames to play...) and I want that Clip load my gallery but I still cant find the how... :P

Edited by saps, 05 February 2008 - 05:14 PM.


#7 saps

    Young Padawan

  • Members
  • Pip
  • 46 posts
  • Gender:Male
  • Location:Earth

Posted 05 February 2008 - 06:43 PM

damn!! i have it working now =D the code was not suposed to go inside the Clip but in the main timeline, it's like:
hoverOver.onRelease=function(){
_root.gotoAndPlay("gallery");
}
ty for the help bro! you the man!!!
peace out!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users