ActionScript 3.0 :: Simple Button OverState Not Working

Dec 23, 2010

I have programmatically created a simple button with a text field on top in a separate class extending a movie clip. The problem I am having is that the overState does not seem to be working and I don't know why. I have even tried removing the text field in hopes that would work, but it does not. The GameIntroduction class is called by another class which is the main class.

Here is my code for the class that calls the buttons:
ActionScript Code:
package {
import flash.display.*;
import flash.events.*;
public class GameIntroduction extends MovieClip {
private var introText:String = "";
[Code] .....

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Make A Button's Overstate Trigger From Keyboard Detection?

Feb 14, 2009

Code:
stage.addEventListener(KeyboardEvent.KEY_DOWN, checkKeys)
function checkKeys(event:KeyboardEvent):void {
if(event.keyCode == 48) {

[Code]....

When I press the '0' key it makes the movie play. When I click the actual button it also makes the movie play. But how do I make it so that when I type '0' the overstate of the button becomes activated? In this way keyboard detection and mouse_down would work together.

View 8 Replies

ActionScript 3.0 :: Simple Button Not Working In CS4?

Sep 21, 2009

I have got a simple button in the first frame of my flash file, but its not wokring. Here is the code I am trying.

Code:
Btn.addEventListener (MouseEvent.CLICK, myFunction);
function myFunction (e:MouseEvent):void {
trace("working");
}

It gives this error: "The class or interface 'MouseEvent' could not be loaded"

View 3 Replies

Simple Button Hit Zone Not Working

Nov 4, 2009

I am somewhat new to Flash CS4 andt am having a problem making simple buttons in Flash CS4 on a Macintosh: I have made a few buttons with a graphic and can go into them and successfully create the Up, Over and Down stages of the graphic. Then when I create a new box for the hit state (which is larger than the graphic and I have deleted the graphic itself from the hit state) it doesn't want to appear correctly when I test the movie. When I test the movie, the hit state is correct everywhere around the graphic (to the bounds of my hit state box), but is not active where the graphic is.

When I go under the Control menu, down to Enable Simple Buttons, the hit zone looks great right in my Flash file, but when I preview it or publish it and look it on different browsers (PC and Mac), I don't get my pointer right over the actual graphic, but get it everywhere around the graphic to the boundaries of my hit box. Why can't I get the actual graphic to be a hot spot in this situation? I have tried leaving the graphic in the hit timeline, and tried putting both the larger box and the graphic in the hit timeline, and still can't get them to respond correctly with the pointer in the browser window.

View 2 Replies

AS2 :: Get A Button Working With Simple GotoAndStop Frame

Jan 31, 2010

i can not seem to get a button working with simple gotoAndStop frame . its setup like _root > EMC_photos > photos_thumbs_ani now in photos_thumbs_ani i have several photo pages all setup every 100 frames with labels page 1, page 2 etc my button is within photos_thumb_ani as a movieclip with code inside this.onRelease = function(){ _root.EMC_photos.photos_thumb_ani.gotoAndStop("pag e2");} I have tried different variations to no sucess

View 2 Replies

ActionScript 2.0 :: CS4 - Simple Button Script Not Working?

Apr 14, 2010

I've got a really simple script that on a button click, changes the alpha of a set of mc's from 0 to 100, then on second click changes back to 0. The first click works fine but for some reason the second click isn't working. The button needs to stay "on" as well so I've got the buttons in a mc with named frames "on" and "off". Here's the code:

Code:
Actionscript Code:
ltBlueButton_mc.ltBlueOff_btn.onRelease = function(){ 

[code].....

View 3 Replies

ActionScript 2.0 :: Simple Button Script Not Working?

Apr 14, 2010

I've got a really simple script that on a button click, changes the alpha of a set of mc's from 0 to 100, then on second click changes back to 0. The first click works fine but for some reason the second click isn't working. The button needs to stay "on" as well so I've got the buttons in a mc with named frames "on" and "off". Here's the code:

Code:
ltBlueButton_mc.ltBlueOff_btn.onRelease = function(){
contentMain.page1_mc.Pg1LtBlue_mc._alpha = 100;
contentMain.page2_mc.Pg2LtBlue_mc._alpha = 100;

[Code].....

View 4 Replies

ActionScript 2.0 :: Flash8 Simple Button Not Working Within Movieclip

Mar 2, 2010

I have a simple getURL button within a movieclip within another movieclip. Does anyone have any clue why this isn't working? The button is in the top layer of the child movieclip, and the child movieclip is in the top layer of the parent movieclip, so what am I missing here? I attached a simplified fla to show the issue. In the end, the main red box will be a country on a map and the popup box will contain info about the country and links to pictures and sites.

View 4 Replies

ActionScript 3.0 :: HitTestState To Be The Same As The OverState?

Nov 28, 2009

It may be a lack of imagination on my part, but I can't imagine any situation where I would program a Button and not want the hitTestState to be the same as the overState. Why are these separate categories?

View 1 Replies

Control Overstate Mouse Tag In Movieclip?

May 11, 2009

I've created some animated buttons (using movieclips of keyframe animation) and when the mouse goes over the button it starts a new animation sequence.now I would like to add some text when the mouse goes over the button but I tried adding the text I want to a new layer of the animation but obviously this just plays for the duration of the animation sequence or if I add another keyframe so it only shows for a short time then it will flash up each time the sequence loops around (I don't want the overstate sequence just to play once - I want it to keep going while the mouse is over the button)

View 7 Replies

ActionScript 2.0 :: Mc That Only Shows Content On Mc Overstate

Jun 17, 2003

i am trying to write some actionscript.........obviously!!

the effect i am looking for is like what is at <a href>http://www.hugeinc.com</href>

i have most of the code sorted, such as the _y movement of the transparent movie clip. i just need the actionscript that is added to the content mc that is located under the transparent moving movie clip.

View 6 Replies

AS2 :: Flash - Simple Class Not Working?

Jul 1, 2011

So I'm trying to learn to create a public class, and this is what is in my class file:

class com.RCN.Menu.Menu{
public var title:String;
public var menuItems:Array;

[code]....

and in a seperate SWF I use the code:

import com.RCN.Menu.Menu;
var Accountability:Menu = createMenu("hello",[a,b,c,d]);
trace(Accountability);

yet Accountability traces as undefined?

View 1 Replies

ActionScript 3.0 :: Simple If Statement Not Working?

Feb 21, 2012

I am attempting to create one function to respond to multiple button clicks. I have a simple if statement in my onBtnClick function that does not work. Just need the button that is in that variable to go to frame 1. Trace statements are working inside the statement so I the if statement runs correctly?

[Code]...

View 3 Replies

ActionScript 2.0 :: Simple _global Not Working

Aug 27, 2003

This is plain and simple, why is it not working? BUTTON

[Code]...

View 7 Replies

IDE :: Simple Motion Tween Is Not Working?

Oct 7, 2009

I just can't figure out why a simple movieclip is not performing as expected.

Here's what happened:

In my MAIN SCREEN, I placed a a movieclip and named it "mainnav_mc" and on my ACTIONS layer, I placed a script on the frame that will eventually play the movie "mainnav_mc". This is the script: mainnav_mc.gotoAndPlay("show");The clip is suppose to fade-in but it seems that MOTION TWEEN is not working. I tried to create a test MC and still it's not working.

View 14 Replies

Simple Login Flash Stuff Not Working

Sep 21, 2010

I am fairly new to Flash and I am creating a simple Flash login programme in Flash. If I type in the correct password or even if I type in the wrong password it always goes to frame 3 which is "Login Failed! Username or password was wrong". I have attached .fla file. Note I created in Macromedia Flash 8.

View 8 Replies

Simple Drop Down Menu Buttons Not Working?

Aug 11, 2009

I'm having a bit of trouble getting a button in a hoover over drop down menu to link to another scene in the .swf movie. I just doing a basic drop down menu (example here: [URL] with a couple of buttons with in a movie clip, the movie clip being the "button" someone hoovers over. The buttons however are not going to the corrisponding scene I have them set up to. What's strange is that if I set in the buttons action panel to go to an url instead of a scene, in the .swf movie the button works when I click it...it wants to go the specificed url. Nothing happens when it's set to go to a scene.

View 5 Replies

Professional :: Simple Mask Not Working In Flash CS4?

Jul 27, 2010

I am creating a very simple mask using motion tweening. I created some text on a layer and made it a masked layer. Then I created a mask layer which consists of a circle that will span across the text. When I play the movie the circle does not show up at all in the frames the mask layer spans (it's purple on a black background) and the circle does not move across the text like I told it to with the motion tweening. I don't know why it's not working. For some reason the circle isn't showing on the stage at all and it's not moving across the text. I don't know if I have it set up wrong on the timeline or what. Here's the steps I followed to create the mask:

1.insert a new layer in which I named it mask and click frame 1 on this layer

2. select the oval tools on the tools panel and set the stroke to none

3. set the fill color to purple

4. draw a circle and click the selection tool and drag a marquee around the circle to select it.

5. click insert on the menu bar, click motion tween then click ok in dialog box about converting it to a symbol to be tweened

6. click the last frame in the mask layer and drag the circle to the end of the line of text

7.click mask on the timeline to select the mask layer, click modify on the menu bar, point to timeline then click layer properties

8. verify the show check box is selected in the name section, click the lock check box to select it, click the mask option button in he type section, then click ok.

9. play the movie in which the circle object covers the text on the masked layer as it moves across the stage.

View 1 Replies

Professional :: Simple Movieclip Click To URL Is NOT Working?

Jul 14, 2011

I've tried over 4 tutorials to make my movieclip link to a URL. It's just not working for some reason...
 
Here is my code.
  
ondemand.addEventListener(MouseEvent.CLICK,goThere);
function goThere(e:MouseEvent){
var request:URLRequest = new URLRequest("www.money.net");

[Code].... 
 
This should work!! There are no compilation errors...
 
No mouse cursor change on hover... just like nothing is there.

View 7 Replies

ActionScript 2.0 :: Simple GetURL Function Not Working

Sep 8, 2009

I'm modifying an mp3 player by flabell, and try to get some buttons to work. However, I can't seem to get the getURL to work, even though it works in other parts of the script. This is my code:
mc.rate1.onRelease = function() {
trace(this.ID);
getURL("[URL]","_blank");
};

The trace goes through fine. Here is the code that works:
Code:
private function downloadRelease(mc : MovieClip) : Void {
var title : String = mc._name;
var index : Number = Number(title.substring(title.lastIndexOf("n")+1,title.length));
getURL(songsSource[index], Main.getInstance().mcAlbums.linksTarget);
}
I'm on a mac with firefox.

View 3 Replies

ActionScript 2.0 :: Simple Events Aren't Working?

Jan 6, 2006

I'm using Flash Pro 8 and I'm attempting to incorporate events into some of my classes and I'm having nothing but problems. After looking at lots of examples, this all seems okay, but doesn't work. First is the class code and secondly is the code on the timeline.

ActionScript Code:
import mx.events.EventDispatcher;
class iaicu.mycampus.ClassSchedule {[code].....

Keep in mind that these classes are more elaborate, so events are intended to be more useful.

View 7 Replies

ActionScript 2.0 :: Simple Function And SetInterval Not Working?

Mar 21, 2006

i've tried searching the forums and fighting with this way of fading the movie clip in and out. The movie clip has an instance name of "box", my brother also can't figure it out.

Code:
var fadeChecker:Boolean = true;
function flicker():Void{
if(box._alpha >= 100){[code].....

View 5 Replies

ActionScript 2.0 :: Simple Easing Effect Not Working?

Apr 19, 2006

I have a movie clip called mainClip. Within it is another movie clip called subClip. I am moving the mainClip along the y axis; when it reaches a certain point, then the subClip moves along the x axis.

Here's the basic code:

Code:
myButton.onRelease = function() {
onEnterFrame = function () {
mainClip._y += 10;

[Code].....

The problem is, the mainClip moves just fine, but the subClip won't move at all. why the second script won't work?

View 3 Replies

ActionScript 2.0 :: Simple RollOver, RollOut Not Working?

Mar 8, 2007

I have a simple invisible button over to animations, based on thisThe button is telling onRollover to play frame name, thus playing the animation. and on onRollout it plays another thread.However, once all that is finished it doesn't work properly. Its like the first time you use it, as you roll over works fine and as you roll out fine. However, when you roll over again nothing happens until you come out and it gets all muddled.

Code:
on(rollOver){
gotoAndPlay("blurOver");

[code]....

View 11 Replies

ActionScript 3.0 :: Flash Simple HitTest Not Working?

Jan 15, 2012

i have attached an .fla file to show you what i am trying to achieve, i have a line (acting as a playhead) scrolling accross the screen, i am then wanting it to output to the window when it collides with each of the coloured squares, i have used similar things before but it is not working in this instance

View 5 Replies

ActionScript 3.0 :: Simple RemoveChild Not Working - 1120 Error

Nov 2, 2009

I'm working on a simple presentation website in flash that imports swf-banners onto the main page. This works, but I need a backgroundcolor and a border so the banners aren't seethrough. So I create another graphic element that puts itself underneath. All this works, but when I try to write a button to remove the "child" it only removes the imported swf (loader) but it can't remove the box underneath - even if I remove the loader-child completely. I get a "1120: Access of undefined property Kant." error

CODE for buttons & loading the swf:

Code:
stop();
var Xpos:Number=10;
var Ypos:Number=230;

[code]....

Code for "resetting" page:

Code:
removeChild(Kant);
removeChild(loader);

I can't get it to work.

View 2 Replies

ActionScript 2.0 :: Flash8 Simple Game Score Not Working?

Mar 28, 2011

I'm following a tutorial to make a simple game. The aim of the game is for a player to evade a flying enemy ; the higher the score, the faster the enemy. The main elements in the game are the enemy the player and a score card.

However, from following the tutorial, and adding the dynamic text field etc....the score doesn't actually work.

This is the code that I was instructed to place on the first frame of the Scripts layer:

//Game Variables
enemySpeed = 5; //Set Enemy initial speed
numberEnemy = 4; //Change this to add more Enemies
score = 0; //Set initial score to 0

[Code].....

View 2 Replies

ActionScript 1/2 :: Simple Goto Next And Previous Frame Not Working?

Oct 16, 2011

This seems pretty basic but for some reason I absolutely can't get it to work. I have a set of buttons which I want to be able to send their parent movie to the next or previous frame. I want to use a NEXT and PREVIOUS button, both combined within a single movieclip, to tell a parent file to go to next and previous frame.

This doesn't work:
previous_btn.onRelease = function(){
this._parent.prevFrame;
} next_btn.onRelease = function(){
this._parent.nextFrame;
[Code] .....

View 5 Replies

ActionScript 2.0 :: Ultra Simple Load Flv Content Not Working?

Jun 23, 2009

I've looked everywhere and keep getting the same answer. I have a standard flv player component with the instance name of 'movies'. i have a button, that when clicked i want it to load a certain flv into said player... so... ive got behind the button (for example..)

on (release){
_root.movies.contentPath = "http://www.mywebsite.com/mymovie.flv";
}

it compiles, i run my flash and my flv player doesnt play my content.. why?? the url is 100% correct as if i put it in manually, it works fine.

View 5 Replies

ActionScript 2.0 :: Can't Get A Simple If/then Statement Working With An Input Text

Feb 19, 2005

i cant seem to get a simple if/then statement working with an input text. Here is my AS

[AS]
on (release) {
password = inputName
if (password == "test") {

[Code].....

For some reason when i type in test in the movieclip inputName it still sends me to ign.com. Everything is in the same frame and i just cant get it working.

View 1 Replies







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