ActionScript 2.0 :: [MX2004] Setting The Location Of Buttons?
Mar 13, 2005
it's an easy question but the words may come out wrong. so I'm loading these 5 pics as buttons
[code]...
and I want to have them located one below the other plus 10 pixels gap . . . it seems so easy, but then so did opening the MX2004 packaging . . . 3 days later.
View 1 Replies
Similar Posts:
Apr 8, 2004
I recently made an mp3 player that reads off of a text file so that users may cycle through a selection of songs. I'm trying to extend it a bit by setting up the mp3 player to display the songs names an their duration (5:45) I'm pretty confident this is possible and I've tried a number of things and read a number of threads and tutorials but I'm still stumped.
[Code]....
View 2 Replies
Dec 21, 2006
I'm clearly not caffinated enough (or too much!) because I can't seem to place my emptyMovieClips where I want them.
[Code]...
View 2 Replies
Oct 20, 2005
i want to transfer to another scene when the player hits the enemy...but i can't transfer to that scene unless i use a button to link me to there....you know like in rpg games, when you hit the enemy there will be the fight scene....how can i do that...without using any buttons?
View 10 Replies
Sep 12, 2006
Note: im a beginner with AS. Im reading (yeah reading! ) the Actionscript Cookbook by Joey Lott to get better and more familiar with this language.Okay, first of all look at this linkand go to > photo > thingsWhat you get to see is a slideshow which you can browse through by hitting the Next (and / or Back button) button.Also you see "numberbuttons": 01 02 03 ..... 10 (there need to be 29 buttons since i have 29 ) that are not connected to the Next and Back button at this very moment.
My question:How can I link the numberbuttons to my slideshow AND next / back button?Say, I go to 05 by pressing the button and from there I continue viewing the photos by hitting Next: then i would like to have the square around the numbers to follow with me to 06 and so on. Quite obvious if you ask me.(to get a better idea of what i want, go here > portraits : browse the menu.. notice the moving square. and yes, this nav doesnt have a back nor next button... just an example to show what i want)Ofcourse, what i want depends on the script that ive been using. I have already tried out different codes but non of them wouldnt work proper (thats because of my lack of Actionscript knowledge). If you look at numberbutton 05 (notice .FLA below) you can see what ive been trying
View 5 Replies
Jul 28, 2011
i have a darkBlueRect rectangle sprite and a copy of the same sprite with a larger scale and a lighter color - lightBlueRect.i'm attempting to shift the location of the lightBlueRect according to the mouse.x location when the mouse is moving over the darkBlueRect. this way if the mouse is on the right of the darkBlueRect than the location of the scaled up lightBlueRect will be on the opposite side and shifted towards the left proportionate to the mouse position and scale. in addition, the lightBlueRect must appear "locked" to the darkBlueRect so lightBlueRect.x must never be more than darkBlueRect.x and lightBlueRect.x + lightBlueRect.width must never be less than darkBlueRect.x + darkBlueRect.width.
[code]...
View 1 Replies
Oct 15, 2009
I'm loading a video using the FLVPlayback component, and I want to start the video 10 seconds in, as opposed to from the start. How would I do this? For audio it seems simple enough, but I couldn't find an easy answer for video.
View 1 Replies
May 30, 2011
I gave up on Flash heavy coding when it switched to AS3. Always thought it was less intuitive, longer, and a brand new language and I got tired of trying to keep up when most of my clients did not want to pay for a full flash site. But I got this client...
Here's the problem, I can load a swf into my main stage or into an MC , but I cannot find out anywhere how to set parameters or load into a level so it doesn't replace the current material or fix to a size that doesn't block my other material.[code]...
View 5 Replies
Dec 31, 2010
I'm new to AS3 and I am making a website and I want to animate a button (buttonA), after a certain button (buttonB) is clicked buttonA should move from underneath buttonB and should move to a certain location (it only moves vertically). The movement should slow down a bit when the button reaches it's destination to make the movement look smooth. When buttonA is pressed some other action should be done and buttonA should only be able to get pressed when it reached it's destination below buttonB. And lastly, when ButtonB is pressed when buttonA has reached it destination nothing should happen. And when some other button which is already on the screen (buttonC) is pressed buttonA should be returned to it's original position (after which buttonB can be pressed again to move buttonA)
The current way I am doing it is so: on frame 1 ButtonA is positioned underneath buttonB. Both buttons are on different layers. A new layer ("actions") has this code:
Code:
Select allstop();
buttonB.addEventListener(MouseEvent.CLICK, clickButtonB);
function clickButtonB(event:MouseEvent):void{
gotoAndPlay(2);
}
On frame 2 the actions layer has a new blank keyframe with this code:
Code:
Select all
addEventListener(Event.ENTER_FRAME, moveButton);
function moveButton(event:Event):void {
buttonA.y += slowDown(buttonA.y, 268.35, 8);
);
} function slowDown(begin:Number, end:Number, speed:Number):
Number {return (end-begin)/speed;}
}stop();
When I play it it goes well for the first time, but when I press buttonB afterwards it looks like it goes through all the frames after frame 1&2, then it returns to frame 1 and the position of buttonA is reset and buttonA starts moving to its destination again. I also get this in my output:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at showcase17_fla::MainTimeline/moveButtons()
View 1 Replies
Apr 28, 2010
1. When you click on the buttons for 2 and 3, ALL three buttons move to a different part of the screen.
2. When you click on the button for 1, ALL three buttons return to their initial position.
Ideally, when the buttons move they would in fact travel across the screen rather than disappear for an instant and reappear in the new locations. Usually I would do this via a motion tween, but I can't figure out how to incorporate one here without conflicting with the other actions and thus messing everything up! I have to use a site structure similar to the one in the example because I need the intros/outros to be different for each mc.
View 0 Replies
Jan 3, 2011
Is there any kind of a standard for the location (padding) and size of the usual "ok" and "cancel" buttons on a Flex pop-up dialog box? In another stackoverflow question it was suggested that the approach be host operating system dependent (e.g. Windows vs Mac vs Linux).
View 1 Replies
Oct 16, 2010
I'm completely new to this forum, and would like to ask your help for one issue. I am working on an interactive flash map, I was able to set all the countries borders with the help of fireworks (awesome tool), and import them back to flash and set each country as a button. I would like to set all of the buttons to have the same properties for example : All the buttons have default red color, and will have a mouse hover frame that will change the color of the button to blue. I DO NOT want to set each button manually, because I would like to have the choice to change the mouse hover color to a different one, and would like to avoid passing each button and changing each one's mouse hover frame.
Is there a way I can built a template of a frame, and for each button set its mouse hover frame as the template frame I built ? And then if I make any changes to the template frame, all of my buttons would be automatically updated ?
View 1 Replies
Jun 23, 2009
I have tried repeatedly to take the examples in setChildIndex and instead of using sprites I want to control the order of 2 buttons on the stage so that when I roll over one of the buttons it comes to the top.
Here is the code I have so far which is from the example given in the on-line documentation:
[Code]...
View 3 Replies
Aug 3, 2004
If the answer is yes then a needle on a separate movie goes closer to the red(right) and if the answer is no then the needle stays where it is. This was all fine until the user ticks yes then changes their mind to no... the needle would then stay where it was rather than going backwards(towards the green) because I had set it up to not do anything if the no button was pressed initially? I was told that setting up the buttons as arrays would be the best option but on trying to learn about arrays I've become completely confused? oh additionally the amount of ticks dictate certain events that happen to the needle movie so they need to trigger events some how?
View 4 Replies
Oct 16, 2010
I am working on an interactive flash map, I was able to set all the countries borders with the help of fireworks (awesome tool), and import them back to flash and set each country as a button.I would like to set all of the buttons to have the same properties for example :All the buttons have default red color, and will have a mouse hover frame that will change the color of the button to blue.I DO NOT want to set each button manually, because I would like to have the choice to change the mouse hover color to a different one, and would like to avoid passing each button and changing each one's mouse hover frame.
Is there a way I can built a template of a frame, and for each button set its mouse hover frame as the template frame I built ? And then if I make any changes to the template frame, all of my buttons would be automatically updated?
View 1 Replies
Apr 1, 2007
I have pages of info I'm pulling from external files. I want my btn_next to not be visible when the last page loads and my btn_prev to not be visible when the first page loads. The btns are actually moviclips with instance names btn_next and btn_prev Here is my code:
//Stage Scale
Stage.scaleMode = "exactFit";
width_txt.text = Stage.width;
[code]....
View 6 Replies
Jul 2, 2003
I have a movie clip, behind a mask, and I am trying to control the position it moves to, dependent on the menu button pressed.
If I am honest I am trying to copy the effect used in www.lostinbeta.com when pages are loaded.I have got everything working, but currently I do not know how to set the finishing x position depending on the button pressed.
I think the issue is becuase I am trying to use the technique to make the movement slowdown as it reaches its correct co-ordinates.
View 7 Replies
May 31, 2008
Code:
for(i=0;i<folderNamesArray.length;i++){
current_y = this.mc_folderButton._y;
[code].....
View 1 Replies
Apr 18, 2004
[Code]...
i'm making a dynamic folder buttons... the above code i did ran successfully... now i want the dynamic buttons to display like at 1 sec interval between each button.. where and how do i insert the setInterval method..?
View 7 Replies
Apr 27, 2009
I am trying to make an object tween from its starting location to the location of a mouse click. I have a script, but it has a very annoying ease to it.I would LIKE the object to mantain a certain speed during while traveling from its starting location to the mouse click location.
View 16 Replies
Aug 21, 2011
I created a simple button that displays an error messeage: "error opening 'url" when I test the movie, but does play and opens in browser after publishing. However, it won't open in the browser in a different location. I pasted the html code in a web page but it doesn't work there nor opens in the browser in a differnet location from where it was originally published and saved. Why is that?
View 13 Replies
Mar 30, 2010
I'm currently trying to build my first flash site.I have just set up the buttons which get to each 'section' via frame labels and the AS3 gotoAndStop function.These work without error until my 'sections' contain movieclips that are referenced in my actionscript layer... Because they do not exist in 'all frames', whenever I click my buttons I get the error, "Error #1009: Cannot access a property or method of a null object reference."It took me a while to understand and track down why I was getting this. I removed the short bit of code in my actionscripts layer that referenced the movieclips in each section (I had some custom scrollbars set up) and it worked without error.
View 2 Replies
May 23, 2005
I'm using Flash Remoting to grab a result set from a SQL Server database. Then, using the total records in the result set, I'm creating the respective number of movie clips on the stage. Each of these movie clips is an instance of the "button_mc" movie clip I have in the library, named "button_0", "button_1", ..."button_n". The library movie clip that I'm using to create the instances contains a standard Flash button.
Anyway, that part is working fine. What I want to do is dynamically generate the onRelease event handler for each of these unique buttons. When I try to do this within the for loop, it sets all the event handlers to the last item in the list. What I want to do with the event handler is change the text of a dynamic text field based on the button name.
e.g. buttonName.onRelease = function() {
myDynamicTextField.text = "button_"+i;
}
In some ways it makes sense that the event handler is always going to be the last available in the loop, as the handler is called after the loop is completed. However, I'm hoping there's a way to make the handler "stick" after the loop is completed.
View 2 Replies
Feb 16, 2005
How can I move my MC from one location (x, y) to another location (x1, y1) wirh action script..?.. and I would like to have my motion tween rounded to (x,y) so it will look sharp.
View 8 Replies
Feb 1, 2009
I have the attached .fla file that was created in MX2004 but I only have CS4 to work with. Is there a way to convert this so I can use it?
View 2 Replies
Jan 10, 2006
I have a piece of code that works fine using flash player 6 and AS2 but soon I as try to use flash player 7 and AS2 it stops working..
This is my code:
Code:
var cgiThing=new loadVars();
cgiThing.onLoad=function(ok){
[Code]....
View 2 Replies
Apr 9, 2006
Whenever I make a code to duplicate anything in a reaction to an action, i get the problem of having my initial duplicated mc destroyed upon re-duplicating (you fire bullets and the one shot before the last always disappears and so).The thing is, if you take kirupa's "How to Fire"-tutorial, download the source and run it, the thing works like a charm. However, even if i copy every last single bit of code and content to a new document, the duplication process acts as described above.In addition, here's a quote from the tutorial "How to Fire" [url]
explain how on earth one would get "_level0.bullet" from something the likes of "trace(this._name)", which, of course, returns the instance name. Which would, in the aforementioned tutorial's case, be, in fact, "bullet". Not "_level0.bullet". He states "It's not the instance name"... Well, what the heck is it then? The result of the trace in question varies relying COMPLETELY upon the given instance name. If you write "Bratwurst" as the instance name, you get "Bratwurst" from the trace, as god is my wittness.
Even if i remove EVERYTHING from the code that even COULD, by the user's will, remove the duped mc, the initial problem remains. You can only fire one bullet at any given time, other(s) disappear.It's most propable that there's just something i've missed completely, and end up making myself looking like an ***, but still.For those who want a code, just take a look at the tutorial (the URL above). Everything's basically the same. I would also appreciate if someone were to try what i've described, which is to copy everything from the tutorial .fla and placing the stuff on a fresh document.
View 1 Replies
Mar 29, 2010
I've been using MX 2004 pro for a few years now at a fairly superficial level just for website updates/enhancements, little educational things, and little personal animated birthday cards, etc. I have just recently started learning action script, which I'm getting, slowly but surely.
Anyway, my question is: how much different is CS4 from MX 2004? i.e., am I looking at a huge learning curve? I don't mind huge learning curves when I have lots of time on my hands, but I don't. But I would like to keep my software up-to-date, since I just got a new computer with Windows 7 on it.
View 1 Replies
Feb 12, 2004
The problem is that I can't get the subItems to work with the onRelease function.
View 1 Replies
Sep 14, 2004
I have 9 static movieclips arranged in a 3 by 3 grid, and 1 movieclip that moves using keypresses (invisible_mc)[code]when a hitTest is registered between the invisible_mc and any of the icon_mc's, The icon_mc goes to and stops on frame 2..else it goes to and stops on frame 1. I have constructed the hitTest as follows.is there anyway to reduce the endless repetition of code? [coe]
View 1 Replies