Unable To Apply Any Actions To Buttons.
Hello, I am trying to apply the geturl action to a button in Flash 5 that would allow me to link to a new url. The frame actions pallete will not allow me to drag and drop or double click on any of the actions. Even clicking in the parameters section of the pallete to type code will do nothing. I think I have covered the basics with making a new button symbol and applying key frames to each state of the button. Anything simple I may have overlooked?
Thanks! cj
FlashKit > Flash Help > Flash Newbies
Posted on: 03-10-2004, 10:30 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Cannot Apply Actions To Buttons
Hello everyone, I appear to be having a strange problem that I can't find anywhere else in actionscript 3.
I make a button (right click -> convert to symbol -> button) and then I open my actions panel and it says that the actions cannot be applied to it ... I'm positive that the button was selected and it is a button.
anyway, when I do the same thing in actionscript 2 it works flawlessly
any suggestions? thanks
Unable To Add Actions To Buttons
I am not sure if I turned something on or off by accident but for the last week I am unable to add any actions to my UP, OVER, DOWN or HIT frames in my buttons... Any ideas?
Thanks
Unable To Apply Blur Filter
The code below fades three mc instances into each other. The movieclip instances are called, picture1_mc, picture2_mc,picture3_mc. They are based on three bitmap images that also sit in the library. I manually converted the original bitmaps into movieclips on the stage area. The fade code works fine, but what I would like to do is allow the user to
mouse click and cause a blur effect whilst the images are cycling along. My problem is that Im not sure how to apply this within my mousedown function. The applyFilter method seems to call for bitmaps but I'm dealing with movieclips. Thanks for any guidance
import flash.display.BitmapData;
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.filters.BlurFilter;
var filter2:BlurFilter = new BlurFilter(Math.ceil(Math.random()*5), Math.ceil(Math.random()*5), 3);
init = function () {
currentIndex = 1;
currentLayer = 1;
howLongToWait = 0;
_root.attachMovie("picture1_mc", "pic1", 0);
addNewPic();
};
addNewPic = function () {
clearInterval(myInterval);
if (currentIndex%3 != 0) {
currentIndex++;
} else {
currentIndex = 1;
}
newlyAdded_mc = _root.attachMovie("picture"+currentIndex+"_mc", "pic"+currentIndex, currentLayer++);
newlyAdded_mc._alpha = 0;
newlyAdded_mc.onEnterFrame = function() {
this._alpha += 2;
if (this._alpha>=100) {
this.onEnterFrame = null;
myInterval = setInterval(addNewPic, howLongToWait*100);
}
};
};
// run init()
init();
onMouseDown = function ()
{
//problems here!!!!!!!!!
var pointoint = new Point(_root._xmouse, _root._ymouse);
var rec:Rectange = new Rectangle(100,100,6,6);
//problem applying filter
//????.applyFilter(?????,rect,point,filter2)
};
myListener = new Object();
Mouse.addListener(myListener);
Unable To Apply Blur Filter On Mouse Down Event
The code below fades three mc instances into each other. The movieclip instances are called, picture1_mc, picture2_mc, picture3_mc. They are based on three bitmap images that also sit in the library. I manually converted the original bitmaps into movieclips on the stage area. The fade code works fine, but what I would like to do is allow the user to
mouse click and cause a blur effect whilst the images are cycling along. My problem is that Im not sure how to apply this within my mousedown function. The applyFilter method seems to call for bitmaps but I'm dealing with movieclips. Thanks for any guidance
import flash.display.BitmapData;
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.filters.BlurFilter;
var filter2:BlurFilter = new BlurFilter(Math.ceil(Math.random()*5), Math.ceil(Math.random()*5), 3);
init = function () {
currentIndex = 1;
currentLayer = 1;
howLongToWait = 0;
_root.attachMovie("picture1_mc", "pic1", 0);
addNewPic();
};
addNewPic = function () {
clearInterval(myInterval);
if (currentIndex%3 != 0) {
currentIndex++;
} else {
currentIndex = 1;
}
newlyAdded_mc = _root.attachMovie("picture"+currentIndex+"_mc", "pic"+currentIndex, currentLayer++);
newlyAdded_mc._alpha = 0;
newlyAdded_mc.onEnterFrame = function() {
this._alpha += 2;
if (this._alpha>=100) {
this.onEnterFrame = null;
myInterval = setInterval(addNewPic, howLongToWait*100);
}
};
};
// run init()
init();
onMouseDown = function ()
{
//problems here!!!!!!!!!
var point:Point = new Point(_root._xmouse, _root._ymouse);
var rec:Rectange = new Rectangle(100,100,6,6);
//problem applying filter
//????.applyFilter(?????,rect,point,filter2)
};
myListener = new Object();
Mouse.addListener(myListener);
Cannot Apply Actions
I have a button that whenever I try to apply actions to it, it keeps saying,
"current selection cannot have actions applied to it." I have tried
applying actions to the button by double clicking on the button as well as
the movie stage. Either way I get the above message.
Any ideas what might be causing this message on a button?
--
Brandon
How To Apply Actions To This?
This is the code and my question is, where and HOW do i write my actions? My submenu sections is some external swf's called sub1.swf, sub2.swf, sub3.swf etc.
Cascading Menu v1.0
Simon Coulton (s_coulton@hotmail.com) - 8/5/2006
// Functions ------------------------------------------------------------------------
_global.$tweenManager.broadcastEvents = true;
// Main menu
function createMainMenu() {
var a = 1;
var total = mm_array.length;
while (a<=total) {
ypos = ((a-1)*homm)+1;
attachMovie("mainnav_mc", "mainnav"+a+"_mc", this.getNextHighestDepth()+100, {_x:0, _y:ypos});// attach the movieClip
var nc = this["mainnav"+a+"_mc"];
nc.menutext = mm_array[(a-1)];// set the title text for each button
nc.itemnum = a;// set the menu #
a++;
}
}
function moveMenu(num) {
if ((_root.collapsed == true) || (_root.selectedmenu != num)) {
var array = "sm"+num+"_array";
var totalsm = eval(array).length;
var totalmm = mm_array.length;
var a = 1;
while (a<=totalmm) {
mc = this["mainnav"+a+"_mc"];
if (a>num) {
var ypos = (((a-1)*homm)+1)+totalsm*(hosm+1);
mc.tween("_y", ypos, 0.5, "easeOutBack");
} else {
var ypos = ((a-1)*homm)+1;
if (a == num) {
nypos = ypos;
mc.tween("_y", ypos, 0.5, "easeOutBack", 0, onEnd(num, nypos));
} else {
mc.tween("_y", ypos, 0.5, "easeOutBack");
}
}
a++;
}
_root.collapsed = false;
} else {
contractMenu()
_root.collapsed = true;
}
}
function onEnd(num, nypos) {
_root.num = num;
createSubMenu(num, nypos);
}
function contractMenu() {
var c = 1;
while (c<=submenu_array.length) {
removeMovieClip("subnav"+c+"_mc");
removeMovieClip("mask"+c+"_mc");
c++;
}
var g = 1;
while (g<=mm_array.length) {
ypos = ((g-1)*homm)+1;
this["mainnav"+g+"_mc"].tween("_y", ypos, 0.5, "easeOutBack");
g++;
}
}
function createSubMenu(num, nypos) {
var array = "sm"+num+"_array";
var totalsm = eval(array).length;
var ypos = nypos+4;
var c = 1;
while (c<=submenu_array.length) {
removeMovieClip("subnav"+c+"_mc");
removeMovieClip("mask"+c+"_mc");
c++;
}
submenu_array = [];
var a = 1;
while (a<=totalsm) {
ypos = ypos+hosm+1;
attachMovie("subnav_mc", "subnav"+a+"_mc", a+30, {_x:0, _y:ypos});
if (num != mm_array.length) {
attachMovie("mask_mc", "mask"+a+"_mc", a+990, {_x:0, _y:0});
mask_mc = this["mask"+a+"_mc"];
mask_mc._alpha = 10;
mask_mc.onEnterFrame = function() {
this._height = _parent.container_mc["mainnav"+mm_array.length+"_mc"]._y;
};
this["subnav"+a+"_mc"].setMask(mask_mc);
}
nc = this["subnav"+a+"_mc"];
nc._alpha = 0;
nc.itemnum = a;
nc.menutext = eval(array)[(a-1)];
nc.alphaTo(100, 2);
nc.onRelease = function() {
// Function to get submenu actions needs to go here
var my_str:String = new String(this);
_root.select = "You have selected "+my_str.slice(18);
};
submenu_array.push("subnav"+a+"_mc");
a++;
}
}
// Build Menu -----------------------------------------------------------------------
_root.collapsed = true;
createMainMenu();
Can't Apply Actions?
Hello, I have a flash header with several buttons that I have added the geturl action to. But I'm having problems with these three buttons that won't let me add an action script to them. Ok I'll try to explain this in the best possible way:
I have a button clip named "login button clip" and it has three sections:
'actions for frame 1'
'actions for frame 10'
'actions for button area 8'
But for some reason 'button area 8' will not let me add ANY type of action to it, it gives me the following error:
Code:
Current selection can not have actions applied to it
Is there a way to unlock this button area or something? (sorry but i'm kind of new to flash)
[CS3] Apply Actions To Multiple Items
Probably a very newbie and simple question.
Why can't I select several movieclips on stage in order to paste the same actions to them?
I need the same actions on these button clips, with slight variations.
Thank you!
[CS3] Apply Actions To Multiple Items
It's supposed to be an easy question, still I find no answer for it.
Why can't I select several movieclips on stage in order to paste the same actions to them?
Is there an alternative way of doing that?
I need the same actions on some movie clip instances, with slight variations.
Thank you!
[CS3] Apply Actions After Added To Stage
Hello again everyone...
Really appreciate all the help I've been getting here! Hoping I can rely on you guys for one more:
I have a menu Movie Clip (embedded) that consists of a keyframed animation. Once you click a main button, the animation plays and the other buttons reveal themselves within the embedded menu MC. The issue is that the buttons don't exist on the stage until it's their turn to animate, so I can't figure out a way to apply my button actions from the main timeline (as their respective targets don't exist yet).
Does anyone have a suggestion on how to add the button actions as the button MC's are added?
Loaded Movie Unable To Use Goto Actions
Hi there:
Im developing a flash photogallery with about 800 images. do the large number of images I decided to split them in separated swf files, and load them to a main interface using loadMovie. The problen is that the independent swf files holding the images use a flash MX component called "mc, controller" that I got from a flash template. this component is designed to work placing the images in the main timeline (the code has several references to "_root"), so.. if i load this swf and place it inside a movieclip it stops working. so I decided to load it to a empty scene in level 1. Here comes the tricky thing.... it loads beautyfully, BUT when I try to go to an other scene it simply doesn't work...
here is the code of the boton that is soposed to go to a different scene, it is located inside the "mc, controller" component:
on (release) {
tellTarget ("_level0") {
gotoAndStop("fotos", "fotos_main");
}
}
I´d also tried using relative and absolute path, and dot notation:
this._parent.gotoAndStop("fotos", "fotos_main");
_root.gotoAndStop("fotos", "fotos_main");
_level0.gotoAndStop("fotos", "fotos_main");
I have allready tested like 20 diferent aproches to solve this but no one seem to do it right.. please help me, or lend me a gun to blow my brains out
sorry for the english... me not native speaker...
Attach Movie (attaches, But Doesn't Apply Other Actions)
hello everybody,
i have a problem with this code,that i can't pick, the movie is attached in its place normally but the functions that i used to use over the movieclip are not working and i don't know why ?? , when i replace attachMovie with making the movieClip visible and unvisible it all goes well, but i prefer to use attachMovie, can u help plz
1.the attachMovie code
Code:
on (release) {
txtwinp.attachMovie("txtwin", "textwin1", 1 );
// txtwin._visible=true;
}
2. the functions used over this movieClip
Code:
////////////////// txtscale ////////////////
new Object("test");
//txtf = function() {
txtwinp.txtsmall.onRelease = function() {
for (m=1; m<7; m++) {
figures["ans"+m+"txt"]._xscale = 50;
figures["ans"+m+"txt"]._yscale = 50;
}
};
//----------------------------
txtwinp.txtmed.onRelease = function() {
for (m=1; m<7; m++) {
figures["ans"+m+"txt"]._xscale = 57;
figures["ans"+m+"txt"]._yscale = 57;
}
};
//----------------------------
txtwinp.txtlarge.onRelease = function() {
for (m=1; m<7; m++) {
figures["ans"+m+"txt"]._xscale = 80;
figures["ans"+m+"txt"]._yscale = 80;
}
};
//----------------------------
//txt on-off
textwin1.txtoff.onRelease = function() {
for (m=1; m<7; m++) {
figures["ans"+m+"txt"]._visible = false;
_root.txtdisplay = false;
}
};
txtwinp.txton.onRelease = function() {
_root.txtdisplay = true;
for (m=1; m<7; m++) {
figures["ans"+m] = mathQuiz[index]["a"+m];
figures["ans"+m+"txt"]._visible = true;
}
};
////////////////// txtscale ///////////////////////
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!)
Apply To All Buttons ?
[actions script 2.0]
Hi I am writing this code on a bunch of buttons and was wondering if there was a way I could apply some sort of generic thing like move the button 2spaces away. ? Instead of defining exactly where they go on x and y.
Thanks in advance. Charmed
mc4.onRollOver = function(){
var myTweenX:Tween = new Tween(mc3,"_x",Strong.easeOut,mc3._x,939,.2,true);
var myTweenY:Tween = new Tween(mc3,"_y",Bounce.easeOut,mc3._y,176,.2,true);
var myTweenX:Tween = new Tween(mc5,"_x",Bounce.easeOut,mc5._x,920,.2,true);
var myTweenY:Tween = new Tween(mc5,"_y",Strong.easeOut,mc5._y,244,.2,true);
};
mc4.onRollOut = function(){
var myTweenX:Tween = new Tween(mc3,"_x",Strong.easeOut,mc3._x,935.3,.2,true );
var myTweenY:Tween = new Tween(mc3,"_y",Bounce.easeOut,mc3._y,183.9,.2,true );
var myTweenX:Tween = new Tween(mc5,"_x",Bounce.easeOut,mc5._x,929.8,.2,true );
var myTweenY:Tween = new Tween(mc5,"_y",Strong.easeOut,mc5._y,234.8,.2,true );
};
Apply One Function To Sequence Of Buttons?
I've created a function that loads the thumbnail that corresponds to the picture and it works fine;
function loadThumb(){
thumbLoader.loadMovie(this._name+"_t.jpg");
}
I have 200 buttons named sequentially (b1, b2, b3, b4 etc.)
Do I need to type out each button individually to apply the function, like this:
b1.onRollOver=loadThumb;
b2.onRollOver=loadThumb;
Is there a better and faster way to write this code?
Any help or ideas would be great.
Apply A Function To Multiple Buttons
Hi, this is a REAL basic one for you:
This is my script:
count = 0;
btn_01.onRelease = function() {
if (count<=20 && this._currentframe == 1) {
_root.count += 1;
this.gotoAndStop(2);
trace(count);
} else {
if (this._currentframe == 2) {
_root.count -= 1;
this.gotoAndStop(1);
trace(count);
}
}
};
Instead of applying it to just one button I want to apply it to many on the stage, how do i add the names of the buttons to the function? I tried separating with commas but no luck
[CS3] Unable To Remove Buttons/ Movieclip
Hello... I am an ActionScript newbie. I followed a tutorial from computer arts magazine, to create a portfolio using actionscript and xml. I linked the portfolio to several scenes in flash, such as contents and contact details. My problem is that when I placed a button "back" on the main stage of the portfolio, to redirect to the contents page, the list of artworks thats populated from xml remains on the next scene, or any other scene i link it to. I tried using unload movie clip, but nothing is working. Please Help. This is my actionscript:
I don't if this helps, but I get this message in the output panel: Target not found: Target="_root.btn_projectsundefined" Base="_level0"
Attach Code
// Create arrays ready for the xml data
namesArray = new Array();
linksArray = new Array();
descriptionsArray = new Array();
filesArray = new Array();
// Load XML doc
objXML = new XML();
objXML.onLoad = loadXML;
objXML.ignoreWhite = true;
// The name of your XML file
objXML.load("ss_flash_folio.xml");
/////////////////////////////////////////////////////////////////////////////////////////
// onLoad XML function
function loadXML(success) {
if (success) {
// If the XML loads successfully, count how many projects there are in the file.
_root.projectCount = this.firstChild.childNodes.length; // PROJECT node in XML file
// Then run a function that builds arrays out of the XML data.
SS_Arrays();
} else {
// If the xml data did not load, show message on stage by populating the description field.
_root.description = "Error: Could not load XML";
}
}
/////////////////////////////////////////////////////////////////////////////////////////
function SS_Arrays() {
for (var count = 0; count < _root.projectCount; count++) {
var nodeObj = objXML.firstChild.childNodes[count];
namesArray[count] = nodeObj.attributes.name;
descriptionsArray[count] = nodeObj.attributes.description;
linksArray[count] = nodeObj.attributes.link;
filesArray[count] = nodeObj.attributes.file;
}
// run the function to create the thumbnail and list view buttons
SS_createButtons();
}
/////////////////////////////////////////////////////////////////////////////////////////
function SS_createButtons() {
// First of all we want to hide the master button on the stage (btn_projects_main)
// because we'll be making duplicates of it in the next part of the function
_root.btn_projects_main._visible = 0;
// Work out the X and Y positions of the main button so our new buttons start in the same place
// (Which means where ever you position the main button is where the navigation will start).
btn_xPos = _root.btn_projects_main._x;
btn_yPos = _root.btn_projects_main._y;
// Set the distances between your buttons and the number of rows
btn_xDistance = 140;
btn_yDistance = 13;
btn_numOfRows = 4;
// This figure is used to work out when to start a new column of buttons
// Loop through the projects array and create a button for each one by duplicating the original.
for (count = 0; count < _root.projectCount; count++) {
duplicateMovieClip(_root.btn_projects_main, "btn_projects" + count, count);
// As the button is created, set it's X, Y & text properties
_root["btn_projects" + count]._x = btn_xPos;
_root["btn_projects" + count]._y = btn_yPos;
_root["btn_projects" + count].text = namesArray[count];
// set the X position for the next button
if(btn_yPos == btn_yMax){
// if the last buttons was the last row in the column (based on it's Y position) then start a new column
// by resetting the Y position and adding 140px (btn_xDistance) to the the X position.
btn_xPos = btn_xPos + btn_xDistance;
btn_yPos = _root.btn_projects_main._y;
} else {
// if it's not the last one in a row, simply move it along the Y axis.
btn_yPos = btn_yPos + btn_yDistance;
}
}
// Load the first project (number 0) to avoid an empty screen
SS_load_project(0);
// Make the first project button highlighted
tellTarget(_root.btn_projects0){
gotoAndPlay(3);
}
// Set the current button variable so we know which button to switch off when another one is pressed
_root.curButton = "0";
}
/////////////////////////////////////////////////////////////////////////////////////////
function SS_load_project(arrayNumber){
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.
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
Actions On Buttons
I've created a button. It has been used all over my movie. I have now decided to add an action to that button but dont want to have to add it to all its instances and dont want to create a button within a button with an action attached to it as that would mean swapping the button instances with the 'actioned buttoned' instances.
So basically what i want to do is create an action that is universally throughout the whole movie associated with the button. so a movie script [like you can do in lingo] that states that whenever button x is hit action x occurs.
anything? anyone?
thanx
Reem
......actions To Buttons?
ok, i know that what i am about to ask is funny to most of you...but i have almost no idea about flash, although i use some features to support Director8.5..
I want to create a button in flash and then place it into director(u know flash creates great graphics...).The prob is that i do not know much things about creating a button/ i have a book that explains about hit/over..etc states but i do not know how can i apply an action to it..
thanx all in advance
Buttons-actions
ok so i have a button in scene 1 an on release goto scene 2 what must i put in the keyframe of scene 2 to make it play i thought " ofcourse " play well that dont work.
Please help
How To Use Actions With Buttons?
I simply need a button to go to a different scene, frame 1 when I click it. What action to I use? Where do I put that action? Do I put it on my over frame? Do I put it on my down frame?
If I use the "onRelease" action, what should I put as my object? It's all very confusing to me but everyone seems to know how to do it. Can someone please clue me on on this, the most simplest of Flash actions?
Actions And Buttons
I have been trying to apply actions to a button. I put a simple button in one layer. In the second layer, I have a movie. (yes, i got this from a tutorial). In frame 1 of the button layer, i applied the following actions:
on(rollOver){
tellTarget("buttonover"){
gotoAndPlay(2);
}
}
on(release, rollOut){
tellTarget("buttonover"){
gotoAndPlay(3);
}
}
everything is laid out right, but in the output window i get the following error:
"Scene=Scene 1, Layer=button, Frame=1: Line 1: Mouse events are permitted only for button instances
on(rollOver){
Scene=Scene 1, Layer=button, Frame=1: Line 6: Mouse events are permitted only for button instances
on(release, rollOut){"
As far as I can tell, I am applying this to an instance of a button. I messed with trying to do this in Flash MX before finding this tutorial. I did the tutorial to a "T" in both MX and 5. Both gave the same error.
A Thousand Thank You's for your help.
Actions In Buttons
Hey all!
Is it impossible to put the action:
on (release) {
nextScene();
}
in a button that follows a guide inside a movieclip?
Buttons And Actions...
Im having some trouble with having a button open up a seperate window for a website...im not too sure on the actionscript so if anyone could help me out that would be greatly appreciated...thx
Actions For Buttons
So I'm guessing this has an easy answer but haven't been able to find it on my own.
I've created 4 buttons that are in a horizontal line. Which ever the user selects moves to the far left and the other 3 move to the right. I've set up all possible scenarios of going from one button to another to another. The problem is I can't figure out the proper actions to take from scene 1 to 2...stop at the end of 2...select a button that will take me to 3...stop at the end of three...select 4...etc.
I'd appreciate any help!
Thanks!
Actions To Buttons - HELP
Hi I downloaded the attached .fla icon menu and I'm trying to associate actions to the buttons. Like "about me" goes to about.html. The problem is I cant figure it out. Any help would be appreciated.
thanks in advance
Actions For Buttons And Mc's
Hi everyone
I have this small problem with writing actionscript for buttons (take the "home" button for example) . What i need to do is tell the button to play two movieclips at the same time when the button has been clicked. these movie clips arn't external swf files. they are just sittin there in my library but i cannot get them to play when they are meant to. The two m's are in another movie clip. it looks sorta like tiz mc_1>mc_2 & mc_3. so you see i have the two movie clips in the mc_1. (frame one i have the mc's for the home button, frame two i have the mc's for the music button ect) All i need is a code which would open the two home mc's and play them when home button had been clicked.
If this is a newbie question please let me know and i'll go post at newbies.
Any help would be much appreciated
Buttons Actions?
im a newbie in flash, so I was wondering how you would get a button to load a url in a new window after being clicked on.
So far I have tried the following code on the first frame of the button.
on(release) {
getURL(http://google.com, '_blank')
}
It says the above has two errors wrong with it. I'm sure many of you know already what they are.
I know how to make a button, just not how to make it do things. Any help would be appreciated. Just trying to learn Flash.
Buttons / Actions
Hello
Pretty new to Flash, but used to be able to work one of the older versions some time ago. I'm now working with Flash MX 2004, which seems very different to the version I know. The basic animation and timeline etc is the same, however I cannot get the buttons to work.
All I want to do is to press a button and have it link to another scene. The code I'm insering is :
on (press) {
gotoAndPlay( "cards" );
}
This sometimes works, and sometimes doesn't! Seems very temperamental! When I link the button to go to the next scene, I use this:
on (press) {
nextScene();
}
This works every time, but I need to have more than one scenes!
Please help!!
Thanks.
Buttons And Actions
Hello,
I'm trying to do a book layout site so, upon clicking a link, the page turns and you go to a different scene. I have 2 page transition movies as 1 page has a totally different bg.
My question is, how can I tell a button to play a movie clip (or scene) and then go to another scene? (I must be able to change the 2nd scene)
In other words, click, play the appropiate pge transition and then go to the appropiate scene?
Thanks for the help,
Polett.
Buttons Actions?
Hi, I want to resize a movie clip with ease and I place this code in the first frame:
h = 1020;
mc.onEnterFrame = function() {
mc._height += (h-mc._height)/3;
if (mc._height == h) {
delete mc.onEnterFrame;
}
};
And after I delete the onEnterFrame.
Then I want that a button that I have on the stage, when it's clicked, resizes again the mc.
What code should I write on the buttons actions to start again the function?
Thanks in advance
Can't Add Actions To My Buttons
Hello, this might be a stupid question to some of you but I can't seem to add any actions to my symbol buttons.
When I select my button, the actions window displays this message "Current selection cannot have actions applied to it".
I seem to only be able to add actions into frames, however, when I download movies from flashkit and buttons have actions I am able to copy them into my movies and edit the actions...grrrrrr, help, help, help, I don't to have to do that every time I want to add a button into my movies.
Add Buttons In Actions
Probably the most stupid question of this forum, but I created a menu with a few buttons (symbols). When I go to Actions I can't see this items under Scene 1. How do I get them their so I can put some code on every button.
THX
I'm using Flash CS3 Pro.
Actions To Buttons
Hi there,
I`ve got some simple text buttons animating in across the page. Once they are in place I want to be able to click on one and bring up a section of text on the same page.
I`ve turned the text into a movie clip and put it inside the down state of the button. This works when you click on the button but only if I keep the button pressed down.
How do I apply the action to the button to enable me to click it once and have the text remain visible until my next choice.
My ActionScript knowledge is very limited so I would appreciate a more detailed reply.
Thanks
Toner
Buttons With 2 Actions
OK i have a button that i want to apply 2 actions to. here are the codes
on (release) {gotoAndStop(36);
}
and the other code is
on (release) {
loadMovie("driver4.1 final copy.jpg","empty")
}
Now how would i properly combine theese 2 actions into 1 button? thanks
Dynamic ACTIONS To Buttons?
I am playing with a open source file
which is a dynamic drop down menu
which can be seen at http://www.exile.com.au/ac3/
my question is how can i give these buttons actions?
to go to different HTML pages
can anyone help?
the code in the drop down menu movie is
onClipEvent (load) {
// -- set up names of main items here
// -- you can add as many new sections as you want (or your computer can handle)
mainSections = new Array("Home", "Activites", "Regional Activites", "Communications", "Research");
// -- one array for each main Section -
subSection0 = new Array("what do we do", "Structure", "Staff");
subSection1 = new Array("Financial Services", "Manufacturing", "Mining", "CRM", "Digital Asset", "Facilities");
subSection2 = new Array("Hunter", "Illawarra", "Western Sydney", "Central West", "Technology Diffusion");
subSection3 = new Array("Reports", "Presentations", "Press Realeases", "Newsletter", "Events");
subSection4 = new Array("Education", "Visualisation", "ComputationalFinance", "Research Areas", "CRC");
// --
// --
// -- build the main buttons
for (i=0; i<mainSections.length; i++) {
attachMovie("mainButton", "main"+i, i+100);
myButton = this["main"+i];
myButton.subs = this["subSection"+i];
myButton.button.value = mainSections[i];
myButton._x = myButton._width*i;
// -- build subsection buttons for each main button
for (x=0; x<myButton.subs.length; x++) {
myButton.attachMovie("subButton", "sub"+x, x);
mySub = myButton["sub"+x];
mySub.button.value = myButton.subs[x];
mySub.button.outYpos = myButton._height+(mySub._height*x);
}
}
// -- function that opens the subsection on rollover
function openSubs (target) {
for (i=0; i<this[target].subs.length; i++) {
subMenuCounter = 0;
this[target]["sub"+i].button.newY = this[target]["sub"+i].button.outYpos;
currentOpen = target;
}
}
// -- close subsections function
function closeSubs (target) {
for (i=0; i<this[target].subs.length; i++) {
this[target]["sub"+i].button.newY = this[target]["sub"+i].button.oYpos;
}
}
// - this is the fuction you would change to load content, or add more functionality to the buttons
function doSubSection (target, sub) {
_root.currentSelection = target+" "+sub;
closeSubs(currentOpen);
}
}
onClipEvent (enterFrame) {
// -- a timer that closes the menus after a certain amount of time
subMenuCounter++;
if (subMenuCounter>1000) {
closeSubs(currentOpen);
subMenuCounter = 0;
}
}
onClipEvent (mouseUp) {
// -- this closes the curently open submenu if the user clicks outside of the menu
if (!this.hitTest(_root._xmouse, _root._ymouse)) {
closeSubs(currentOpen);
}
}
Buttons With Multiple Actions
Hi There,
I'm creating a flash web site and am having a few problems. I have a main page with four buttons along the bottom. Also on the time line are four movieclips which are the other pages. When I click the first button, The first movieclip begins which slowly builds up parts of the page. It then has a stop action once the page has got to where I want it. After this stop action, the movieclip continues and dismantle's the page. I am trying to get it so that, once a movieclip has got to that stop action, when you press a different button it will finish the movieclip that is displayed(closing that page) and then run the first part of the other movieclip.
Any ideas how to do this?
Hope this makes sense (I'm having trouble explaining this)
I've spent ages creating all my pages and just can't figure this one out, so please, any help is greatly appreciated.
ps. I'm using Flash 4, and have little programming experience, so if you could reply in simple terms, that would be great.
Cheers
Ben
What Actions Do I Assign To My Buttons?
I was wondering, if im making a website entirely in flash
what actions do i put on my buttons????
for example, if i click on button "#1" it plays an animation and if i click button "#2" an animation plays closing button "#1"'s animation. (confusing isn't it??)
i would be most thankful for any replies i receive
Assigning Actions To Buttons?
I want to create an image that rotates across the screen and stops. and then have it rotate back into its orginal position. That part i have already completed. I want users to be able to start this movie with a button underneath the image and get it to the first stopping point. then be able to click on the button again or another button and get the image to go back to the orginal position. I am not sure what type of symbol the button should be and/or what type of scripting i need to do. I hope this question makes sense.
Actions To Buttons Greyed
I have been trying to assign an action to a button in flash 5 but the 'on mouse' event is constantly greyed. Even if I go into Expert mode I get an error in the script. (Mouse events are permitted only for button instances, on (release) {
Assigning Actions To Buttons
I have a problem. When I d/l a fla file from this site, and try to assign actions to buttons, it wont let me do it. When I double click on the "hit" portion of the button, it pops open the action window, but I can not select any actions to assign, all the options are faded, and non-selectable! Help!
Adding Actions To Buttons?
Hi again
Ok I got the buttons working all fine.
But now I want to add AS to them. Im using Flash Mx, and I blame the new interface for most of my problems LOL!
Ok heres the script im using.
------------------------------------------
on (rollOver) {
gotoAndStop(85);
}
on (rollOut) {
gotoAndStop(65);
}
-----------------------------------------------
Now that works all fine and what not. Problem Starts when I goto the next button add the same AS but i change the
85 to 86.
for some reason I am unaware of it changes the first buttons AS to that of the second buttons AS.
I hope that is easy enough to understand.
I need each button to gotoand stop at a different frame and its not working right
Thanks in advance
Adding Actions To Buttons. How?
Hi
How do I add actions to buttons?
WHen I edit a button theres 4 frames:
Up Down Over Hit
But when I want to added an action to hit It would say current selection cannot have actions applied to it.Any ideas?
Thanks
Metal Fusion
Assigning Actions To Buttons
Hi, I'm trying to assign simple actions to simple buttons in Flash 5. I create a button symbol and when I right click on the hit state in the button-edit mode, the actions are all greyed out. What am I doing wrong???
Please, please can anyone help?
Giving Buttons Actions..
is it possible to give a button more than one action after it's pressed?? So after pressing the button, it loads a movie clip and then plays another one after it's done.
|