ActionScript 1/2 :: Change A Variable By Button?

Dec 12, 2011

I need to change one variable at the click of a button the problem is that when I enter the first frame i declared a _global var _global.conteudo =null;
 
In the second frame:
this equal a _global to :
_global.conteudo = "enterprise.swf";
 
But  when I click a button , i need change my _global var  for example:
 
on (release){_global.conteudo="my variable declared";}

View 18 Replies


Similar Posts:


ActionScript 3.0 :: Change The Value Of Variable By Clicking A Button

Aug 4, 2010

I have some buttons and movieclips. I want to create a variable. I want to change the value of this varible when I'm clicking a button.

View 5 Replies

ActionScript 3.0 :: Button Setup - URLRequest Variable Change

Jul 22, 2009

I this code a setup a button that calls a url request from another variable and that works fine:
var venue_www:String = "http://www....1";
var venue_url:URLRequest = new URLRequest(venue_www);
function venue_Click(event:MouseEvent):void {
navigateToURL(venue_url);
vInfo.highlight1.alpha = 1;
} vInfo.venue.addEventListener(MouseEvent.CLICK, venue_Click);

But later on I have a function that changes the venue_www variable among other details. But my button won't update with the new url variable. I've actually also already removed the event listener and re-added it through the script, for whatever its worth.
function setInfo1() {// one for each venue
if (currentVenue=="ATL") {
venue_www = "http://www.....2";
}}

View 3 Replies

ActionScript 2.0 :: If Statement - Change A Variable When A Button Is Pressed

Jan 29, 2009

I want to change a variable when a button is pressed. lingo: if this button is pressed then check varexample what number it has if it has a number then gotoAndPlay("example") and add 1 to varexample else, do nothing I'm sure if I get this kind of example down, I'll be able to figure the rest out by myself. =S

View 5 Replies

ActionScript 2.0 :: Make A Button Change A Variable, And Add A Number And String?

Jan 25, 2010

I would like to make a dynamic button on a website I am working on. I would like one button to update a variable, and another set of buttons to add 1 or subtract one from the variable I have buttons on the left side of the page for some bands that load conent into an empty movie clip.

The website: [URL]

I would like to set up some forward and backward arrows above that content on the right, so users can also scroll through the content in order. So if someone loads the content for soul asylum, and click the back arrow, it goes back to the Wailers, and if they click the forward arrow, it goes to Swollen Members. So there is an order of pages: 1. Wailers, 2. Soul Asylum, 3. Swollen Members, 4. Passafire, 5. Beats Antique, 6. SFM Kind of an order of importance. The idea is if somebody starts by clicking #3 Swollen Members, my application will know that it is on #3 and the arrows will go to #2 or #4.

Is there a way for the main artist buttons on the left to reset a variable for the current slide? So if someone clicks on the Swollen Members picture button, a variable called currentselection equals 3 And then when the forward arrow is clicked, it will ad 1 to the current selection and load movie #4

So in VB the main Swollen Members button would be something like: im currentselection as int = 3 Which would reset the current page as 3

Then the forward arrow would have code like:

Dim Nextselection as Int
Nextselection = & currentselection +1 & ".swf"

And the button in flash would be something like:

on (release) {
loadMovie("Nextselection", "rightcontent_MC")}

Which would load 4.swf the slide for passafire.

So how would I do this in action script 2.0?

View 0 Replies

ActionScript 3.0 :: Cant Get Shape To Refresh And Change / When Change Its Variable Using Text Field

Dec 3, 2010

Im really new to as3, and im just trying out some stuff, but i cant get a shape to refresh and change when i change its variable using a text field.If i change the text fields text before i test it, it works, but while its running it doesnt change it again.Btw, trying to change the stroke size.[code]i just want is so that when i change the strokeSize_txt text box, it will change the stroke for the shape.

View 2 Replies

ActionScript 3.0 :: Change String Variable To A MovieClip Variable?

Oct 10, 2008

I have been banging my head against a brick wall regarding the following problem which must be very simple to fix, just can't see the answer.I have a class assigned to a movieclip called canvas. The class is called drawClass. I have called the instance of canvas on the stage 'drawingCanvas'.When I trace "drawingCanvas" I get object drawClass] which is fine. Tracing drawingCanvas.name gets me the instance name 'drawingCanvas'.This is a String variable.Basically what I am trying to do is pass the MovieClip name to another class. In my example the class 'toolBar', which can then interact with the MovieClip.

The problem is passing 'drawingCanvas.name' results in a String, so I get an error saying :TypeError: Error #1034: Type Coercion failed: cannot convert "canvasArea" to flash.display.MovieClip.I can't for love or money find a way to convert a String variable to a MovieClip variable! I have the name of the MovieClip, I just need to tell the toolbar class. But I can't find a way of doing this as the instance on stage is an object of drawingClass, not a MovieClip (unless MovieClips with attached classes are not treated as standard MovieClips?).

View 9 Replies

ActionScript 2.0 :: Concatenate - Make The Variable Change With The Variable?

Jul 19, 2006

I'm trying to achieve something i thought would be extremely easy, but i can't get it to work!

[Code]...

View 1 Replies

ActionScript 2.0 :: Using A Variable To Change A Variable?

Jan 14, 2009

I'm creating a board game which has 3 variables, p1Move, p2Move and activePlayer.
p1Move and p2Move store the p1 and p2 location on a game board. activePlayer stored who's turn it is at the moment.

I am loading a value in from a text file which changes the value of move. This all works fine when i designate a player directly:

ActionScript Code:
p1Move = [insert variable name],

but i want to designate dynamically based on who's turn it is.

Something like this:

ActionScript Code:
_root["p"+activePlayer+"Move"] = Number(this.varAmount);

so that flash changes the value of p1Move (or p2Move depending on who's turn it is) to varAmount. varAmount is the variable being read from the textfile.

Hopefully that all makes sense. Basically i want flash to change the variable associated with the active player only.

View 9 Replies

ActionScript 2.0 :: Change Nav Button Image On Page Navigation Change?

May 26, 2010

i have my nave bar as my main swf then i load each page as an external swf in a mc container. each button should be marked when you navigate to the respective page. how would i load a current pages icon over the generic one when i navigate to that page then unload it when i navigate to another page?

View 5 Replies

ActionScript 2.0 :: Change Colors Too When Press The Second Button To Change The View Off

Dec 14, 2005

Q: I am making a web-application for school work. see: [URL] the collors i got working now but when i press the second button to change the view off the shoe i want that the colors change to. Now the colors keep standing. The colors are pictures converted into MC and the works with attachmovie. But with what script can i change the collors so they will change and fit on the shoe? I hope this is a good explanation. :S else i will make a better explenation.

View 3 Replies

ActionScript 3.0 :: Create A Variable And Get The Button To Add One To That Variable?

Jan 28, 2010

I want to be able to have a number displayed on the screen that when one of the arrows next to it (up/down) is clicked it adds 1 to the original number (lets say 72). Then when they click the "save" button that really just takes them to the next frame (or a frame somewhere else in the movie), which is a confirmation page, I want the number they ended at to display on the confirmation screen.
I'm thinking that it is partially because I don't know what to search for.I know I have to create a variable and get the button to add one to that variable.

View 2 Replies

ActionScript 3.0 :: Change Text Color In Previous Button When Click A New Button?

Mar 11, 2010

If I have say 7 buttons, each containing text that changes color on rollover using the "Up" "Over" and "Down" keyframes in the buttons' timeline.  Is there a simple way to get the button's text to change color when clicked, stay that way, and then change back to the original color once one of the other 6 buttons are clicked?
 
The only thing I can come up with is writing pages of code for each button that changes the color of every other button regardless of whether it was active.

View 13 Replies

Flex :: Make A Button Change It's Shape With Every Click (music Button)?

Sep 20, 2010

I want to design a music button for a game like geochallenge

View 1 Replies

ActionScript 2.0 :: When Change Button 2 Load Movie Settings It Automatically Changes Every Button

Feb 21, 2003

I created a button with some roll over effects added some load movie action to load external movie.swf file, everything works perfect except I need about 12 same buttons but with different loadMovie command I mean to load different swf files. so what I did to make it fast I copied the first button and pasted it 12 times so I made 12 nice buttons, but the problem I have is that when I change button 2 load movie settings it automatically changes every button, so I am a little frustrated,

View 9 Replies

ActionScript 2.0 :: Make A Button In Such A Way So That After Clicked On It The Button Will Change Colour Indicating That The Link Has Been Visited?

Sep 1, 2004

I am trying to make a button in such a way so that after you clicked on it, the button will change colour, indicating that the link has been visited.

View 3 Replies

Change Value Variable In Other MC?

Jul 8, 2009

I have an flash movie with on the main timeline a movieclip "MC1". In this movieclip I have another movieclip "MC2". On the first frame of MC1 I have declared a variable x and I want to give this variable a new value when I click on MC2 but it doesn't work?!

Main timeline: 1 frame with MC1

MC1: 1 frame with MC2

Codes implemented on the timeline:

MC1:
x;

MC2:
onMouseDown = function() {
_root.x=1;
}

Example: [URL]

View 4 Replies

Actionscript 3 :: Make A Button And When Click The Button It'll Change Direction?

Dec 18, 2011

by the way you need to make a symbol and need to export for ActionScript and class name is "ball". And the button instant name is:bButton. So here's the script I wrote so far.

var boundaryRight:Number = stage.stageWidth;
var boundaryLeft:Number = 0;
var balls:Array;[code]....

As you can see that code made the multiple ball go to left and looping over and over again. So here's what I want to do. I want to make a button and when I click the button it'll change direction like click and it change direction to right. I click it again and it'll go left again. How do I write the code for that?

View 1 Replies

ActionScript 1/2 :: My Variable Won't Change

Jun 19, 2009

I am attempting to make a remoddled clone of the game at [url]...so far i have some blobs that slowly move down through a door, then when they're off the screen they jump back above the screen to come back down.my problem is that the door is user controlled using this code on a butten[code]...

View 1 Replies

Change An Integer Variable Per Second?

Jun 22, 2009

I'm working on a game were your health variable will add 1 hp automatically every second if the health variable is not equal to 100. How would you do that?

View 1 Replies

ActionScript 3.0 :: Change The Name Of Variable?

Dec 10, 2009

can I set variable from QueryString . if yes , then HOW ?

for-Example :

FLASH:
var myvar:String;

I want to change the name of variable (which is already declared in Flash ) from querystring

like myvar+new

is that possible , I change variable name again from QueryString?

View 1 Replies

ActionScript 2.0 :: Change The Value Of A Variable?

Mar 14, 2011

I have a variable set up on my actions frame. It is var bucket:Number=0 .I want bucket to equal one if one object hits another.

View 9 Replies

ActionScript 2.0 :: Change Value Of Variable In Mc From Another Swf?

Mar 29, 2004

I have one swf file that containes a mc using an easing function to move an arrow around. That mc has the instance named myruler. The arrow moves based on the value of a variable named "y". This swf also has a mc that I use as a container to load movies into. The movies that are loaded into the container mc have buttons that I would like to use to change the value of the variable "y" in the movie clip named myruler found in my base swf. Did that make sense? [code]...

View 2 Replies

Professional :: Play/stop Button Change Into One Button?

Mar 9, 2010

I have two buttons for paly and stop movie.

It is possible to only use ONE button ...
 
EXample
When click PLAY , stop btn is on
When click Stop, Play btn is on.
 
My file: [URL]

View 1 Replies

ActionScript 2.0 :: Button That Change Goto Property Of Another Button?

Aug 3, 2009

I'm new to actionscript and I've got this problem.Hypothetically, I have Button 1 and Button 2.When I click Button 1 the file goes to frame 10.What I need is that when someone clicks Button 2, Button 1 instead of go to frame 10, go to frame 20.

View 2 Replies

Actionscript 2.0 :: Way To Have Play-button Change Into Pause Button

Feb 18, 2009

I finished the Flash Video Basics Tutorials, but I'd like the video not to start playing straight away. I also want it to stop playing when it's finished and not start over again.Is there also an easy way to have the play-button change into pause button, when the video is paused?

View 14 Replies

ActionScript 3.0 :: Condition - If The Variable Change Condition Don't Change

Sep 12, 2009

I have a BD return by PHP without problem : I have "all_good" and "no_good" If the variable change my condition don't change ..... why

[Code]....

View 3 Replies

ActionScript 3.0 :: Act On Change In String Variable

Apr 7, 2009

What is the best way to listen for and trigger a function when a string stored in a variable changes? I have a variable named source which is a string. When its value changes I need to run a function newVideo. What's the most efficient way to detect the string has changed?

View 3 Replies

ActionScript 2.0 :: CS3 Detect Variable Change

Nov 7, 2010

I have a flash movie being loaded inside a parent movie. Inside the loaded movie is a variable called lvl, and its refered to as loadedmovie.lvl in the parent movie.

So if i'm wondering what the lvl is in the loaded movie, I just use loadedmovie.lvl to get the variable.

But I want to know when this variable CHANGES. How am I able to detect when this lvl variable changes? Inside the loaded movie, it's been set to change almost every frame in the movie, but I'm not going to call a function inside every frame of that movie to find out when it changes.

how do I detect a variable change and then make it call a function?

View 6 Replies

ActionScript 3.0 :: Change Variable Value Dynamically?

Apr 13, 2011

[code]....

need a way to change from tile0 to tile1 through variable [code]....

View 3 Replies







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