Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




[F8] Button Sets X Value Of Movie Clip



How can i set the x value of a movie clip and the speed it moves from an on release function?



FlashKit > Flash Help > Flash ActionScript
Posted on: 12-12-2006, 03:47 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Button Sets Var For Movie Clip
I am trying to replicate the following scrolling technique:
http://www.hodgesinteriorsolutions.co.uk/

I want to have the background photo scroll up and down according to the button pressed. What I tried is this...

I have a movie clip called "photos" which has 6 permutations of all possible animations of these 3 photos, each with stop markers at certain intervals. It has the following actionscript which I am trying to make work (I'm a bit of a noob):

stop();
var startpic;
var endpic;
if (startpic="") {
startpic = "a";
} else {
startpic = startpic;
}
function scroll() {
if ((startpic="a") && (endpic="b")) {
gotoAndPlay(2);
}
if ((startpic="a") && (endpic="c")) {
gotoAndPlay(56);
}
if ((startpic="b") && (endpic="a")) {
gotoAndPlay(34);
}
if ((startpic="b") && (endpic="c")) {
gotoAndPlay(12);
}
if ((startpic="c") && (endpic="a")) {
gotoAndPlay(45);
}
if ((startpic="c") && (endpic="b")) {
gotoAndPlay(23);
}
startpic = endpic;
}

I'm not sure if this is even close to right, but the logic makes sense to me.

I also have three buttons which are supposed to set the startpic and endpic variables and trigger the function. Here's the code for one of them.

on (release) {
photos.endpic = "a";
photos.scroll();
}

I think I've got the right idea but am going about it all wrong. Can anyone help set me in the right direction?

Movie Clip Button Inside Movie Clip Button Is Driving Me Nuts
hellllllo everyone, this thing has been bothering me for weeks, i've been hiding from it for days but it always seems to come back and bug me..
this is the problem..
on my main timeline i have a movie clip button that plays over/out state within this clip and on the over state it also opens 8 other movie clip in this movieclip that i am hoping to make them clipable, i only made an over state for the first movieclip out of the eight, but it just wont do the rollover effect..
i think there is a better way to do this..if i need to start over..let me know..thanks!!!

i will attach the file please help me out! i am tired of hiding!
thank you again!!!!!

Link Button Sets
Simple.

Two separate MC's (menu_mc and menu2_mc) both export to the MainMenu.as class. Both contain buttons that export to the OButton.as class. Buttons.fla base class is Main.as.

What I want is for menu_mc and menu2_mc to work like partners. When I ROLL_OVER the buttons of one I want the other MC to "hear" it and react the same way. How do I make them "aware" of one another?

I have a friend who pointed me in this direction:
"First off, both the top menu and the middle menu need to become aware of each other. I don't actually have flash, so I can't see how this is set up exactly within the FLA, but you need to do something like this within the class which extends the root:

var m1:MainMenu = mySecondMenuClip;
var m2: MainMenu = myFirstMenuClip;

m1.setLinkedMenu(m2);
m2.setLinkedMenu(m1);

setLinkedMenu can add a listened to the other menu so that every time you make a new selection, it knows to update its selection. You have to figure out the details ;)

Secondly, your OButton class needs to broadcast when the mouse rolls over it. Then you can use that pairing above to have both menus rollover in tandem."
...AND, while I understand something of what he is talking about, I am having trouble getting my mind (and my code) around it. As you may see I have begun to implement the "setLinkedMenu" method but I am not really sure what it is supposed to do OR if I even hav it in the right place.

Thanks for any help you may offer.
Here are my classes:







Attach Code

// Main
package
{
import flash.display.*;
import flash.events.*;

public class Main extends MovieClip
{
// class definition -----------------------------------------------------------------------

public var pages_mc:Pages;
public var menu_mc:MainMenu;
public var menu2_mc:MainMenu;
public var botMenu_mc:BottomMenu;

//PUBLIC------------------------------------------------------------------------------------

public function Main()
{
super();

initialize();
}

// private --------------------------------------------------------------------------------

private function initialize():void
{
addEventListener(OButton.NEW_SELECTION, selectHandler);

var m1:MainMenu = menu_mc;
var m2:MainMenu = menu2_mc;

m1.setLinkedMenu(m2);
m2.setLinkedMenu(m1);

menu_mc.main();
menu2_mc.main();
botMenu_mc.main();
}

// event handlers -------------------------------------------------------------------------

private function selectHandler(event:Event):void
{
var btn:OButton = event.target as OButton;
pages_mc.loadPage(btn.thisMC);
}
}
}

// MainMenu
package
{
import flash.display.*;
import flash.events.*;

public class MainMenu extends MovieClip
{
// class definition -----------------------------------------------------------------------

public var act1_mc:OButton;
public var act2_mc:OButton;
public var act3_mc:OButton;
public var act4_mc:OButton;
public var act5_mc:OButton;

private var main1:MainMC1 = new MainMC1;
private var main2:MainMC2 = new MainMC2;
private var main3:MainMC3 = new MainMC3;
private var main4:MainMC4 = new MainMC4;
private var main5:MainMC5 = new MainMC5;
private var _selectedButton:OButton;

// initialize -----------------------------------------------------------------------------

public function MainMenu()
{
super();
}

public function main():void
{
initializeMenu();
}

// public ---------------------------------------------------------------------------------

public function setLinkedMenu(linkUp:MovieClip):void
{
linkUp.addEventListener(MouseEvent.CLICK, alsoChange);
}

public function alsoChange(event:Event):void
{
trace(this.name);
}

// private --------------------------------------------------------------------------------

private function initializeMenu():void
{
act1_mc.thisMC = main1;
act1_mc.main();
act2_mc.thisMC = main2;
act2_mc.main();
act3_mc.thisMC = main3;
act3_mc.main();
act4_mc.thisMC = main4;
act4_mc.main();
act5_mc.thisMC = main5;
act5_mc.main();

addEventListener(OButton.NEW_SELECTION, selectHandler);
}

// event handlers -------------------------------------------------------------------------

private function selectHandler(event:Event):void
{
if (_selectedButton != null)
{
_selectedButton.unselectCategory();
}

var mObtn:OButton = event.target as OButton;
_selectedButton = mObtn;
}
}
}

//OButton
package
{
import flash.display.MovieClip;
import flash.events.Event;
import flash.events.MouseEvent;

[Event(name="newSelection", type="flash.events.Event")];

public class OButton extends MovieClip
{
public static const NEW_SELECTION:String = "newSelection";

private var _thisMC:MovieClip;

//INITIALIZE--------------------------------------------------------------------

public function OButton()
{
super();
}

public function main()
{
initializeBehavior();
}

//API--------------------------------------------------------------------

public function set thisMC(val:MovieClip):void
{
_thisMC = val;
}

public function get thisMC():MovieClip
{
return _thisMC;
}

public function unselectCategory():void
{
play();
initializeBehavior();
}

// private --------------------------------------------------------------------------------

private function initializeBehavior():void
{
buttonMode = true;
addEventListener(MouseEvent.MOUSE_OVER, onOver);
addEventListener(MouseEvent.MOUSE_OUT, onOut);
addEventListener(MouseEvent.CLICK, selectHandler);
}
private function deinitializeBehavior():void
{
removeEventListener(MouseEvent.CLICK, selectHandler);
removeEventListener(MouseEvent.MOUSE_OVER, onOver);
removeEventListener(MouseEvent.MOUSE_OUT, onOut);
}

//event handlers-----------------------------------------------------------------------

private function selectHandler(event:Event):void
{
deinitializeBehavior();
gotoAndPlay("disable");
dispatchEvent(new Event(OButton.NEW_SELECTION, true));
buttonMode = false;
}

public function onOver(e:MouseEvent):void
{
gotoAndPlay("over");
}

private function onOut(e:MouseEvent):void
{
gotoAndPlay("out");
}
}
}

Radio Button Sets A Variable How?
I'm setting up language options (English. French. German).
I'd like to use the cool smart clip radio buttons in flash 5 to select a language that will then set a language variable that I can check for each time someone wants to open a PDF.
How can I do this? I've been looking at all the script examples regarding radio buttons but I just don't understand. I should just use basic buttons and on release set my variable. But where's the coolness in that?
Can anyone throw me a bone and help me set a variable from a radio button?
Thanks.

Targeting A Frame Label In A Movie Clip From A Button In A Separate Movie Clip.
I have two separate movie clips placed on a timeline-MovieclipA and MovieclipB. I have a button in MovieclipB clip that wants to target a frame label located in the MovieclipA timeline. Can someone help me?

Code 4 MovieClip Button To Load A Movie Clip Into A Placeholder Movie Clip.
Yeah that title sounds a little confusing...so i will explain:

Is there a way to tell a "movie clip button" that once it is clicked on to load a "movie clip" into a "movie clip placeholder". So instead of loading an external swf into the placeholder, it will be a movie clip from within the same library. Putting every single custom clip on the timeline would take a while, so that is why I thought it would be easier like this, and the other movie clips are not that large that I want to load into it so there is no need for external swfs, trying to keep it clean. Here is the code along the lines I am trying to go for.

__________________________________________

this.profile_mc.onRelease = function() {
placeholder_mc.loadMovie("profileSection_mc","plac eholder_mc","_root.content");
}
__________________________________________

- "profile_mc is the button I am trying to activate to load the
"profileSection_mc" into the "placeholder_mc". but so far no good.

- the movie clips are within the same library, not on the timeline or external library.

- Is this possible?

Button Rls Sets Variable, And Changes Text Box-should Be Simple
I'm embarassed to be asking this because it's gotta be simple, but it does not work for me and I've wasted a day already. I want the contents of a text box to change according to a button press. Each button sets the variable to an appropriate text item.

the text field is dynamic and called "textone"

on release of "buttonone", I want it to set variable "itemname" so that "textone" is updated

can one of you kick-ass actionscripters give me a sample code to help? Is there a weird way to target path the text field? Will it only work inside a movie clip? I don't know.

It seems that if I write

on (release) itemname = "blue jacket"

and the variable for "textone" is itemname...

then the box should display something everytime the action happens. But it displays nothing.

Thanks to anyone who can help me with this. I've been doing Flash for 6 years, and I know how to load variables from a text file, but this simple thing won't work for me. Maybe I'm doing something wrong now in MX 2004.

[CS3] Actionscript 2 - Button That Sets The Current Page As A Homepage.
Hello,

I stumbled upon a problem, I have a movieclip inside a swf, on which I would like to apply some actionscript 2 code to show me a dialog box where it asks me if I want to set the current page as the homepage for that browser, when I click the button.

I found the code I was looking, but it's html+javascript:


Code:
<a href="#" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.mylink.com ');" style="font-size:12px;color:#ffffff;font-family:verdana;">asd</a>


Is there a way I can insert this html+javacript onto the movieclip I have inside my flash?
I can also live with converting the code to something that flash understands.

I found some code for javascript inside actionscript is there something similar to this that can help me do what I want?

Code:
on (press) {
getURL("javascript:history.go(-1);");
}


In short, I want to click the button and display a dialog box that asks me if I want to set the current page as a homepage.

Thanks,
N.

A Button Inside A Movie Clip, Within A Movie Clip, Calling Another Scene:
Is it even possible?

I have been trying to do it for the last few days for a site I am working on.

I have done searches in many forums and it's foolish looking for an answer that way, because quite frankly every thread I opened was something to do with LoadMovie or GetURL, etc.

What I have right now is on the button in my Menu Bar Movie Clip:

on (release) {
gotoAndPlay(285);
}

Which plays a fancy little animation in the movie clip and then on the last frame of that movie clip I had:

gotoAndPlay("Contact", 1);

Which is the Scene for the "Contact Us" Scene named "Contact"

One would think that it would load up the scene and play at frame 1, however all that happens is it reloads the movie clip of the "Menu Bar" at frame 1 and starts over, not even realizing what I asked.

Anyways, I figured there's a script or something that tells it to look outside of the movie clip or to the _Root, or whatever.

If someone has a solution, it would be greatly appreciated.

Sorry I have no example to show, since I have yet to upload it. (It's my company's web site, and I don't think customers would want to see some half-arsed web site that's not complete.

Thanks in advance.

Create A Movie Clip As A Button To Jump To Half Way Through Another Movie Clip?
hi guys and gals,
i am wondering if i can make a movie clip (as a link for a website) jump to half way through another movieclip...
thanks in advance

Control Movie Clip In Container From Button Inside Other Movie Clip
There are three movie clips involved in this question.

1. A main movie clip that has a target empty movie clip where an external swf loads.

2. A menu movie clip that is built from button symbols and has its own timeline.

3. The external movie.

When a user clicks on the menu, the external swf loads into the empty movie clip target.  This part works fine. Here's the code:
on (release) {    
    loadMovie ("Lesson1.swf", "_root.container");
}

I want to use one external swf for all lesson, versus 20 external swfs. The problem I'm having is controling at what frame the external swf loads.  I've tried adding --gotoAndStop (15) -- for example. I've also tried adding, gotoAndStop "_root.container" (15), but that doesn't work either. The gotoAndStop action ends up controlling the menu movie clip timeline instead of the movie loaded into the container. I figure this is because the menu mc has "embedded" buttons and it's own timeline.

Any  help you can offer will be much appreciated.

Thanks
Sheila



Creating A Button To Open A Movie Clip From Inside A Movie Clip?
I'm using a hexagon menu to display some images. One image is placed on each slide of the hexagon menu (which can then be rotated left and right to see other "slides").

What I want to do now is to be able to click on the object (image) as a button and for it to go to another scene which shows the image blown up and some description next to it (which is another movie)

I have tried the following which doesn't seem to work:
Created an invisible button (or choosing the image as a button) and having

on(release) {
gotoAndPlay("scene 5", 1);
}

this doesn't work when I use it over the hexagonal menu, but when I move the button to somewhere else on the screen (not over the movie) it works.


Please can someone help with this - Ive been working on it flat out over the weekend and desperately want to make it work. any ideas would be appreciated!! thank you

Loading External Movie Clip With A Button Inside Another Movie Clip Help
Hi,

I am working on a scrolling thumbnail movie clip, that when you click on the thumbnail button inside the movie clip it will load an external movie clip. I have an empty movie clip on the main stage, and have been trying all sorts of code, but for some reason it doesn't like that I am inside a movie clip using buttons. It can't seem to find the external swf.

I have tried:

on (release) {
loadMovie (ithink.swf, "loader");

and

on (release) }
if (firstTime == true) {
loadMovie("ithink.swf", _root.loader);
firstTime = false;
} else {
_root.clicked = "ithink.swf";
_root.loader.gotoAndPlay("goback");
}
}

and so far nothing, for some reaosn when I click on a button outside of the movie clip with the above code it loads... and than the other works too, but if I click on the buttons inside the scolling movie clip first they won't work.

Any suggests or ideas!!?

I would really appreciate it... I am beyond frusterated!!

Using A Button In A Movie Clip To Control The Movie(and Not Movie Clip) Timeline
Ok i have a button placed in a movie clip. I want this button, when released, to go in another scene, frame one, on the movie(scene) timeline and not on the movie clip timeline.

So i tried: gotoAndPlay("mission", 1); (mission is the name of my scene)

But it goes to the frame 1 of my movie clip, It would be great if someone could tell me how i can control the movie timeline while my button is in a movie clip

thaks
Vakarm

Writing A Variable That Sets Doors To Open And Close Upon The Click Of A Button
Ok so i'm working on a project that has a number of doors. Once you click on a door I have a movie clip that allows each door to slide open. Now my quandary is that I would like to have an active door close upon either a click on itself or another button attached to a different door movie. I have about 10 doors. I'm not sure if i described this very well, please ask feel free to ask me questions if I didn't explain this well enough.

Please please please help me!! I'm stuck!

How Do You Make A Button Able To Jump From Movie Clip To Movie Clip
how do you make a button able to jump from movie clip to movie clip

I have 5 movies i the same scene , I need the buttons to jump from movie to movie ... how do I code this in the acrions ?

A Button Inside A Movie Clip To Move Another Movie Clip
I'm building a web page and I have a button that I need to make two movie clips play. The button is inside one movie clip and in addition to it playing I want it to make another movie clip play. It doesn't seem to recognize the movie clip target names. Any help as to how this can be done would be much appriciated.

Thanx

Controlling A Movie Clip From A Button Inside Another Movie Clip.
I'm confusing myself just typing this.

I'm working on an interactive map. The map itself is a MC inside a container, but also contains all the buttons as well. On my main stage(scene 1 and menu) is a window(MC) that will show info and photo of building. Now if I create a button on the main stage I can control the movieclip(images) easily. But when I use a button from inside map(MC) it doesn't seem to recognize the (images.gotoAndStop(frame))command.

I'm just not sure what to put in order to be able to control the MC's timeline from within that map movieclip.

Sorry if this is confusing. Of course at the same time it might be a simple solution for most people here as well. At least that is what I'm hoping anyways.

[CS3.AS2] Button In A Movie Clip Link To Another Movie Clip And Play
what im doing is that making a button in a movie clip link to another movie and play/stop certain parts of that clip

lets say that there are 4 buttons are in movieA, and the other clip is called movieB

when the user clicks button1 in movieA, movieB will play from frame 1 to 5 and stop.
when user clicks button2 in movieA, movieB will play from frame 5 to 10.
and so on

so far my code for button1 is:

on (release){
this._parent.movieB.gotoAndStop(5);
}

on (release){
_root.movieB.gotoAndStop(5);
}

button2:

on (release){
this._parent.movieB.gotoAndStop(10);
}

on (release){
_root.movieB.gotoAndStop(10);
}

with this code, it just jumps to the designated frame.
what i want is to have it play from current frame to a designated frame

can anyone shed some light on this?

Place Movie Clip Button Inside Movie Clip
Hi, I have searched the forum but cannot find exactly what I am looking for.
I have a movie clip of a map that I can zoom and drag and what I would like to do if possible is to have several other movie clips inside the first movie clip which when clicked go to and play at a given frame number on the timeline where a photo is displayed.

The 'several' movie clips will be small flashing red circles. Each one represents a place of interest and when clicked will display a photo of the place of interest.

Button Nested In Movie Clip Just Repeats Movie Clip
I have a button that is inside of a movie clip. (the button falls down from the top). BUT, when i click on the button, it just plays the movie clip over again? Am I missing something?
Thank you

Help Pls Making A Button In A Movie Clip Goto Another Movie Clip (pic)
Hi guys and girls,

i need ya help. What action script would i need to make a button in one movie clip goto and play a frame in another movie clip. I've added a pic to help. Im not very good at flash but i've been trying my usual codes but it dont work..

Cheers

Help Pls Making A Button In A Movie Clip Goto Another Movie Clip (pic)
Hi guys and girls,

i need ya help. What action script would i need to make a button in one movie clip goto and play a frame in another movie clip? I've added a pic to help. Im not very good at flash but i've been trying my usual codes but it dont work..

Cheers

User Defined Variable Sets Which Movie Loads...
I am getting frustrated on this i am hoping one of you would be nice enough to help me out.

I have a movie that starts with an input text field and a submit button. This is asking the user for a promotion code. When the user types in a code and hits submit or types in no code and hit submit the movie plays.

At the end of the movie, I am trying to write a script that will basicly load a movie onto another layer if there is a corresponding file named after that promotion code they entered...

Another words if they entered "promo35" in the input field. At the end of the movie the script would try to fire promo35.swf. If this promotion doesnt exist the movie will just end. If this promotion is valid the corresponding swf would load onto a layer.

Please help i cant re-use the user input properly its driving me mad.

//D

Duplicate Movie Clips Based On Record Sets
Howdy,

I've created a movie that displays content from a database. The small app displays rows of contents, what I was wondering if there was a way I can check to see how many rows/ movie clips the movie should create dynamically based on the amount of records returned.

Thanks in advance.

123

Problem With Movie Clip Moving When The Mouse Passes Over A Button On The Clip
The swf in question calls up a series of ads. To change the ads the user clicks on the forward and back button. However, when you mouseover the forward and back buttons the controlBar goes a bit haywire (as a result of the mouseOut on it).

All the files are attached in a zip file. Thanks in advance for your help guys.

Stop And Play Button For Movie Clip Within Moive Clip
hi i have problems with my buttons. i have got 2 fla files. 1) shell.fla 2) content.fla.

The shell.fla has a movie clip(name:holder) to load the content.swf. And within the content.swf i have got movie clip within movie clip.

Thru a search from the forum i came across this script

first frame:


Quote:




function stopAllClips(clip) {
clip.stop();
for (var i in clip) {
if(typeof clip[i]=="movieclip") {
if(clip[i]!=clip) {
stopAllClips(clip[i]);
}
}
}
};

function startAllClips(clip) {
clip.play();
for (var i in clip) {
if(typeof clip[i]=="movieclip") {
if(clip[i]!=clip) {
startAllClips(clip[i]);
}
}
}
};




for the button:


Quote:




on (release) {
if(!_root.stopped){
_root.stopAllClips(_root.holder_mc);
_root.stopped = true;
} else {
_root.startAllClips(_root.holder_mc);
_root.stopped = false;
}
}




everything works fine except after i pause and play, i doesn't play from where it has stopped. Anyone has got any ideas as to how i can solve this problem. Thanks very much.

Movie Clip Button Inside A Movie Clip Button
Ok so I'm going crazy with creating a movie clip button inside a movie clip.

I have it working well for onRollover, but onRollout the Header_mc looks like it is not looking at the code. It is driving me crazy. Here is my Action Script code to control the two movieclip buttons.

I basicly want the Header_mc to stop when over the B_photo and on Rollout of the B_photo. I don't know why it is not working. I have attached screenshots of my Header_mc and the SWF so you can see what frame I'm calling.



/*--------------Photographers Button------------*/

this.B_photo.onRollOver = function() {
Header_mc.gotoAndPlay("_stop");
B_photo.gotoAndPlay("_over");

}

this.B_photo.onRollOut = function() {
Header_mc.stop("_stop");
B_photo.gotoAndPlay("_out");

}

this.B_photo.onRelease = function() {
B_photo.getURL("http://www.macromedia.com", "_parent");
}

/*--------------Main Header---------------------*/

this.Header_mc.onRollOver = function() {
Header_mc.gotoAndPlay("_over");

}

this.Header_mc.onRollOut = function() {
Header_mc.gotoAndPlay("_out");

}

this.Header_mc.onRelease = function() {
Header_mc.gotoAndStop("_out");

}

Button(movie Clip) In A Button(movie Clip) Help - Attached Fla
Hey guys,

I had 3 buttons in the main movie which was working fine.

an external actionscript file was responsible for the buttons' functions

playPause is the instance name of the button(made as a movie clip)


ActionScript Code:
playPause.onRollOver = function(){    if(this._currentframe == 1) this.gotoAndStop("pauseOver");    else this.gotoAndStop("playOver")}


What I wanted to do is create another button(instance name speaker) on the main movie that when a user rolls over with a mouse, it'll show the 3 buttons. Basically, a button(movie clip) in a button(movie clip).

I have this movie clip working fine but none of the action script on the original buttons are working (of course because target changed).

I have tried the following and it will not work (in external .as file)-


ActionScript Code:
speaker.playPause.onRollOver = function(){    if(this._currentframe == 1) this.gotoAndStop("pauseOver");    else this.gotoAndStop("playOver")}


here is the fla (for the test file, i simply put the as code in the frame and not external as file)
www.yooniq.net/dante/testmp.fla

and here is what i'm talking about
www.yooniq.net/dante/testmp.swf

any suggestions? it'll be greatly appreciated.
thanks in advance

Button In Movie Clip To Link To Other Movie Clip
I am trying to have a button isde my movie clip on frame 1 to jumpt to the start of my movie clip on frame 2. They are both in the same scene. I have tried all the basic action scripts including calling the root target and movie name and nothing will work. I am using Flash5 in XP.

Some of the scripts I used:

on (release) {
loadMovie ("", "_root.about");
}


and

on (release) {
gotoAndPlay ("_root.about");
}


why doesn't this work?

ps my 2nd movie clip is called "about"

Button In Movie Clip To Link To Other Movie Clip
I am trying to have a button isde my movie clip on frame 1 to jumpt to the start of my movie clip on frame 2. They are both in the same scene. I have tried all the basic action scripts including calling the root target and movie name and nothing will work. I am using Flash5 in XP.

Some of the scripts I used:

on (release) {
loadMovie ("", "_root.about");
}


and

on (release) {
gotoAndPlay ("_root.about");
}


why doesn't this work?

ps my 2nd movie clip is called "about"

Movie Clip To Movie Clip Button Action
I am trying to have one movie clip jump to another movie clip. I made the mistake of having them on seperate frames and corrected that. None of the code I have used works still. I am wondering if anyone has a solution. I am sure its something small I am forgetting.

Some of the scripts I used:

on (release) {
loadMovie ("", "_root.about");
}


and

on (release) {
gotoAndPlay ("_root.about");
}


why doesn't this work?

ps my 2nd movie clip is called "about"

Can A Button In A Movie Clip Control A Different Movie Clip?
I'm working on a web page with a draggable menu which is in its own movie clip. Can the buttons in this menu affect different movie clips or the main page?

Button(movie Clip) Inside A Movie Clip
Hey guys,

I had 3 buttons in the main movie which was working fine.

an external actionscript file was responsible for the buttons' functions

playPause is the instance name of the button(made as a movie clip)


ActionScript Code:
playPause.onRollOver = function()
{
    if(this._currentframe == 1) this.gotoAndStop("pauseOver");
    else this.gotoAndStop("playOver")
}

What I wanted to do is create another button(instance name speaker) on the main movie that when a user rolls over with a mouse, it'll show the 3 buttons. Basically, a button(movie clip) in a button(movie clip).

I have this movie clip working fine but none of the action script on the original buttons are working (of course because target changed).

I have tried the following and it will not work (in external .as file)-


ActionScript Code:
speaker.playPause.onRollOver = function()
{
    if(this._currentframe == 1) this.gotoAndStop("pauseOver");
    else this.gotoAndStop("playOver")
}

any suggestions? thanks in advance

Button(movie Clip) Inside A Movie Clip
hey everyone, using flash 8 here,

here is my problem.

on frame 1 line 2 i have a button ( bt1_btn ) and added this code on frame 1, line 1
Code:
stop();

bt1_btn.onRollOver = function() {
_root.gotoAndPlay("animation"); // frame 2
};
which works fine,

on frame 2 line 2 i have this movie clip ( bt2_btn ) that contains animation and 2 movie clips ( buttons - capsules_btn, and cahier_btn)
i added this code which works also...

Code:
bt2_btn.onRollOut= function() {
_root.gotoAndPlay("home"); // frame 1
};
but, i can't seem to make capsules_btn, and cahier_btn to work.

i tried the obvious
Code:
on (press) {
trace("on press");
}
which resulted to nothing.

i tried using this code at the main level on line 1
Code:
bt2_btn.cahier_btn.onRelease = function() {
trace("button clicked");
};
and got nothing

i then tried this code on frame 1 line 1 of the movieclip bt2_btn
Code:
_root.bt2_btn.cahier_btn.onPress= function() {
trace("button clicked");
};
nothing also

wondered what am i missing, or what i aint doing right, either way, can anyone help me out here?

attached file included

thanks

Movie Clip Button Inside Movie Clip.
hey ive got a slider menu which opens when clicked. however the buttons (also mc instanced) inside the slider mc wont work... here is the code:

//Menu Slider Background
_root.menuSlider_MC.onRollOver = function() {
new Tween(_root.menuSlider_MC, "_x", Bounce.easeOut, _root.menuSlider_MC._x,-250, 20);s
}

_root.menuSlider_MC.onRollOut = function() {
new Tween(_root.menuSlider_MC, "_x", Bounce.easeOut, _root.menuSlider_MC._x,-305, 20);s
}

_root.menuSlider_MC.onPress = function() {
new Tween(_root.menuSlider_MC, "_x", Bounce.easeOut, _root.menuSlider_MC._x,50, 20);s
}

//Menu Buttons
_root.menuSlider_MC.web_MC.onRollOver = function() {
trace("yes");
}

the slider mc works however i cant seem to get the 'web_MC' to respond..

how can i fix this? cheers.

Movie Clip To Movie Clip Button Script?
I am trying to have one movie clip jump to another movie clip. I made the mistake of having them on seperate frames and corrected that. None of the code I have used works still. I am wondering if anyone has a solution. I am sure its something small I am forgetting.

Some of the scripts I used:

on (release) {
loadMovie ("", "_root.about");
}


and

on (release) {
gotoAndPlay ("_root.about");
}


why doesn't this work?

ps my 2nd movie clip is called "about"

Move Movie Clip On Button Clip
This is a script that causes a movie clip to move down to a new location when a button nested inside the movie clip is released. can anyone tell me how to write the code so that when a different button is pressed the movie clip will move back to its original position. I am trying to learn actionscript 2.0 by taking the posted files apart and so on, I have a ton o books none of which are too helpful so I could really use some help. What the heck is "ty". I decided to join the forum because books were not cutting it! LOL

here is the code thanks.

ActionScript Code:
// this is the main button to start the slide show
collButtHolder.slide1.onRelease = function() {
    //move the to menu down to reveal the slide show components
    slide(collButtHolder,324);
    // call the function to set up slide show or reset it you had other buttons
    // this is where you set your path to the photos and how many photos are in that folder.
    resetSlideShow("images/slide1/", 15);
    collectionMenu.bName.text = "slide1";
};

function slide(mc, ty) {
    mc.onEnterFrame = function() {
        mc._y += (ty-mc._y)/5;
        if (Math.abs(ty-mc._y)<0.4) {
            this._y = ty;
            delete mc.onEnterFrame;
        }
    };
}

Display Movie-clip With Image/text/button ..when Clicked On A Button
We had generated a template.

Template has 2 area
Buttons on left and right had side area is blank

on click of button we want to display a movie-clip having image/text and buttons for nvaigation.


We found that on click we can display the movie ...it displays image text is not diapled. Also we want to display buttons on the same.

Your help is great value addtion to us.

Thanks in advance

Ramesh

Make A Button Within A Movie Clip Make The Main Movie Clip Play?
hi, is it possible to make a button within a movie clip make the main movie clip play?

at the moment i have it set to play(); on release put this plays the movie clip rather than the main movie, is there any way to make it play the acutal main movie insteat?

Jumping To A Scene From Button In A Movie Clip Button?
I need to jump to a scene from a button inside a movie clip of ascene. Can any one please help? On the frame for the button in the movie clip I have this action script:

on (press, release) {
gotoAndPlay ("presCambells", "presCamp");
continue;
}

It works (with enable simple button action) in flash, however, when I publish and preview as a swf flash file it just shows the current scene with the movie clip looping after I click on it. Please Help.

Trying To Get A Button To Play A Movie Clip After I Click The Button
trying to get a button to play a movie clip after i click the button. right now when i preview my web i have to hold the button for it to play and after i let it go it dissaperes. please help with flash mx. use to corel rave so simple but limited

Movie Clip Within Button - How Do You Disable Down State Of Button?
Hi - I have created a menu down the side of my flash site which is in the form of a button so that when the user rolls over the button, it brings up the menu. Within, this button is just text - the names for each page the user can select to go to (text is within movie clips so I can add actionscript to them).

However, I want to add on (press) {gotoAndPlay("home",1); } etc for each movie clip within this button but when i test the site, this code does not work as the buttons down state has priority over the movie clips within it.

Is there some actionscript code which could disable the down state of a button? (as i only need the button as a rollover anyway and i need the movie clips within the button to have priority in terms of actionscript for linkage etc)

Thanks

Movie Clip Button Doesn't Let Button Change
if i have a btn inside a mc, and i want the btn to change colors in rollover but the movie clip on top does not let it. what can i do?


thanks gneius people

How Do I Center A Text, Graphic, Button, Movie Clip Or Anything In A Flash Movie?
??
And also centering something in a rectangular. Please help.

Having A Button Inside A Movie Clip To Move The Root Movie To Another Frame?
i dont know much about actionscripting so explain to me in simple terms...

i have buttons inside a single movie clip and i want to have each button (when clicked or rollover-ed) move the frame header of the main (root) movie to another position. what actionscript does this require? and will each button actually be "clickable" since they're all encapsulated in ONE movie clip??


thanks

PLEASE HELP Button Inside A Movie Clip..to Call Different Scene On The Movie
i have a button "within" a movie clip, i cant get it to work to call another "scene". i already used "_root." so the command will apply to the main time line but still, its not working.


on (release) {
_root.gotoAndPlay("scene2", 1);
}
thanks!

How To Get A Button Inside Of A Movie Clip Play The MAIN Movie
how to get a button inside of a movie clip play the MAIN movie

( reposted, bad grammer in 1st one)


I got a button, inside of a movie clip.....
How do I get the button to have the MAIN movie play on click, not the MOVIE clip

Load Movie Command From A Button Nested In A Movie Clip.
I'm designing a flash site in which the navigation menu stays in place while content is loaded below it. I want each navigation button to load an SWF file into the dummy movie clip that is positioned beneath them.
But my buttons are placed within a movie clip infact 2 levels down in a movie clip..i.e _root.mc1.mc2.button ..(this is my path)
I m not gettin the write output i want to load the movie clip over the same file but itz not happening.
This is the scripting i have given on my button: (which is placed directly on stage)

on(press){
_root.createEmptyMovieClip("astro_mc",1);
_root.loadMovie("s1.swf", "astro_mc",1);
_root.astro_mc._x=200;
_root.astro_mc._y=200;

}

THIS IS GIVING ME WRITE OUTPUT but when i place d same button in the path i wrote earlier i.e in mc1.mc2.button , then my scripting does not work.. Kindly help me out.. I also tried giving _root. n ol.


Waiting desprtly 4 ur reply.

Copyright © 2005-08 www.BigResource.com, All rights reserved