Actionscript 2.0 assist.

Started by: xxxchronicdarkessxxx | Replies: 14 | Views: 879

xxxchronicdarkessxxx
2

Posts: 107
Joined: Jun 2008
Rep: 10

View Profile
Jul 31, 2008 3:26 PM #203080
I have about 4 pieces to my project that I'm compiling into one .fla file.
Separately, they all have about 7 frames, and the buttons to surf through them work.

Example, in the separate file, you can click a button, and it will take you to the correct place. This is due to the:
on(release){
gotoAndPlay(2);
}
script. Which obviously works in this situation.
However, when I put the entire thing together, The script doesn't work because it's 4 flash files in one frame. So since everything is in movie clip form, I need an actionscript to go through the movieclips, instead of the main timeline.
I was thinking something like giving the frames instance names or whatever and trying to do it that way. I just don't know how.

edit: in case it wasn't clear, I know how to name frames.
Lixu

Posts: 3,859
Joined: Aug 2007
Rep: 10

View Profile
Jul 31, 2008 3:33 PM #203087
Click on a frame, and enter your name in the left corner where properties usually should be.
xxxchronicdarkessxxx
2

Posts: 107
Joined: Jun 2008
Rep: 10

View Profile
Jul 31, 2008 3:42 PM #203095
Quote from Lixu
Click on a frame, and enter your name in the left corner where properties usually should be.

Lol, I knew how to do that, it should be common sense to everyone if you know what an instance name is.


I'm talking about how would I use this method to make the buttons scroll through the movie clip.
Lixu

Posts: 3,859
Joined: Aug 2007
Rep: 10

View Profile
Jul 31, 2008 3:45 PM #203099
on(release){
gotoAndPlay(//Frame name here);
}
xxxchronicdarkessxxx
2

Posts: 107
Joined: Jun 2008
Rep: 10

View Profile
Jul 31, 2008 3:50 PM #203107
that doesn't work.
besides, it's:
on(release){
gotoandStop("//insert name here//");
}

I might have to add:
on(release){
_root.gotoAndStop("//name goes here//");
}

Edit. Lol, the whole, "I might have to add" worked for the original to go from frame to frame in the main timeline. I think if I had an actionscript to take the name from the movieclip, and the frame, it would work. So it knows exactly where to go.
Lixu

Posts: 3,859
Joined: Aug 2007
Rep: 10

View Profile
Jul 31, 2008 3:52 PM #203110
What I ment was, between the ( and the ) you put the frame name.
xxxchronicdarkessxxx
2

Posts: 107
Joined: Jun 2008
Rep: 10

View Profile
Jul 31, 2008 4:07 PM #203121
Quote from Lixu
What I ment was, between the ( and the ) you put the frame name.


you cannot do that though, you need quotes. """""""""""""""""
Lixu

Posts: 3,859
Joined: Aug 2007
Rep: 10

View Profile
Jul 31, 2008 4:13 PM #203126
But did it work, oh mature person.
xxxchronicdarkessxxx
2

Posts: 107
Joined: Jun 2008
Rep: 10

View Profile
Jul 31, 2008 4:23 PM #203145
Quote from Lixu
But did it work, oh mature person.

Of course not.
I highly doubt you can help me with this.
The only actionscript you probably know is:

stop();
play
gotoAndPlay();
_root.gotoAndPlay();
on(release){
gotoAndPlay();
}
on(oress){
gotoAndPlay();
}

You might now
on(release){
getURL("");
}
Scorpioxxx
2

Posts: 1,454
Joined: Apr 2006
Rep: 10

View Profile
Jul 31, 2008 5:00 PM #203204
Right, what I got was that you need something to play/change frame but its in a movieclip so your normal code doesn't work. Considering your putting this in a button still;

on(release){
_root..gotoAndPlay(2);
}


Give you movieclip an instance name and replace with it. Its case sensitive btw.

If you need to go further into a clip;

on(release){
_root...gotoAndPlay(2);
}


Replace with whatever the instance of he clip inside the main movieclip is. The stream/list can go longer than 2 but its easy enough.
xxxchronicdarkessxxx
2

Posts: 107
Joined: Jun 2008
Rep: 10

View Profile
Jul 31, 2008 6:41 PM #203377
I'll try that. The thing is, I have about 300 symbols, at least 80 per section.
So let's see. I'll use my music player as an example.
It's set up as 8 frames, which are:
Frame 1- preloader
Frame 2- Selection Bar
Frames 3-Music.
In the Selection Bar menu with the song choices, I would put
on(release){
_root..gotoAndPlay(2);
}
into one of the buttons. After I change the actionscript, it should take me to like, frame 3 and stop.
I'll try it and edit my post.
Scorpioxxx
2

Posts: 1,454
Joined: Apr 2006
Rep: 10

View Profile
Jul 31, 2008 6:59 PM #203422
I'm supposing that your whole music player is a movieclip with the frames preloader, selection bar and music in it and you wanted buttons to go to these frames but the buttons are outside the clip so weren't correctly refering to it with your code. I may have confused what you were trying to do/need the code to do but if I understood what you were trying to say it should work.
xxxchronicdarkessxxx
2

Posts: 107
Joined: Jun 2008
Rep: 10

View Profile
Jul 31, 2008 7:27 PM #203453
This is what I did. I made everything in the timeline, frames and all on the MAIN timeline. Then when it was done, I made a new movieclip and pasted all of the frames from the main timeline inside of the movie clip. So the entire thing is 1 symbol.

It's the only way I could think about being able to export them properly into Dreamweaver.
I think if I just imported the separate .fla's into dreamweaver and set them it would work.
Scorpioxxx
2

Posts: 1,454
Joined: Apr 2006
Rep: 10

View Profile
Jul 31, 2008 7:43 PM #203471
That's what I thought you'd done. Have all the components seperate could be easier unless you need them to react to eachother.
xxxchronicdarkessxxx
2

Posts: 107
Joined: Jun 2008
Rep: 10

View Profile
Jul 31, 2008 7:45 PM #203474
Quote from Scorpioxxx
That's what I thought you'd done. Have all the components seperate could be easier unless you need them to react to eachother.
Yeah. I wanted to go into depth of it to. but I'd have to restart, and this is my last day at camp, so I cannot =[