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




Stupid Buttons - Attaching Actions



Am I crazy? I can't attach actions to buttons. Here's what I'm doing:1. New Flash Document2. Drew a rectangle.3. Right click, Convert to Symbol, Button, Okay.4. Select button, open Action Pane, and........"Current selection cannot have actions applied to it". I just upgraded from 8.0. Is there a reason why this isn't working?



Adobe > ActionScript 3
Posted on: 04/04/2008 05:15:50 PM


View Complete Forum Thread with Replies

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

Attaching Buttons And Actions To Duplicated Movie Clips
Are there any tutorials or tips related to this?

I'm reading in an XML file with URLs, information, etc. for a number of different items into an array. I'd like to dynamically duplicate buttons for the number of items in the array and then attach the XML information in the array to getURLs within a button, dynamic text on the button, etc.

I know this isn't too hard, but I haven't been sucessful so far in getting it to work right.

I'd post code, but I got so frustrated last time I trashed the whole thing.

Attaching Buttons And Actions To Duplicated Movie Clips
Are there any tutorials or tips related to this?

I'm reading in an XML file with URLs, information, etc. for a number of different items into an array. I'd like to dynamically duplicate buttons for the number of items in the array and then attach the XML information in the array to getURLs within a button, dynamic text on the button, etc.

I know this isn't too hard, but I haven't been sucessful so far in getting it to work right.

I'd post code, but I got so frustrated last time I trashed the whole thing.

[Stupid] Attaching Or Duplicating MovieClips
I'm lost on this subject. If I wanted to create a movieclip that by pressing a button it's removed, which would be the best way of doing that? Would I attach or duplicate it to a certain area? And how can I specify exactly where on the screen I wanted it to be(i.e. x=120 y=115 etc.) Thanks for all your help.

Running Actions After Attaching
I think my problem is best explained with an example.

I have a movieclip with the linkage "Alfred", and inside on frame one there is a function called "Hillary".

However, once Alfred is attached, I want the actions in frame one to run instantly, so that something like this would work:


Code:
attachMovie("Alfred", "Alfred", 0);
Alfred.Hillary();
I know there are ways around this, like putting the function in the timeline I attach the movieclip from, but is this at all possible?

Attaching Actions To Dynamically Generated MCs
Currently I have a Flash menu that load a bunch of numerically named jpgs in my menu. Using this code...

Code:
i=1
currentX = 585
currentY = 88
while( i < 10){
_root.createEmptyMovieClip(i,i+10)
with (eval('_root.'+i)){
_x=currentX
_y=currentY
_xscale = 100
_yscale = 100
loadMovie(_root.section+'/thumb.'+i+'.jpg', this);
}
i++
if (currentX<680){
currentX+=32
}else {
currentX=585
currentY+=32
}
}
Of course the menu, must do something, so I am wondering how i can attach an action, so that when these MCs are clicked they will call a function.

Can anyone tell me how to do this?

Second Try: Attaching Actions To Shared Library Assets (im)possible?
hi flashlovers and -haters,
would be great if anybody could tell me, if i´m just too stupid or if it just doesn´t work in generell.
my problem is, i try to use buttons from a shared library to which i try to attach actions, but nothing works. even simple things like a on rollover-trace action has no result. behaviors/actions work if the button is in the movié´s library, but if i open the shared library and switch the button symbols then, nothing works anymore.
anybody any clue??
or do shared libraries only work with simple animations.
looking forward for inspiration or salvation

thanks in advance
belikin

Attaching Movie Clips To Keyboard Actions
I am trying to figure out a way to make a different movie clip appear (and remain visible) when certain keys are pressed. I am using the attachMovie() method and setting the depth parameter +1 each time a new key is pressed. My problem is that each time a succesive key is pressed the movie that previously appeared disappears and the new one is shown. (They are not in the same place, so one is not obscuring the other. )

I would greatly appreciate any help on this.
Thank you very much.
Jw

Attaching And Playing A Sound With Button Actions?
Is it possible to play a sound on a button action. i'm creating a sound in the first frame and attaching it:

mySound = new Sound();
mySound.attachSound("soundExport");

and then on the button:

on (release) {
start.mySound();
}

But it's not working. I have the linkage set right...in fact if I just take the start.mySound a put it in the last frame of the movie (instead of on the button action) it plays fine. so, can you just not do this on a button? i'm doing it this way, because I use one transparent button for all the buttons in my movie (that just sit over MCs), as opposed to creating a button the old fashioned way.

-a

[F8] Attaching Actions To A Bunch Of Movie Clips
OK, I got like 35 movie clips that need to have actions attached to them, because they will be used as buttons. They will have actions for mouseOver Out and Click. The clips have instance names like button001 button 002 ... button035. How do I make a loop from 1 to 35, passing each movieclip the same actions? Also in one of the actions on each button it must trigger another button with the same number ending in its instance name, like Bigbutton002.

Does anyone know how I can set this loop up? Thanks a bunch..

Attaching Button Actions To Png's Inside Of A Movie Clip
I've figured out how to make the scrollpane work (thanx for the tutorial FlashKit!) but now I need to attach button actions

on (release) {
gotoAndPlay("cd1");
} -------- etc, etc

to the individual png's hat make up the movie clip.
I've tried making the cd's button ---didn't work
I've tried making an invisible button to attach to the movie clip---didn't work either.

Any suggestions???

Thanx
CobyCo

Actions On The Main Page..do They Affect Actions On Movie Buttons?
ON the home page I've created, the buttons I used with the code in my previous thread ("two questions about HTML publishing and buttons"), I added an on rollover action to the actions layer of the main timeline (not the movie button timeline) so that on rollover, a picture would change according to the button that was rolled over. I did this for all three buttons. The rollover action works great, but now the links don't work in either the html OR the swf version. Would the added action disable the movie-clip button actions? Here's the added main timeline code, edited for space: photobtn_mc.onRollOver = function() {
gotoAndStop(2);
photobtn_mc.onRollOut = function() {
gotoAndStop(1); ( Again, help is greatly appreciated!)

Argh My Stupid Actions REFUSE To Listen To Me
Okay, in my movie I have a part when theres a button, you click it and preceed on...

So I have a stop action on the frame with the button, so you can stop and click it. Well my stop action ain't doin squat, and it keeps on goin..

So I went in 06 buttons learning in flash, and made a stop action, and it worked! Why will it work there and not in mine?!

Buttons Whos Actions Depend On States Of Other Buttons -HOW?
Hi,

I’ve made a 3D animation as a background to my homepage, and have imported it into Flash CS3 as a series of still TIFF images (one image on each frame).

Now I am looking to control this animation using a series of 9 buttons. At the moment each button does the following:

Button1: Play frames 01 – 20. Stop.
Button2: Play frames 21 – 30. Stop.
Button3: Play frames 31 – 40. Stop.
…etc.

However, I want to make each button’s action dependant on the states of the other buttons:

When the user presses any of the 8 buttons other than the one that is currently engaged, I want the animation relating to the button that is currently engaged to be played in reverse, and then the animation belonging to the button that has just been pressed to be played!

For example, if Button 1 has been pressed, then the user presses Button 2, I want frames 20 – 01 and then frames 21 – 30 to be played. Another example; Button 3 is engaged, user presses Button 1 – frames 40 – 31 should be played and then frames 01 – 20.

If anyone could help me with the ActionScript to perform this (ideally AS3 but AS2 is fine) then I would be extremely, extremely grateful.

Thanks in advance for any comments.
Ben.

Buttons Whos Actions Depend On States Of Other Buttons -HOW?
Hi,

I’ve made a 3D animation as a background to my homepage, and have imported it into Flash CS3 as a series of still TIFF images (one image on each frame).

Now I am looking to control this animation using a series of 9 buttons. At the moment each button does the following:

Button1: Play frames 01 – 20. Stop.
Button2: Play frames 21 – 30. Stop.
Button3: Play frames 31 – 40. Stop.
…etc.

However, I want to make each button’s action dependant on the states of the other buttons:

When the user presses any of the 8 buttons other than the one that is currently engaged, I want the animation relating to the button that is currently engaged to be played in reverse, and then the animation belonging to the button that has just been pressed to be played!

For example, if Button 1 has been pressed, then the user presses Button 2, I want frames 20 – 01 and then frames 21 – 30 to be played. Another example; Button 3 is engaged, user presses Button 1 – frames 40 – 31 should be played and then frames 01 – 20.

If anyone could help me with the ActionScript to perform this (ideally AS3 but AS2 is fine) then I would be extremely, extremely grateful.

Thanks in advance for any comments.
Ben.

Attaching Sound To Buttons
How do I attach sounds to buttons so that when I roll over it the sound plays. I'm not looking to use "gotoAndPlay("")" as I have lots of frames that I dont want to distrurb, I belive theres an AS code like attatchSound or similar.

Any help is appreciated.

Regards.

Attaching A Movieclip With Buttons
Hello,

I have a button on my base flash (.fla) screen and when you press
this button it uses the "attachMovie" function to call a movie clip,
that has buttons itself. However, after the movie clip displays,
the buttons show up but are disabled.

They don't respond when pressed nor does the cursor change to the pointing hand when I roll over the button.

What am I doing wrong? Thanks

Sam

Attaching AS Files To Buttons
Alright... So I want to make a button that will load an image it is sent when constructed....
I created a button, and did the funky thing where it is tied to an AS file (called ModButton.as). In the button I made an empty movie clip called pic, as well as all my little button animations. In ModButton.as I have this:

class ModButton {
public var img:String;
public function ModButton(img_src)
{
img = img_src;
pic.loadMovie (img);
}
}

I then have in my testing program a ModButton with the instance name rcx. I then say rcx=new ModButton (images/rcx.jpg); But when I test it I get the error message:

**Error** C:InetpubGamedevModButton.as: Line 6: There is no method with the name 'pic'.
pic.loadMovie (img);

Total ActionScript Errors: 1 Reported Errors: 1

what do I do to stop this?

Attaching Menu Buttons One After Another
i'm currently working on an xml menu. at the moment it attaches all necessary mainMenu buttons (submenu will be later). i wonder how could i attach menu buttons to show one after another with for example 1sec delay - not all the buttons at a time.

this is part of my code:


Code:
CreateMainMenu = function(x,y,depth,node_xml) {
var cNode;
var cItem;
var cMenu = this.createEmptyMovieClip("mainMenu",0);
for(var i=0;i<node_xml.childNodes.length;i++) {
cNode = node_xml.childNodes[i];
cItem = cMenu.attachMovie("mainMenuBtn","mc"+i,i);
cItem._x = menu_x + i*(cItem._width + 10);
cItem.menuname = cNode.attributes.name;

cItem.onRollOver = function() { trace("ok"); }
}
}
i think, i should use onEnterFrame function but it doesn't work for me :/

could u please help me

thx

Attaching Buttons Using A For Loop
hi guys, flash has been busting my balls all day, and i have given up and i need some help, any ideas would go down a treat, cheers... so the problem is...i want to attach buttons using a for loop and each button to have a different action once clicked on, easy you might say.... well i have this code that doesnt work, and i know i aint been stupid cos the theory works...

l = createEmptyMovieClip("l", 10);
for (var i = 1; i<5; i++) {
node = l.attachMovie("letterCircle", "letterC"+i, i);
node._y = (i*100);
this._parent.letterC1.onRelease = function() {
trace("button1");
};
this._parent.letterC2.onRelease = function() {
trace("button2");
};
etc....

so basically i need each button attached to do a different action, for now its just traceing... does this kind of thing not work?? maybe i am stupid!! any advice would go down a treat cheers

sam

Attaching Buttons From A Class?
could anyone please tell me how i would go about attaching buttons from a class?

thanks for any help you can give me

Attaching Scripts To Buttons
I have a button displayed as Zoom In in the Basket panel:

HERE

When I attach this script to the button:

on (release, keyPress "<Space>") {

gotoAndPlay(2);
}

The mouse release works fine but when I try the keyboard for keyPress, nothing happens. Anyone got any ideas as to what I am doing wrong?

Attaching Movies With Embeded Buttons
Using Flash 8
Action Script 2.0

Hi,

I am pretty new to action script, i'm reading Flash 8 Professional (training from the source) and Flash 8 Action Script (training from the source) to get my head round flash 8/actionscript and to get to a comfortable level to develop/design flash sites.

I've got a question - when loading a button into the stage using attachmovie in actionascript how can the <instance name> for that button which has just been loaded by attachmovie be set in actionscript because, I've got a actions layer which includes all the actionscript which includes a test.onRelease = function. I would like "test" to be assoicated with the button which i have just loaded using attachmovie so events for that button can be controlled. (i.e. when the button is selected the contacts information is loaded)

Does anyone have any ideas on this? Hope i am going down the right line with trying to create a side menu.

Thanks for those reading my post.

Garry

[CS3] Attaching A Single Script To Many Buttons
How can I apply a single script to many buttons, but also have a separate script for each individual button?

For example, I have some buttons that I want to scale and apply an effect to when onRollOver. Then I will undo those effects onRollOut. These effects will apply to all buttons on the stage.

Then for each individual button, I would like to have an onRelease action that calls a URL.

Is it possible to have a single script that is used by all the buttons for the rollover effect?

See the in-progress .fla file here

Attaching Variables To Menu Buttons
I'm loading menu buttons, that will load an external text file. My approach was to attach the button with the name of it's text file that it will load and just pass that name to the function



Code:
var i:Number = 0;
function menuIt() {
if (i<=8) {
//trying to attach the Movie and give it the name 1.txt
var doo:MovieClip = attachMovie("mc_menu", i+".txt", 50);
new mx.transitions.Tween(doo, "_x", mx.transitions.easing.Strong.easeIn, 0, 30, 1, true);
doo._y = 30;
i++;
}
doo.onPress = function() {
var variables_lv:LoadVars = new LoadVars();
trace(doo);
// trying to pass that name to at this point.
// the text files will be name 1.txt, 2.txt, 3.txt..
// and eight menu buttons will be used.
variables_lv.load("doo");
variables_lv.onData = function(data) {
_level0.mctext.myTxt.text = data;
var aoo:MovieClip = attachMovie("mc_arrows", "arrows", 1001);
aoo._x = 620;
aoo._y = 30;
};
};
}

Attaching Buttons To Movieclips - Ideas
Please visit this page, and roll over a few areas to make an idea of what I need...

There are 20 areas on the map, that when rolled over will "emphasize" by dynamically adjusting scale and alpha. This works quite nicely, but now I need to add buttons to each of them. There would be 2 buttons for most of them, while North America would have more. I would NOT want to go into each mc on the stage and edit it manually by placing buttons in each of those timelines, instead I'm thinking of attaching a button from the Library using attachMovie. However this has a down side, in that I can't make them clickable without problems - the buttons will have to stand outside some areas because they aren't big enough, and hovering these buttons will activate the onRollOut on the area..

For any suggestions, please, speak up

Attaching Buttons To ScrollPane Dynamically
Hello,

I'm hoping someone can help me with a ScrollPane issue. I'm creating an empty movieclip and trying to dynamically attach buttons into a scroll pane (placed on the stage) containing that movieclip, but the buttons extend past the scrollpane's area and the scroll bar doesn't show up.

Any help would be greatly appreciated. I have been trying to fix this issue for 3 days. Thanks!

Here is the code I'm using (code is located in an external .as file because it contains classes for xml content):











Attach Code

_root.ScrollPane.createEmptyMovieClip("topic_block", 5);
for (var i = 0; i <NavSchemaArray.length; i++) {
_root.ScrollPane.topic_block.attachMovie("topic_button", "topic"+i, _root.ScrollPane.topic_block.getNextHighestDepth(), {_y:(28*i), id:i});
}
_root.ScrollPane.invalidate();

}

Attaching Buttons To Dynamic Fields
Hi there. I'm using XML to load text in dynamic textfields but want to attach a button to every field with a different link. How to position these buttons exactly behind the text fields and give them getURLs? Thanks in advance!

I'm attaching the fla & here is the xml:


Quote:




<?xml version="1.0"?>

<mp3>

<slot
thename = "Name 1"
thelink = "sample1.mp3"

/>

<slot
thename = "Name 2"
thelink = "sample2.mp3"

/>

<slot
thename = "Name 3"
thelink = "sample3.mp3"

/>

<slot
thename = "Name 4"
thelink = "sample4.mp3"

/>

</mp3>

Attaching Buttons To Movieclips - Ideas
Please visit this page, and roll over a few areas to make an idea of what I need...

There are 20 areas on the map, that when rolled over will "emphasize" by dynamically adjusting scale and alpha. This works quite nicely, but now I need to add buttons to each of them. There would be 2 buttons for most of them, while North America would have more. I would NOT want to go into each mc on the stage and edit it manually by placing buttons in each of those timelines, instead I'm thinking of attaching a button from the Library using attachMovie. However this has a down side, in that I can't make them clickable without problems - the buttons will have to stand outside some areas because they aren't big enough, and hovering these buttons will activate the onRollOut on the area..

For any suggestions, please, speak up

Attaching Buttons To Dynamic Fields
Hi there. I'm using XML to load text in dynamic textfields but want to attach a button to every field with a different link. How to position these buttons exactly behind the text fields and give them getURLs? Thanks in advance!

I'm attaching the fla & here is the xml:


Quote:




<?xml version="1.0"?>

<mp3>

<slot
thename = "Name 1"
thelink = "sample1.mp3"

/>

<slot
thename = "Name 2"
thelink = "sample2.mp3"

/>

<slot
thename = "Name 3"
thelink = "sample3.mp3"

/>

<slot
thename = "Name 4"
thelink = "sample4.mp3"

/>

</mp3>

Buttons: Dynamic Attaching Of Button Code
Hi,

I am creating buttons dynamically inside a movie clip.

-----------------

prob1 :

When the movie clip is duplicated, the button to display inside the duplicated clip is decided upon and placed.
What i want to do is also associate some code {on() events} with the dynamically created buttons.

-----------------

prob 2:

My buttons dont work when placed inside movieclips. I always have to play around so buttons are on the root timeline for things to work. Does anybody knoe how i can resolve this?


----------------

thx

MW


--------------------------------------------------------
Flash version: FlashMX

[F8] Dynamically Attaching Movies, Making Buttons, Etc
I have a file that gets information from an xml then creates a button and sets text for each node. this is what I have so far:

PHP Code:



var aBrochureNames = new Array();
for (var j = 0; j<brochureCount; j++){
    var brochureNames = rootNode.childNodes[1].childNodes[j].attributes.NAME;
    aBrochureNames.push(brochureNames);
    set('_root.title'+ (j+1),aBrochureNames[j]);
    if ((j+1) == brochureCount){populateBrochures();}
}
function populateBrochures(){
    for (var m = 0; m<brochureCount; m++){
        var bCount = m+1;
        var myMovieClip = ['brochure_'+ bCount];
        this.attachMovie(myMovieClip, 'brochure'+ bCount +'_mc',bCount);
        this['brochure'+ bCount +'_mc']._x += 50 + (m*160);
        this['brochure'+ bCount +'_mc']._y = 410;
        var myButtons = ['brochure'+ bCount +'_mc'];
        buttons(myButtons, m);
    }
}
function buttons(btn, m){
    btn.onRelease = function(){
    }
}




the first chunk gets the names from xml and creates variables.
the second chunk places the clips and assigns the names.
but I can't get them to be buttons.. it all works except for the button part.


IMS

Dynamically Creating/attaching Buttons For Portfolio
Hi all,

I have a question here: It's for my portfolio section where there's a list of projects. And under each project there's also a number of images to be showcased. Right now i have a row of numbered buttons which indicate the page to scroll to. However, there's a long list of projects so is there a way to create or attach the buttons dynamically, like store them in an array..? So that when clicking on the individual project, a different number of buttons will appear. Sorry to trouble ..but thanks anyway : )

regards,
Jen

Attaching Code To Multiple Buttons Cleanly
Hey all,

Hopefully an easy one.

I have a series of buttons, and I want the same code applied to them all, to handle rollover states etc... Normally I'd do this useing registerClass, but in this case the buttons are added to the stage manually so I can't.

I could do somehting like this:


Code:
home_btn.onRelease = news_btn.onRelease = about_btn.onRelease = function() {
// do something
}
But that seems very messy, and I have about 10 buttons, and multiple states.

Any suggestions?

Thanks.

Attaching Sounds To Buttons, That Load Into New Levels
Hello and Help!!

I've got a problem thats driving me nuts this morning.
Basically I have created a movie which consists of a load of buttons, which when rolledOver play a sound.

The sound is attached using actionscript like so

on (rollOver) {
flowersound = new Sound();
flowersound.attachSound("3.mp3");
flowersound.setVolume(70);
flowersound.start(0, 1);
}

3.mp3 has linkage export for actionscript ticked.

Everything works fine when I test the movie, however once I try and load this movie on top of my main interface, all sounds stop

im using this to load the movie

on(press, release){
loadMovieNum("murakamigiggle.swf",5);
}

I don't have any other sounds playing in the lower levels.

[AS3] Attaching Buttons / Movieclips From Library That Contain Other Items Already
So im trying out AS3 and kinda havin some issues. I want to be able to attach a button or a movieclip that I have constructed in the Flash IDE - it contains a textfield, some other movieclips, etc.

If i make it a button, I have tried subclassing the simplebutton class, attaching that class to the button, and then creating new instances of that class. That works fine - until I have to access, say, a textfield in the button. It seems that these elements are drawn, but are not accessible (or even connected in any way - i used flash.utils.descibreType(mybutton) and the instance names dont even show up in the XML).

So, I thought about a different route - using a movieclip or sprite, and making it react LIKE a SimpleButton. Not what I had in mind, but whatever. Unfortunately, it seems that when I subclass Sprite or MovieClip, the class has to be made dynamic in order to attach things to it from within the IDE before compilation (as opposed to from actionscript).

What is the best method to create a button in the Flash IDE with textfields, sprites, etc, and have access to those elements from the class that's attached to the symbol??

Stupid Buttons...
Hi.

I'm working on a very basic website. I'm new to Flash MX. Here's the problem. When I am working in Flash MX, the buttons work fine- they link to a frame in the same scene.

The problem occurs when:
1) I test the movie
2) I export the movie to an SWF file.

*sigh*

Please help! The buttons don't even have a hand-icon over them. It doesn't treat them like links at all, just text. This only happens in the above two instances.

Thanks!
Angela

Stupid Buttons...
My friend sent me a button menu to put on my site. I have tried over and over to get the tutorials down on how to link the buttons to another media. What i am doing is a cd interactive thing of the show "the family guy". I have a lot of clips and i want for a movie to popup after you click on one of the menus. the buttons are already there i just need to know the rest. please help.

Stupid Questions About Buttons
Ok this might be a stupid question about buttons. Ok here goes... Im trying to make one button that is in a movie clip, then to have the movie clip on stage at different points, then to have each button move when one of the buttons is rolled over (mouse event rollover)...actually in a _y setting. i can get the buttons to move but they're not moving correctly...i dont have a problem with doing it with one button. but it seems that the other ones are getting in the way. Not sure if this is right but, i tried to change the instance name on one of the buttons, but they all seemed to change.???

Any ideas??


thanks

Stupid Bloody Buttons
i have a vertical row of buttons (moveclips really) down the left side of my page. when u rollover an animation plays on the button. the thing is, when u put the mouse between 2 buttons u can make them both play. the buttons arent overlapping and are point-pixel perfectly touchin. i even if i seperate the 1 pixel apart this still happens. is this something im goin to have to live with or can i sort this out in anyway?
cheers
jh

Buttons A Really Stupid Question.
hi...im currently in the process of building my first flash site. on my site i have a pop down menu which is revealed by an icon at the bottom of the menu which i have working. however i would like the same icon to hide the menu again if the menu is in a revealed state. ill happily upload link the file if you need an example of what i mean.

thanks.
dom

Problem Attaching GetURL Links To Dynamically Generated Buttons
I have a series of buttons on stage - dynamically generated from a single mc - inside of which is a button. After the buttons finish populating the stage I want to be able to click on each one and getURL.

Here's the code I have so far - but it disables the rollover effect of the button and each URL is the last one when clicked - even though I've added a counter.


Code:
for (z = 0; z <= mySignsLength-1; z++) {

//"sign"+z are the mcs at level0.sign0, _level0.sign2, _level0.sign4, etc.
this.signMC = eval("sign"+z);

//names is the array - letterNum is letter of the alphabet, 2nd element is the URL for each one
var addressz = names[letterNum][z+1];

signMC.onPress = function () {
getURL(addressz);
trace("click")
trace(addressz);
}

//increment to get each mc and skip URLs
z++
}
Any idea what I'm doing wrong here?

Thanks
Charles

Stupid Question. Buttons/clips
i'm having a hard time gotting a button to somehow change a clip:

all i want is a movieclip to play(); when the button is clicked

movieclip:
stop();

button:
on (release) {
this.movieclip.play();
}

i've tried this.movieclip.play();, _root.movieclip.play(), just movieclip/play();. i can't get the two objects to work together. what the hell? what am i doing wrong?

Stupid Question About Buttons Within Movies
This is probably an easy fix but I can't find it. I have buttons within a movieclip, when the user clicks on them i need them to be taken to another scene, but the gotoandplay isn't working correctly. I found in help that in order for this to work the button has to be on the main timeline, so what actionscript will get my nesteled button to work?


Thanks!

Stupid Buttons Dont Work...
I am really starting to hate buttons. I was "following along" with a tutorial to make this site that has no purpose and probably wont be published to the web, and my buttons dont work!
I was looking at some of the code and I was like, this isnt gonna work.
Code:
on (release) {
tellTarget (rollover) {
gotoAndPlay (homeover);
}
}
on (rollOver) {
tellTarget (rollover) {
gotoAndPlay (homeover);
}
}
on (rollOut) {
tellTarget (rollover) {
gotoAndPlay (homeout);
}
}

I got this code off of www.kirupa.com(hehehehe). I think this tutorial was made for flash 5 or somthing, be that the case.

I added the .fla if you want to take a look on what the hell I am doing wrong. I did remove some things from the movie inorder to post it, but they werent tied to the content bar, just some corner animations.

Interactive Buttons...A Very Stupid Question. Easy Fix.
I'm aware of the buttons' up/down/hit..etc states. Unfortunately, I need to make something a bit more ambitious and this is a very stupid question...

I have a bitmap that I'm loading transparent objects over(on a different layer). I want to make it so that when a specific object is either clicked or rolled over, the movie will skip to that specific layer...and *stay there*. Then, when the object is clicked or rolled out again, the movie skips back to frame one. I want to make several layers with different objects but I'm assuming it's all the same. Both my Flash books don't go into this kind of detail.

I created the bitmap layer and it's sitting on it just fine. I created another layer: LAYER2 and I placed a button symbol on that layer, that is set to alpha 0%, called BUTTON1.

On the second frame of LAYER1, I have the keyframe for the bitmap background duplicated. I also have, on LAYER2, the transparent object duplicated on the second keyframe.

I set actionscript on BUTTON1, in keyframe 1 of LAYER2 to:

on (press) {
gotoAndStop(2);
}
on (release) {
stop();
}

My problem is, when I test the movie, it doesn't stop. It flashes between frames 1+2. :/ I also can't figure out how to release the click or rollout to go back to layer one.

I'm sure this is a rudimentary problem. If anyone could help me, I'd be *much* appreciated.

Mad.

Stupid Q Re: Buttons Not Working Within A Movie Clip
This is one of those things that happens and I rack my brain and overlook something stupid.

I have a MC that contains a few buttons. When I enable simple buttons in FlashMX, the button states function when I am editing the MC.

However, when I export the swf file, or test the file (CTRL+ENTER), the button actions do not work.

It seems to me that this should not be happening.

Stupid Buttons Wont Work (REDUX)
Well, I was grateful for the help I received the first time, but I am back for more.

(.fla is added)

The content bar is working, but in order to animate the buttons like that I made them movie clips. When you highlight the button, it plays the movieclip right overtop of the button. I am not sure what went wrong here, but now, whenever I make an action for the button to actually do something, play an animation to show the news...... it doesnt do anything!. Help appreciated, Comments are good too. Just incase some noobie flash guy comes along, and decides to download this, I removed alot of the site features, like bg animations, and music. Nothing with the content bar is tied to that.

Buttons Actions...
I have these buttons that make up my menu on my website. I also have scrolling text box. Is there a specific action I can use to make the buttons load the content into my text box.?

Actions For Buttons?
Hi
I'm trying to make an easy stop and go button for my movie clip. But I can't add actions when they are 'hit'. Can somebody help me, to explain how to do this.
THX
Sunny

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