ActionScript 2.0 :: Button Which Affects A Separate MC?
Apr 18, 2011
Now then, I am working on a game and I've come across a problem that I simply cannot figure out. I have a symbol with the instance name of "textbox" (genius, no?) and I have a button with no instance name. Now, within the "textbox" symbol, I have two frames; one of which is named "descentlava". When the aforementioned button is clicked, I need the "textbox" symbol to gotoAndStop on the "descentlava" frame. My feeble mind managed to whip up the following code for the button:
on (release) {
_root["textbox"].gotoAndStop("descentlava");
}
Unfortunately, this does not work and frankly, I'm losing my mind trying to figure this out all on my own. Anyone feel like they could offer some assistance?PS: Not sure if this changes anything, but I feel I should mention that the button and the "textbox" symbol are both within ANOTHER symbol with no instance name. Perhaps this is whats causing the problem, but taking everything out onto the stage is a big no-no. It must be contained within the symbol.
View 2 Replies
Similar Posts:
May 15, 2004
Is it possible to let's say, have a button in an swf file that affects another embedded swf file?
View 2 Replies
May 15, 2004
Is it possible to let's say, have a button in an swf file that affects another embedded swf file?
View 2 Replies
Nov 24, 2009
How you make sound affects
View 1 Replies
Aug 14, 2010
I made a panel movie with required designs which can be used as several pages in flash document. This is the basic design for all pages. Now, I would like to make changes in pages according to their subject. But when I make any change in one page the other pages are automatically changed.
View 1 Replies
Nov 13, 2009
I have a combobox (ddList) populated through xml and I can get a movieClip to change its alpha when an associated item in the combobox is clicked. What I'd like to do is return that original movieClip back to its original state when another item is clicked from the combobox. Thus having this second movieClip change in alpha.[code]
View 3 Replies
Oct 28, 2011
I habitually create my websites with a stage size of 950 x 580. They tend to appear slightly small in any browser which is ok because they can all normally be "zoomed-in" on using the browser zoom functions.
I have just created a site which loads several external .swf's into a main movie clip and the browser zoom works fine UNTIL I incorporate a further .swf which was created from a PDF file (using swfTools - pdf2swf).
This seems to disable the normal browser zoom with the effect that everything is just moved up and left a little rather than remaining centred and enlarging.
View 2 Replies
Sep 27, 2007
I can't seem to get my head round why when I set the colortransform object for one clip in my movie, it seems to affect the entire movie - textboxes and everything..I thought that a colorTransform it only affected the specified and child clips in the movie.Example - I have a lot of things attached to _root.I have a particular clip which is on its own and is attached to the _root - this is my code...Code:clip.transform.colorTransform = new flash.geom.ColorTransform(0.05, 0.05, 0.05, 1, 0, 0, 0, 0);That seems to set the clip nice and dark as I want it to - but it also sets all other clips and all clips dynamically added afterwards to have the same colortransform settings... am I missing something from the CT object?
View 4 Replies
Apr 30, 2008
HTML Background affects flash functionality
View 1 Replies
Apr 18, 2010
What I need to do is assign 5 separate dynamic text fields to 5 seperate buttons and at the same time to those same five buttons i would like to add 5 images that i would be able to change merely by swapping out the images in the file theyre in on the server.I would also like to get a nice transition between the images...ALSO i want to dynamically load the images for the buttons that will be used for switching from picture to picture(which im thinking i will be able to do after i know the how to do point the aforementioned things.)
Through tutorials I've found around the net I've been able to get most of the parts together... but i get lost because what they show you for AS2 they don't for AS3 and vice versa, at least that ive seen.so... I guess my question is... would i need to set up 5 seperate dynamic text fields on the stage and then set each one of them to one of the corresponding button. If so what AS code would i need to use to do so. And if not what would i need to do?
The other part of the question would be I know about the UILoader... would i be able to use it as my buttons and images, if so would i need 5 seperate ui loaders for both the Thumbnail buttons and the images or is there a way that would be better to do it? and once i do that would i do the transitions using frames and tweens like with AS2?
View 2 Replies
Jan 25, 2010
This post has been edited to clarify, so that should explain the answer above.I am sure this topic has been covered a million times, but for the life of me, I have been searching the internet for hours trying to find a simple solution to this problem. I am using Flash Cs4 with actionscript 3 and flash player 10 for publish settings. I have a button that I want to open a new webpage. When the button is pressed, I want the window to open so the user can see the original webpage they were on before, and I dont want the original webpage to close. In other words, I want to open a new webpage without closing the original webpage, and allow the user to see both webpages, at the same time doing away with the back button. Is this possible? Here is the script I am using. It is placed on a seperate layer called actions. :
addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
navigateToURL(new URLRequest("https://mycw3.eclinicalweb.com/cent/jsp/login.jsp"));
}
It does allow me to open the window seperately as long as I am testing the movie in Flash, but when I publish the movie and imbed in into a Dreamweaver Html document (Xhtml), you have to use the back button to go back to the original page. I know this might not be the best way to navigate but the person I am doing this page for wants it this way only.
View 5 Replies
May 15, 2011
Okay, so I'm creating a game. I currently have 2 scenes. The first scene is called Opening, the second is Main.The first scene has a title screen and then a button that the user will click to start the game (essentially go to the second scene).However, I'm getting the error: Error #1009: Cannot access a property or method of a null object reference.at code:ocument()t's throwing this error where I'm calling my event listener for start_btnMy code is below:
Document:
ActionScript Code:
{
[code].....
View 6 Replies
Nov 17, 2009
I need to display antialiased systemfonts (because the swf filesize must be small, therefore i can't embedd fonts). So I wrote this script in order to manually antialias the text
Code:
public function renderTextField():BitmapData{
var w:int = this["mainTextField"].textWidth+10;
[code]......
View 1 Replies
Apr 14, 2011
ActionScript Code:
import fl.controls.ColorPicker;
import fl.events.ColorPickerEvent;
import flash.geom.ColorTransform;
[code]....
I was going to use this code and modify it to work with the previous code.
ActionScript Code:
var OBJECTcolorInfo:ColorTransform = OBJECT.transform.colorTransform;
cpOBJECT.addEventListener(ColorPickerEvent.CHANGE, colorChange);
[code]....
A quick note, the OBJECT is there to show it's supposed to refer back to the "["bg"+String(i)]" bit is. I just don't know how to tell the code to look for it.My main goal is to have an object, for instance a rectangle, be draggable (and placeable). You would then set a series of color pickers to said rectangle, changing areas of it's colors once you double click it.However, the rectangle must move as a whole and not have to have each individual color part be repositioned along with it.
View 1 Replies
Aug 19, 2009
If I create a new flash AS3 file and create two blank keyframes in my actions layer I can add actions to each keyframe separately no problem. I can then easily switch between the actions frames from the menu bar on the left of the actions input panel. However if I try and do this on any of my projects i've been working on for a while when I create a new blank keyframe in the actions layer and try to add actions to it, I get sent straight back to my first actions keyframe and not a nice blank page. Can I even apply seperate actions to seperate keyframes?
View 6 Replies
Jan 17, 2011
This is NOT the same as my last thread as i am after three and NOT ONE as last time. In the attached movie there are three seperate movies loading into three seperate tweens. Please note that i am happy with this movie as it is, and do not want to change anything about it except for the script itself. It refurs to three seperate clips "b.a","d.c" and "f.e". What i want is for the script to incorperate all three clips under one name of "mc" And instead of have three seperate widths, "width 1","width2" and "width3" i want the script to also incorperate all three widths and heights into just one name of "width" and one name of "height".
View 9 Replies
Dec 9, 2009
how to add seperate actions to a button group that is duplicated to create 2 buttons from one...this is the code which takes the movie to another frame - i have to load one of two movies depending on which button is clicked, but either button only goes to the same frame...:
Code:
stop();
import mx.transitions.Tween;
import mx.transitions.easing.*;
[code]....
View 1 Replies
Apr 14, 2011
Basically I am trying to link two buttons so that two separate areas activate as one button including with rollovers etc. I am creating a flash application that features a series of tabs along the top of the page that when rolled over, will light up. When clicked on, these tabs will take the user to a different page. My problem is that I have an image on the left hand side of the application that features areas of the image that will take the user to the same place. I wish to link the button rollovers so that when the user rolls over the tab, the image will light up and vice versa. I have been unable to find a solution to this myself - the closest I came was making the area one button, but due to the distance the image and tabs are apart, the whole screen becomes one big button!
View 1 Replies
May 18, 2011
I made a button a stage, and I want the button to take the user to a separate scene that I have named "Biography page" when it is clicked. The thing is, I want all my actions on one specific layer. So I made an instance name for my button, "aboutme". The thing is... I have no idea how to write the code.
[Code]....
View 3 Replies
Nov 19, 2010
Movieclip I want to fade out: "StartupText_mc" Within "StartupText_mc" I have a frame labels "normal" on the first frame and "over" on the last. On the actions layer I have "stop();" on the first and last frame. On the third layer I have a simple alpa tween from 100% to 0%.
Now, Back to the main scene where the button "ProductMarketingIcon2_mc" and "StartupText_mc" exist next to each other. Here is the code I have for the button:
[Code]...
View 5 Replies
May 22, 2011
[Code]...
I am also having issues with the logo loading a second time when I click a separate button that takes me back to frame 1 with the code that creates the empty movie clip.
View 2 Replies
Dec 20, 2009
how can i make a button respond to mouse release and/or Enter key release, depending on user input.. when I press Enter, I would like to have the button(s) behave in the same way as if I was clicking it with the mouse, possibly incorporating the separate graphic stages of the button (appearance of button down when clicked with mouse = appearance of button while Enter key is down, etc.) ... and am also curious as to how you can tab between buttons then just press enter to deploy it... i know how to make a button react to button.onRelease and somewhat to the Enter key... separately.. but not as a combined package
View 2 Replies
Mar 13, 2011
I was wondering if there was a way to have a sort of output panel while testing an SWF outside of flash? I just want it to display text when I click a button on separate lines.
View 1 Replies
Feb 3, 2009
The problem is that i want to make a button that when i click on it open the gallery AS popup in a separate hrtml page + all the configuration[code]...
View 0 Replies
Jan 31, 2012
Hiding Button on Main Timeline from inside separate Movieclip
View 1 Replies
Jan 7, 2012
I am trying to load various swfs into a main swf. The initial swf loads in by default, the others load when buttons are clicked. All of the buttons also call a lengthy function called loadpic which appears later in the code - Currently the buttons load in the swfs as required, however the swfs are always behind the initial default swf. Is there a way to add removeChild to the buttons? I have tried creating seperate functions for each button and added the line removeChild(); however doing that means I would also have to repeat all of the later functions as well. If I add removeChild(); without placing it in a function the default swf doesn't show at all.
[Code]....
View 9 Replies
Mar 25, 2010
I've created an button object in flash. The button contains 2 layers. One is the background image and on top of it is a textField. The textfield is dynamic. I use the button inside a movieclip and I export it in a SWC. The I'm trying to use it in flex.
I'm trying to do this:
var myComponent:MyComponent = new MyComponent();
myComponent.button01.theTextField.text = "Caption";
I get and instance of the button(myComponent.button01 is not null in Flex debugger), but the instance of the textField(myComponent.button01.theTextField) is null and I'm not able to change the text(but the default text appears onscreen). The code is compiled correctly in flex.
I exported the in swc the button control as well. So the button is not the default SimpleButton from Flash, but an derived class generated by flash(with the same name as the symbol defined in flash). It contains theTextField memeber, which is null.
Here is the button timeline(Layer 2 contains the textfield, and the textfield instance is named theTextField):
View 5 Replies
Sep 24, 2010
I'm trying to make it so that when a user inputs the correct word an event happens. It almost works except that the event doesn't fire until the NEXT keystroke. Is there a way to test for the word AFTER the keystroke has become part of WriteInOneText.text, without adding a separate button or anything? Here's the code:
[Code]...
View 3 Replies
Aug 9, 2008
I am working on a school project that requires me to load external .swf or .jpg files. I currently have all of the buttons working and are loading an external .swf file on to the screen. The problem I am having is that when I go from one button to the next the loaded .swf stays on the screen and the next .swf gets loaded on top of it. I know that I need to unload the file but I am not sure where to put the code for the unload or what code exactly to use. I would like when the button is pressed to unload the previous loaded .swf and load the new .swf without having a separate button to unload.
[Code]...
View 3 Replies
May 27, 2009
i am trying to use the Tween class to change the size of movie clip to certain height.the code works for me but when resizing the parent, it effects the child.i tried the height and scaleY property for the thum, but does not work.
ActionScript Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
[code]....
View 6 Replies