Actionscript 2.0 :: Making Buttons Do Multiple Actions?

Sep 22, 2009

I am fairly new to Flash and I am wanting to create a virtual tour through a house. I DON'T want the panoramic views; I want to be able to have the buttons walk the user forward through the house and look side to side. I have successfully made the left, right, and forward buttons look side to side and move forward for one sequence, but once I add multiple "If" scripts for the forward button it messes everything up. Furthermore, when I want the forward button to go back to its screen when on the left screen it doesn't want to seem to work.

All this is to say how do I get a button to do different "if" functions from frame to frame.

The code I currently have looks like this:

stop();
up_btn.onRelease = function() {
if (_root._currentframe == 4) {

[code]....

it seems to mess up the entire button. It will only do the first command in the structure. All of it has been VERY frustrating and I don't know how to structure it so that it will go to the desired frame but also go back to the frame I want when looking left or right.

View 1 Replies


Similar Posts:


Professional :: Making Multiple Buttons Out Of One Picture?

Jun 15, 2010

this is probably a daft question but I'm a complete novice so bear with me. I need to know if it's possible to upload a picture to my Flash stage (a row of buttons I made in photoshop) and then somehow select each of these buttons and turn them into working button symbols? Or do I have to (very annoyingly) upload each button as a seperate picture in a seperate layer before turning it into a button symbol?

View 10 Replies

ActionScript 2.0 :: Making Actions Work Inside Of A MC?

Mar 24, 2009

how I can make a certain code that works on the time line, work when placed inside of a MC? I know my question is too vague but my code is huge and if I post it it's going to be more difficult than if I can just get the logic and change the code my self.

View 12 Replies

ActionScript 3.0 :: Making Actions Inside A Movieclip Work?

May 25, 2010

How do I make the actions contained in a movieclip work on the main timeline? For example. In the movieclip, I have some buttons and I have an "Actions" layer there which contains all the functions of the buttons, listeners and such.

I placed this movieclip on Frame 1 of the main timeline.

When I run the program, I'm able to hover my mouse over the buttons and it changes to a "finger" cursor as if they can be clicked on, however, when I click the buttons, nothing happens. It's as if it's not recognizing the Mouse Click event listeners I put on the buttons in the "Actions" layer of the movieclip.

View 1 Replies

One Button Multiple Actions (as2)

Oct 30, 2011

is it possible to add multiple actions to the same button.e.g.on stage theres only one button, on first click it should make mc1 visible , on second click it should make mc2 visible and so on.

View 3 Replies

ActionScript 3.0 :: Add Actions To Buttons?

Apr 6, 2010

When creating a website in Flash, I have made the buttons but I am unable to add an action to the buttons. A message appears to say 'current selection cannot have actions applied to it'. I have followed the tutorial to the letter without any success - what am i missing?

View 1 Replies

Ajax - Making Multiple Asynchronous Calls To Fetch Result From Multiple Services In The Single Click Of A Button In Flex?

Dec 27, 2010

In one of our project we are using flex for front end, blazeds/java in the backend. Its an existing code where services are prewritten. I have to make calls to 3 services in the backend (basically 3 remote objects) and get their result and store the result in an object and show the data of this object in a view.
Now in front end we are using Flex and Parsley Framework. I was thinking of the following approaches.

1) Making commands for each service call and storing the result in a shared object (model) and then displaying this model in the view. In this approach the problem is some services are needed in some other web pages, but they donot need the same model. How should i handle this scenario ? Should i make a asynchronous remote call and fetch the result and then again dispatch and event with the event object storing the result.

2) Making a service call , wait for the result then make another call and wait for the result and then make other call, not sure if this is the right way ?

View 2 Replies

ActionScript 2.0 :: Button Do Multiple Actions?

Dec 3, 2009

I have a symbol that is movieclip (symbol name switch) which has got a switch on/off image inside it, if u click it, the 'switch on' image comes (frame 5) and when u click again the 'switch off' image comes (frame 1) Nw i want the symbol such that when i press it not only does the 'switch on' image come, but also change the image of another movieclip (symbol name 0bit) which is in the root timeline and not inside "switch" symbol

PS: Am using Flash CS4

View 7 Replies

ActionScript 2.0 :: Multiple On Release Actions?

Dec 12, 2006

I have 4 size buttons like so:

S | M | L | XL

Now when a user rolls their mouse over each hit target(size) I have some frame animations that make a box come over and an opposite animation for when they roll out...but now when the user clicks a button I am having problems. I would love to have it so when the user clicks a button the box stays around the button and then if the user were to click a different button it would play the out animation of what was selected before and then the begining animation for the button hit now.So if I clicked the button "S" and then decided to click the button "L" it would play the out for "S" and then play the in animation for "L"

View 4 Replies

Not Allowing Actions On Animated Buttons?

May 31, 2009

I made some animated buttons, and now I'm trying to assign script to them to link them to their pages, on the script box it says I cannot assign script to them? Is it because they're animated or am I going wrong somewhere else? It's in Flash CS3, I can upload any files as a link if I've not explained myself well enough

View 1 Replies

ActionScript 1/2 :: Adding Actions To Buttons?

May 17, 2009

I am trying to add actions to my buttons i want the user to be sent to another page when the button is clicked. The action i have attached to the button is

on (release) {getURL(www.pharmeng.ie,_self);
}

Attachments:

pharmeng buttons1.swf (7.7 K)

View 3 Replies

ActionScript 2.0 :: Reassign Actions To Several Buttons

Jun 5, 2008

I have rollOver, rollOut, and Release actions on several buttons. I want to be able to keep the same buttons but attach different actions depending on what section of the site the user is in. I have something like:

Code:
myClip.onRollOver = function():Void {
this.swapDepths(5000);
Tweener.addTween(this, {_xscale:110, _yscale:110,
_x:xArray[substring(this,12)] - 10,
_y:yArray[substring(this,12)] - 9,
[Code] .....

I tried just reassigning it and also tried
_root['box'+i].onRollOver = function():Void {null}
before reassigning it. neither worked.

View 2 Replies

ActionScript 2.0 :: Actions When Using Flvplayback Buttons?

Jan 8, 2009

I've created a flv movie, and I have a button showing that I want to vanish when I press the play button on the flvplayback controller.I searched the web and came up with this:

Code:
// Play Button code
function btnPlayClickHandler(event:MouseEvent){

[code]......

View 1 Replies

ActionScript 2.0 :: Possible To Call Buttons Actions?

Jun 12, 2004

I have lot of buttons (50) is possible to call this buttons in other way or must i use this actions? This is example on 1. frame for 3 buttons. Of course in the future ara buttons different actions

Code:
// action for 1. button
_root.mainMap.map.pan.jewish_point_01.onRollOver = function () {
trace ("jewish_point_01 works!");
mainMap.map.pan.description_01._visible = true;
};
_root.mainMap.map.pan.jewish_point_01.onRollOut = function () {
[Code] .....

View 2 Replies

ActionScript 3.0 :: Multiple Instances For Button Actions?

Jul 23, 2011

So I have the following Actions for my button:b1.buttonMode = true;b1.addEventListener(MouseEvent.ROLL_OVER,onButtonOver);b1.addEventListener(MouseEvent.ROLL_OUT,onButtonOut);
 
b1 is my MC button Instance name. I want to add several other MC button names to this ActionScript (b2, b3, etc). How can I add the other MC button names without just copying and pasting the whole code with new instances?

View 10 Replies

ActionScript 2.0 :: 1 Button With Multiple Rollout/over Actions?

Apr 18, 2011

I have a project where I need my button to have more than one function.the link to my flash file is:(tried to upload but it keeps saying invalid file)I have a countdown within frames 1-90. I didn't convert it to a movie clip because I have a flash movie that needs to run after it, which I put in frame 90.The way it runs right now with my rollover/out actions is perfect, BUT IT'S REVERSED from what I need. so close! grrr!

I need the countdown to stop if you move the mouse away.Then when the video starts (after the countdown), I need the rollout action to disable. If I can get this to work, I will be putting an exit out button on the flv movie so the user may exit out, using the button instead of the rollout action of the mouse.

Brief summary:
countdown frames - rollover/rollout
flv movie - no mouse actions

View 9 Replies

ActionScript 2.0 :: Applying Actions To Multiple Objects?

Oct 5, 2006

how to group objects together so that you can change their parimeters all at once. Like if I have a 7 boxes on screen with the instance name box1, box2, ect..... and i wanted to do change them via action script, like make them all partailly invisible when an event happens. How would I do that. I've tried stuff like

box = ["_root.red", "_root.blue"];
box._rotation = 40;
and
box = [_root.red, _root.blue];

[Code]....

View 2 Replies

ActionScript 2.0 :: Actions Using The Flv Video Player Buttons?

Jan 7, 2009

I have just created a flv, and want to control a button on the stage that I placed there.

Basically when a person clicks the play button I want that button to vanish.

View 1 Replies

ActionScript 1/2 :: Array Assign Buttons Actions?

Dec 14, 2009

//AS BEGINS
var productList:Array = Array("diabeoff", "cholestoff", "inulina", "colageno", "power", "castoff", "dieta", "miel", "extrapower");

[code].......

View 8 Replies

ActionScript 3.0 :: Toggling Buttons With Separate Actions?

Feb 11, 2011

I have 4 buttons on the stage and each button is correlated to a seperate movieclip.
 
btn1 - mc1
btn2 - mc2
btn3 - mc3
btn4 - mc4
 
I want each mc to appear when it's corresponding btn is clicked but it has to be the only mc on the stage...meaning whatever mc was currently has to disappear. I've toyed with numerous was to get this to work but I know there's a more code efficient way to do this than the code I have below. And I don't want to use any timeline.

[Code]....

View 3 Replies

Professional :: Actions On Buttons Wont Work?

Jul 25, 2011

i had placed buttons on and the Actionscript 2.0 Play,Pause, Ffwd etc and when i test the video the buttons do not function.

View 3 Replies

ActionScript 3.0 :: Make Menu Buttons Have Different Actions?

Apr 27, 2010

I have 2 classes that deal with making my menu. One creates a button and the other creates a menu using the buttons. I have XML set up to set the text in each button. What I cannot figure out is the best way to have each button do something different. I do not have much time to complete the site so the way I thought about doing it was giving each of the buttons a name and setting that to what the text was inside the button. All this is happening in my menu class. [code]...

View 2 Replies

ActionScript 2.0 :: Assigning Actions To Buttons In A Loop?

Sep 17, 2004

I have is a movie with a button in it called button.i've duplicated the movie (manually) several times on the stage.the movies have been given instance names of movie1, movie2 etc.i've then used actionscript to assign actions to the buttons.i have the following code:

Code:
for (i = 1; i < 6; i++)
{

[code].....

View 2 Replies

ActionScript 2.0 :: Assigning Actions To Buttons In A Loop

Sep 17, 2004

i'm pulling my hair out over this one. I have is a movie with a button in it called button. i've duplicated the movie (manually) several times on the stage. the movies have been given instance names of movie1, movie2 etc. i've then used actionscript to assign actions to the buttons. i have the following code:

[Code]...

View 2 Replies

ActionScript 1/2 :: Multiple Button Actions Not Working In Frame

Oct 10, 2009

In the first frame of an fla I have the code below, only the functions in red works. When rolling over the second only the first function in blue works but the mouse freezes when attempting to rollout (green). But if I remove the code from the first frame and code each seperate button the functions work.

Any reason for this
stop();
btn_shopping.onRollOver = function () {
gotoAndStop(2)_root.main_mc.gotoAndStop(1065);
} btn_shopping.onRollOut = function () {
gotoAndStop(1)_root.main_mc.gotoAndPlay(162);
} btn_pen.onRollOver = function () {
gotoAndStop(3)_root.main_mc.gotoAndStop(1066);
} btn_pen.onRollOut = function (){
gotoAndStop(1)_root.main_mc.gotoAndPlay(283);}

View 2 Replies

ActionScript 3.0 :: Creating Generic Actions For Multiple Objects?

Feb 3, 2010

want to simplify coding and wondered if there was a way to write a script that could be used on multiple objects without having to write it to address each object individually. I am building a simple menu where I want the menu link to rise and scale up when the button for it is rolled over and then return to its original position when the mouse rolls off. I know I can write this per button and per item, but wanted to see if there was a way to write it once and then apply the action to everything. EX. My menu consists of 5 items (and respective buttons) home_mc (home_btn), menu_mc, dining_mc, contact_mc, specials_mc.If I write the code

home_btn.addEventListener(MouseEvent.MOUSE_OVER, homeOver);
home_btn.addEventListener(MouseEvent.MOUSE_OUT, homeOff);
function homeOver(MouseEvent) {

[code].....

View 5 Replies

ActionScript 2.0 :: Adding Multiple Actions To A Single Button

Jan 22, 2010

I am creating a "Kiosk" to be used in flash using ActionScript 2.0 with individual scenes. At the end of each scene is an outro and the beginning of each is an intro to give the impression of them all appearing seamless.So on each button I have added the following [code]Frame 180 is where the outro plays to enter the selected scene of that button. I would then like add to this piece of script that I want that button to go to that scene after the outro is played. So it would have something like gotoAndPlay(scene xx);The only other solution I have at the moment would be to make an outro of each scene for each button to jump to but this having 8 scenes it would end up adding up to 64 outros in total.So would there be a solution to simply have each button jump to the one outro then jump to its own scene?

View 3 Replies

ActionScript 2.0 :: Giving Multiple Movies Actions With For Loop

Oct 2, 2007

What i want to do is assign actions to each individual movieclip using a for loop.. let me explain Say i have 5 MovieClips on the stage... With instance names clip1, clip2, clip3.... Now what i want to do is assign a OnRollOver and OnRelease to each 1 So individual code for each would be something like this.

[Code].....

View 1 Replies

Professional :: Over State And Actions Not Working With Buttons In Flash Cs4?

May 20, 2010

I am working on a Flash file and some of the buttons in the document are not working.When I test the movie the hand cursor appears when I hover over the buttons they don't change colour (as specified in the over state) and the actions don't work. Not sure what is going on here as I created other buttons in the same document the same way and they work fine.

View 3 Replies

ActionScript 1/2 :: Defining Actions For Buttons Inside A For Loop?

Jan 8, 2011

I got a set of buttons and  a text  field where they load the content.I'm trying to not make one zillion functions and keep the code neat so i  guessed i would try set the buttons' actions within the loop too. I firstly had  some problems getting the i counter inside the onRelease function (actually I  don't think i ever got how to do it). But I tried this and worked:

stop();var comprarXML = new XML();comprarXML.ignoreWhite = true;comprarXML.load('flash/comprar.xml');comprarXML.onLoad = checkLoading; function checkLoading(success) { rootNode = comprarXML.firstChild; ButtonReleaseAndContent ();} function ButtonReleaseAndContent (){ for (i=0;i<12;i++){   // my buttons are not generated dynamicly, that  why the count. btTemp =

[code]....

At the line where I set the text, I had a though " I may have to  refer from within the button mc, since the generated code goes inside it!". So i  tried the this.temp , guessing that this would be equal to the button level. A  few seconds later i noticed my referencing for the text field wasn't coming from  within the button, but from the root.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved