ActionScript 3.0 :: Flash Buttons Not Working As Expected

Dec 23, 2011

I've followed this tutorial and made a functional photo gallery.

Now, I want to add that photo gallery on my site. I've created a flash button and assigned it this action:

Code:
on (release) {
_root.contents.loadMovie("Pictures.swf");
}

"contents" is the container movie clip, and "Pictures.swf" is photo gallery i've made. Now, when i click on button, Pictures.swf does load (arrows are being shown), but when i click on them, nothing happens.

View 4 Replies


Similar Posts:


Flash :: Gallery Template Not Working As Expected?

Jul 6, 2009

I have created a flash gallery using the in built template in Flash8, which works fine. The gallery forms part of my gallery page of a separate SWF flash site. I load the gallery using a loder component. Since the gallery navigation works by targeting the root folder, my site gets screwed up. The question is, how do i modify the ActionScript in the gallery.fla file (flash inbuilt template), so that once loaded into the main site, it doesnt target the root timeline, but targets its own timeline i.e.Please see below for the code in the Flash Gallery. PS: I didnt write the code - its inbuilt into the template:

function updateFrame (inc) { // send slides to new frame newFrame = _level1._currentFrame + inc; _level1.gotoAndStop(newFrame);
updateStatus();

[code]......

View 1 Replies

Flash :: BitmapData.draw ClipRect Not Working As Expected?

Jun 29, 2011

I have a component that contains 4 layers: (in ascending depth order) bgImage:Sprite, dropZone:Sprite, dropMask:Sprite and line:Sprite. The bgImage is at 0,0, and the other objects are placed at various positive coordinates. dropMask is masking dropZone.At the point of bitmap capture I want to only draw from the dropZone and dropMask layers, so I'm trying this:

removeChild(bgImage);
removeChild(line);
var bmd:BitmapData = new BitmapData(dropMask.width,dropMask.height,true,0);
bmd.draw(this,null,null,null,dropMask.getBounds(this));

Despite the dropMask being located at 50,60 the capture always starts from 0,0. I've also tried getting the boundary rectangle and forcing the x,y, but it makes no difference. should I just forget clipRect and use a matrix instead?

View 2 Replies

ActionScript 3.0 :: Mouse Controls Not Working As Expected In IE?

Mar 31, 2010

I am developing a simple galaga clone for my site, its at [URL] . You will notice the controls work fine in firefox, opera, safari, chrome, etc. However, in IE, the controls are only triggered if the mouse cursor is hovering directly over the player ship.

The playership object is created in the main document class which passes a reference to the stage to the playership class.

private var ourShip:playerShip = new playerShip(stage, ourHUD);

Which is then added to the stage from within the document class (gameMain)

stage.addChild(ourShip);

The playership class then monitors the mouseX and reacts accordingly. The code for the ship controls which are linked to the enter_frame eventhandler is

Code:
public function controlShip(e:Event):void {
var a1 = stageRef.mouseY - e.target.y;
var b1 = stageRef.mouseX - e.target.x;
var radians1 = Math.atan2(a1,b1);

[Code]....

View 2 Replies

Flex :: MouseEnabled Where Transparent Not Working As Expected

Feb 28, 2011

I just cannot understand why mouseEnabledWhereTransparent does not work on this skin. The Skin this creates is basically a Button with a transparent background and a little triangle to the left side, like so: >ButtonText But the empty space around the Triangle does not receive mouse events. I've tried wrapping another group around the triangle path and I've tried wrapping it into a Graphic Object, also without success. I could create a Rect with 0 alpha below everything, but isn't that exactly what mouseEnabledWhereTransparent should be doing?

<?xml version="1.0" encoding="utf-8"?>
<s:SparkSkin xmlns:fx="[URL]" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:fb="[URL]" minWidth="21" minHeight="21" alpha.disabled="0.5" mouseEnabledWhereTransparent="true">
<!-- host component -->
<fx:Metadata>
[Code] .....

View 2 Replies

Actionscript 3 :: Using Graphics.clear Not Working As Expected?

Mar 12, 2012

Would anyone know why using graphics.clear(); in this example is preventing the graphics from being drawn?

e.g. the following code works and the lines are drawn.

var my_shape:Shape = new Shape();
my_shape.graphics.lineStyle(2, 0x00FF00, 1);
addChild(my_shape);

[Code]....

I'm wanting to animate the line moving so would like to clear the previous drawing before redrawing the lines.

View 1 Replies

ActionScript 3.0 :: Try/catch Statements Working But Not As Expected?

Aug 21, 2009

I've got some try/catch statements in an XML parser I've written that don't seem to be doing what I want them to be doing.

The code:

ActionScript Code:
try
{[code]........

The problems:

-In the case the type is analysis or info (with other tags being alright) the "Default Text" is staying blank, even without a text tag.

-If I purposely malform the option tag, no alert window shows up and none of the other properties in the catch block (optionText,selType, etc.) get set properly

View 3 Replies

ActionScript 2.0 :: Loop SlideTo Is Not Working As Expected?

Jan 16, 2007

In the following code, I create 12 buttons, label them, and control their onRollOver,onRollOut, and onRelease actions. Everything is working fine except for the line containing the "slideTo" method. Reading from the two arrays for the x and y values, it appears to be inserting the largest number in each array instead of stepping through all 12 values. Currently, clicking on any of the buttons moves the object (ralphMC) to x=100 and y=800. I am pretty stumped about this, as I've inserted quite a few various numbers into each array during testing. Can anyone tell me what I am doing wrong?slideTo is part of the mcTween package, in case anyone wanted to know. code follows:

Code:
//Creates an array of numbers that will evenly space the buttons out vertically
var mcPosY:Array = new Array();

[code].....

View 1 Replies

ActionScript 3.0 :: Stage RemoveChild (Target) Not Working As Expected

Nov 7, 2009

I'm new to AS3 and have been making a Snake game. I've come up with a problem with the code (Yes, I have magically created problems trying to program Snake...It's going to be a long day). My problem is, with removeChild...I'm getting strange errors being throw at me. Not only that, but my Movieclip (myFood) is not being removed entirely, only the visuals of it are.

That being said, here is, what I believe to be, the most important chunk of code for this problem, along with the error it gives me.
Code:
/*
* Code for the Snake and whatnot extras.
* Also, Snake and Food are classes.
*/
var myFood:Food = new Food();
stage.addChild(myFood);
function snakeEatFood() {
[Code] .....

View 2 Replies

ActionScript 2.0 :: CS3 : Flash Buttons Are Not Working?

Aug 28, 2009

CS3 flash buttons are not working....i've tried so many times, but its not working at all, code is simple:

on (release) {
getURL("home.html", "_self");
}

i'm using Dreamviwer CS3, XP-SP3, IE7. attaching the zip file having the site, fla, HTML, swf file...

View 2 Replies

ActionScript 3.0 :: Flash Buttons Are Not Working

Jan 3, 2011

I am new to Flash and ActionScript. I have been trying to put up a website, but I have run into one issue that is preventing me from having a functional page. The buttons do not work.I have set the instance names and converted things to symbols and so forth, but neither of the methods I have tried work.The first method I list below simply does not work, no errors listed, just no function.The second method I tried resulted in an error occurring whenever I clicked a button. The error was "ReferenceError: Error #1069: Property num not found on flash.text.TextField and there is no default value.[code]

View 2 Replies

IDE :: Flash Buttons Not Working Once Exported

Jan 21, 2010

I have a flash file I've built with various buttons linked to my website. Strangley, the links work perfectly in live preview (ctrl+enter)

however when I save as a .swf file, export as movie or publish - the links no longer work!

View 3 Replies

Professional :: Animated Flash Buttons Not Working Right?

Sep 6, 2010

I'm updating my website and my menu buttons have an animation on the mouseOver. A simple animated button with the "Up", "Over", "Down" and "Hit" keyframes.
 
www.brenda-nies.com will show the effect of my menu buttons and the effect I want to keep. Part of my updates are switching to AS3 and that's where my problem comes in. You can't see it on the website I gave you, but in my working file, when I test it (in IE8), everything starts out fine when I first rollover my button, the animation runs through it's cycle and stops. However, if I press down on the mouse button, the animation starts over. The same when I release the mouse button, the animation starts over. I want the animation to run through 1 cycle and stop, then stay stopped until I roll off the button.

View 5 Replies

ActionScript 3.0 :: Flash Buttons Not Working Correctly?

Sep 22, 2009

I am trying to get my flash buttons working. When I click on them they open a new window and none of the graphics show up. I need it to open in the same window and I have no idea why the graphics aren't linking. They are on my computer not on a server. In addition I need to add multiple buttons to the action script without messing up the entire movie. It seems when I try and add event listeners for the other buttons it won't play at all.want it to go to a page outside of the flash movie. This is a swf placed in Dreamweaver the buttons need to go to other site pages.

View 0 Replies

ActionScript 2.0 :: Flash Buttons Not Working Correctly?

Sep 22, 2009

I am trying to get my flash buttons working. When I click on them they open a new window and none of the graphics show up. I need it to open in the same window and I have no idea why the graphics aren't linking. They are on my computer not on a server. In addition I need to add multiple buttons to the action script without messing up the entire movie. It seems when I try and add event listeners for the other buttons it won't play at all. This is a swf placed in Dreamweaver the buttons need to go to other site pages.

View 1 Replies

ActionScript 3.0 :: Pan Buttons Are Not Working But Zoom And Reset Buttons Works

Aug 12, 2009

im working on a zoom/pan gallery and i have a problem that i can't solve.URL...the pan buttons are not working but the zoom and reset buttons works. im working on movie the image using the mouse now, if you will hold the image and move it it will drag it on stage.the image is a loader the loads and image and placed on screen.there is a mask on top of it and a frame that indicates the size of the gallery.when the user pan the image loader content i want it to stop as soon as it gets to the gallery frame,but i cant seem to find the best way to do it.so basicly when the image is in 100% i dont want the user to be able to drag it but after you zoom the user will be able to drag it but only to the edge of the frame so there wont be any white spaces.i tried a lot of different ways to do it but all of them are complicated and not working the way that i want them to work.

View 2 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 2.0 :: Flash Buttons Not Working Properly On Website?

Jan 27, 2009

I am building a website that is all in flash.In the first frame there are 6 buttons. Each button has a code to go to a different place in the timeline, where something happens. For example, one of the buttons has this code:

on (release) {
gotoAndPlay("web");
}

Another button has this code:

on (release) {
gotoAndPlay("widgets");
}

And so on.Everything happens on the same timeline.When I publish the movie to test it (ctrl+enter), everything works great.The problem happens when I upload the file to my ftp and try to view it online. In that case, when pressing one of the buttons, instead of jumping to the place in the timeline where it should go, it just continues on to the next frame on the timeline. So for example if I press the "web" button, instead of going to the label "web" it just continues on to frame 2 in the timeline, and then 3,4,5 and so on until there is a stop(); in the actionscript.

After the first press though, it goes back to working fine. Meaning, the second time I press the "web" button, it will go to the "web" label, and from the second click onwards everything works great. it's just the first click on ALL the buttons that doesn't work, although it does work locally...

View 2 Replies

IDE :: Flash - Buttons To URLs No Longer Working In Php File?

Nov 23, 2009

Very strange thing has happened. I've had this site running fine for over a year, and recently I have discovered that the buttons that go to external URLs do not work.All of the buttons should be going to another .php file, and they have been until discovered yesterday that they do not.If you go to the .swf file directly, you will see that the navigation buttons take you to the correct .php files, but it becomes unclickable when it's in index.php.VERY strange... but then when you go back to index.php, and click the php active hyperlink "Gum Drops" at the bottom of the page, you'll get taken to the php page... and then all of a sudden the navigation, and all flash links to URLs work!

View 2 Replies

ActionScript 3.0 :: Buttons Stop Working After Pressing Other Buttons?

Sep 14, 2009

I have three buttons and when I click the second one, the first stops working (e.g. no trace event and it won't go back to the frame "tab1") but the third still works. Then when I press the third button both the first and second no longer work. If I take out the gotoAndStop lines, the buttons work fine. The subsequent frames simply have stops on them.
 
b1.addEventListener(MouseEvent.MOUSE_UP,b1Pressed);b2.addEventListener(MouseEvent.MOUSE_UP,b2Pressed);b3.addEventListener(MouseEvent.MOUSE_UP,b3Pressed);
function b1Pressed(event:MouseEvent){    trace("b1 pressed"); 

[Code]....

View 4 Replies

Link Buttons On The Flash Movie Not Working On Fire Fox/Chrome?

Feb 1, 2010

I have a flash banner that rotate 6 images(slides). and it includes 6 buttons to navigate in to each image. Also images are rotates automatically every 10sec.But these buttons are not clickable in FF/Chrome, but work fine in IE with wmode: transparent. Also these buttons work fine in all browsers with wmode: opaque.Also there is drop down menu on top of the flash movie(a separate menu not included in the flash). In wmode: opaque dropdown part of the menu goes behind the Flash. In wmode: transparent that want happen.

View 1 Replies

ActionScript 3.0 :: Flash Functional Buttons Stop Working After Reopening Parent Mc?

May 30, 2010

i'm a flash newb, wrestling with actionscript 3 and ran into a problem with a drop down menu.the menu is composed of nested movie clips that open and close, and contain buttons that control a ui loader in scene 1. it seemed to be working all right until i realized that after opening and closing and reopening a submenu, the buttons that worked the first time stopped controlling the ui loader. since there aren't any error messages i'm kind of at a loss as to what needs fixing.

View 7 Replies

Actionscript 3 :: Flash App Freezes In Production Flash Player 11, But Works As Expected In Debug Version?

Nov 25, 2011

I've just stumbled upon a case when Flash app freezes in production Flash Player and works smoothly in a debug version. It doesn't throw any errors or exceptions. Has anyone ever encountered anything like this? Why is it happening or how one is supposed to debug in such case?And a side question - what exactly is different in debug version from internal point of view? Any good writeup on the topic?

UPDATE:I didn't mention, but the trouble is with Flash Player 11, it probably matters, cause Flash Player 10 doesn't have any problems with the same code.

View 1 Replies

ActionScript 3.0 :: Opens Up An Jquerry Thickbox With Php Tabel - Buttons In Flash Stop Working?

Feb 25, 2010

I run an external script from flash(as3) that opens up an Jquerry thickbox with php tabel (it gets results from mysql db). But when i include some other css for centering my .swf in the middle(both x/y), my jquerry buttons in flash stop working.this is the css code:

div.ex
{
height:600px;
width:930px;[code].....

and the webpage: [url].....(php/mysql in jquerry not yet included, but i tested before)

View 3 Replies

ActionScript 3.0 :: Flash Card - Function Value Used Where Type Void Expected

Dec 18, 2010

I am making this interactive flash card, and dont have any problems so far, however, I get this error:
Location: Scene 1, Layer 'AS' {this is the layer I use for my actionscript}, Frame 1, Line 11
Description: Warning: 3553: Function value used where type void was expected. Possibly the parentheses () are missing after this function reference.
Source: roteren;

This is the piece of code its referring to:
function klokklik (evt:MouseEvent) {
draai = 0;
geklikt = 1;
roteren;
}

And roteren; refers to the function roteren:
function roteren (evt:Event) {<lots of code here>
}

View 3 Replies

Flash :: Error 1137: Incorrect Number Of Arguments. Expected No More Than 0

Sep 15, 2010

i found the error here what should i type in the constructor function between the braces to call the function to the main time line public function creation() {

[Code]...

View 1 Replies

Flash :: Error 1136 : Incorrect Number Of Arguments. Expected 1

Jan 18, 2012

//Handle game logic
mcPlayer.update();
//create question
mcMathQu.update();

the first "update" function of external as file works , but the instance i added in the 2nd external file, it gives me that error... (there is a 3rd one behind it which works too)

note: the code itself is an external as file of a fla file. (and i checked, everything is linked properly to their individual external as file.

this is the whole function code. (still doing in process.)

public function update(evt:Event)
{
//This is the game loop
//Handle user input

[Code]...

View 1 Replies

ActionScript 2.0 :: Flash/IE Doesn't Bother To Use Async Load When Expected

Sep 23, 2011

I'm having a weird situation that only seems to occur in IE. This may or may not be related to my other post ("Need to worry about thread-safety?"), but I'm not sure, so I'm putting this in a separate thread.I have a setup in my my flash app to load an arbitrary number of different sounds, but with an limit on the number of sounds being loaded simultaneously. It works like this (psuedocode):

Code:
arrayOfURLs = ["a.mp3", "b.mp3", "c.mp3", ...etc...];
arrayOfSounds = [];
nextToLoad = 0;

[code]....

EDIT: In other words, it starts loading up to the first, say, 5 sounds, and then after each one finishes loading, it starts loading the next sound in the queue.It works fine on everything except IE. And it will work on IE as long as the files aren't cached. But if they are cached, then in IE (and only in IE) the flash app will hang and produce a trace like this:

a
b
start callback
start callback

[code]....

And after roughy 50 of those "start callback"s the flash app hangs and it never gets to any "end callback" or "c".It seems that loadSound is deciding to call onLoad synchronously, instead of asynchronously as would normally be expected. But this never seems to happen in anything but IE, even when the given browser has it all cached. So apparently it's either calling onLoad the wrong way in IE, or flash events like onLoad are susceptible to race conditions and need to be written accordingly.

View 0 Replies

ActionScript 3.0 :: Expected Semicolon Before Loader When Publishing Flash Bannerads Document Class?

Feb 25, 2012

got error semicolon expected before Loader when publishing Flash Bannerads Actionscript in document classalso is this Bannerads Actionscript correct.

package {
import flash.display.Sprite;import flash.events.*;
import

[code].....

View 11 Replies

IDE :: Buttons In Mc Not Working?

Aug 15, 2009

K so i started this flash site and made buttons that open little sliders underneath them that load subcategory's. the problem is i cant get the buttons on the little slider to load a external swf file in a loader on my flash .

// sub bar button functions
}
recon.onRelease = function () {
main.contentPath = "Recon.swf,";
}

View 1 Replies







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