ActionScript 2.0 :: Making Button Stop Working When Group Of Images Is On Last Row?
Mar 12, 2006
It's been a while since I've last posted, but I read a lot of others' posts, and try to keep up to date.My question is this:I have a group of images that are loaded up using xml into a movieclip. The movieclip is masked. I have 2 buttons, that scrolls the grouping either up or down. I would like to make these buttons inactive when the grouping of images is on it's last row, meaning when there is only one row of images shown on the screen/mask.
I have tried using hitArea, but I wasn't successful. This would be easy for me to achieve if I wasn't trying to make it a bit dynamic. Basically, someone would be updating the xml file with more nodes/images and the swf would update the list of images, thus making it difficult to hardcode when the list should stop scrolling.
View 10 Replies
Similar Posts:
Sep 24, 2011
i want to create a container at runtime when ever i push a button at different places on my screen, for start lets just create only 1x of such container using a button .
View 1 Replies
Dec 2, 2011
I know I can make an array if all the buttons would have a unified code executable change, i.e. they would become larger and brighter.
My problem is that each button represents an product image in the lights off stage, then of rollover it is a lights on stage so I have to import two images in the on and off stage and play around with the opacity.Additional problem is that each button has to ling to a different label.
My question is: is it possible to unify the code if buttons have that much individuality or I have to make each one of them as in the example below.
// makes a hand cursor appear over a mc acting as a button for all the buttons inside the scrollpnaeBckgrnd_mc.scrollpaneBckgrnd_btns_mc.
MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btn s_mc.buttonMode = true;
MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btn s_mc.useHandCursor = true;
[code]....
View 2 Replies
Mar 23, 2010
I have a large creation in process that requires a lot of heavy animations and movement with vectors and really processor intensive. Just want to know, regardless of whether the project is huge or small, how to totally stop a class from working? I have three classes I am calling. "class1 = new Class1();" etc. When I am in the level, say, class2, I can still talk to objects in class1 even though I removed the class listeners within that class1 after I was done using it. It still is able to be called upon, and still running something in the background that I can't figure out what it is. I just want to know, rather than searching for whatever is causing the problem, can't I simply null the class that I never ever need to use again?
I tried that, but then I ran a trace and it still tells me that it is a class object. I reckon its because I have a "public var class1:Class1" etc, which means they will always have those objects associated with them, but still. I want to totally get rid of it for garbage collection, and because I don't want to use some of them at all, ever again. So basically, what is the best way to get rid of classes so that they aren't hogging up resources any more?
View 2 Replies
Sep 26, 2011
my problem is when i create a button in state 1 and click on it according to code it should make a group in another state named as expand. However according to my code it is still making group in current state 1.
[Code]....
View 1 Replies
Apr 12, 2011
I have a button that I only want it to work when certain conditions are met, and if not, then this button will not work.
homeMC.gotoSleep_butt.addEventListener(MouseEvent.CLICK, toSleep);
function toSleep(evt:MouseEvent):void{ dayChange_MC.gotoAndStop("1"); day += 1;//add 1 to var day stat_day.text = String(day);}
[code].....
View 6 Replies
Feb 20, 2011
Ok so I have this simple animation I created of a circle that moves from one side of the stage to the other. I have added a new layer and called it buttons. On this layer I have added 2 buttons. One for start and another one for stop. The purpose is to get my circle to move from one side of the stage to the other but be able to use my buttons so that I can start and stop the animations at random times during playback. I fixed all my compiler errors now the problem lies in that everytime I click the start or the stop button I get an output error. I have a 3rd layer in which is titled actions and this is where all my code is posted. I removed that layer and placed my code in the first frame of the buttons layer to see if this would change anything but I still get the same output errors. So I just added back my actions layer. What could I be doing wrong? I have made sure to name all my movie clips and buttons correctly and I even added an instance name to them.[code]Here is my code and the errors I am getting when I press the play and stop button on test.Error #1009: Cannot access a property or method of a null object reference.
View 10 Replies
Jan 7, 2010
I had a button in scene and it worked perfectly.Then I put it in the movie clip, so it appeared only when mouse was over other button and then it stopped working.This is the code:
on(release){
mx.behaviors.DepthControl.bringToFront(_root.poloz enie_movie);
_root.polozenie_movie.gotoAndPlay(2);
}
Button should start a movie clip different than it is itself.
View 6 Replies
Apr 10, 2009
I'm using a movie clip as a button to show content on a page, effectively its like a new page of the website. Problem is, with the script im using for it, once the content is show, the button is still active and if clicked again, will re-load the content. I want a way to effectively disable the button whist the content is shown.
this.services_inner.buttonMode = true;
this.services_inner.addEventListener(MouseEvent.MOUSE_OVER, rollOver_services);
this.services_inner.addEventListener(MouseEvent.CLICK, onClick_services);
[code]........
View 11 Replies
Jul 1, 2010
How can I import a group of prepared jpg's into flash 9 as a sequence of key frames so I don't have to do that manually?
View 2 Replies
Feb 13, 2006
I have 3 buttons and 3 MC's .each button tells it's MC to play and then stop at frame 15 and then tells the other two MC's to play if they are already at frame 15 and if not do nothing.i have it working to a point but after pressing each button a few times the script see's to stop working.
View 7 Replies
Nov 4, 2011
How can I load a group of Images and do something AFTER all of the Images have been loaded?
Furthermore I think they have to be part of the stage, to fire events, right?
I mean... I cannot simply create them, load the iamges and then add them to a Group just present in the interface... I have to add them to the Group BEFORE I load the iamges if I want to be able to handle the complete event, right?
View 3 Replies
Jan 18, 2010
I have this group of images loaded around 5 rows. When I mouseover at the edge on the right or on the left, the image will scroll. As I scroll, i want the images to loop.
Then, i tried to find script on this whereby if mouseover, each rows will move in diff speed. Myabe 1st row is faster, and the next row might be bit slower.
How can I loop the arrays of images? How can I make each of the rows move in diff speed?
View 1 Replies
Oct 13, 2009
I'm trying to build an AIR app to convert a group of png images in my desktop to SWFs.So far I can do that using PNGEncoder to convert the loaded images into a byteArray and then using another ByteArray to generate the swf.The problem is I want to compress the images as well and PNGEncoder class doesn't support compression. I triyed with JPGEncoder, which supports compression, but it wont support transparency.
What I'm trying to do is something like the properties menu in the Flash IDE where you can select a png and apply a jpg compression to it. And when you export the png's transparency is preserved.The point of this is so is easy to convert, lets say, 100 pngs into swfs (without having to load each one of them into flash, adjust document size, export, ...)
View 4 Replies
Jan 23, 2004
on the attached fla I have an "invisible" button (button with 0 alpha). I copied a script from the tutes section that will allow me to open a new window when the button is clicked.This works OK, but I also have a MC below the button layer and this MC has some AS attached to it which basically makes it fade out to the image on the bottom layer.
It seems to me that the button script makes the MC script stop working because it's above the MC layer (I've switched the button layer below the MC layer and the fade out then works, but the button doesn't.How can I get both scripts working together? I know that MC's can't work like buttons, but is there a work around this?
View 6 Replies
Nov 29, 2010
I have a panorama picture and I can move this picture using my arrows I have made. I would like to put the buttons on the specific place of the picture. I want to make the buttons move with the picture while I scroll the panorama.
View 1 Replies
Apr 27, 2010
I know how to set the style for a radio button in AS3, but is it possible to apply a text format style to a radio button group, rather than each individual button?
View 2 Replies
Jul 22, 2011
I currently have a radio button group consisting of four radio buttons.
Assuming a user selects one of the four buttons as a choice.
I want to use a button to clear all the radio buttons as unselected.
What is the AS that will set the selected state of all buttons in the group to "not selected"
View 1 Replies
Mar 22, 2012
I have a pretty large quiz/survey with 60 questions (4 questions per page and 15 pages) and I get a deselection bug come up at pages 5, 10, 15 for no apparent reason! I have checked the code vigourously for any errors and I can't see anyWhat happens is that a particular question within those pages stated above - when the alternate radio button is selected, it does not deselect the other radio button in the group.
There was no real clear solution to this other than build the questions dynamically from an XML file. I would really love to do this but my AS3 skills are not advanced enough to be able to program everything dynamically and I currently don't have time to learn these skills as the flash file is due like yesterday
View 4 Replies
Mar 17, 2010
iam new to flex, can any one say ,how to validate the radio button is selected or not in flex 3 if my question is wrong, regarding the validation of radio group
View 4 Replies
Mar 30, 2010
im trying to disable a radio button group in flash, so users cant change the selected item.
im using the following code to create the radio button
var rbuttongroup:RadioButtonGroup=new RadioButtonGroup("radioGroup");
then adding radio buttons to it on the fly, my question is how do i go about disabling the radio buttons ?
EDIT - im using action script 3.0 !! and when i try doing
rbg.enabled = false;
i get an error 1119: Access of possibly undefined property enabled through a reference with static type fl.controls:RadioButtonGroup.
View 1 Replies
Jul 1, 2009
I'm making a website using flash,And on my movie it says Welcome to Blah Blah Blah,And then a button appears, To make sure my button works,The writing turns to bold and goes bigger,When the button appears it works and goes bigger, Until it reaches the point in the timeline where it has stop();It stops my movie from looping or restarting which is what i want, But it stops my buttons from working aswell, How to keep my button working but movie stops,If you want me to explain more just ask
View 1 Replies
Nov 17, 2008
I am new to ActionScript 3. I found the code to create a setof radio buttons - the problem is that each time I call asubroutine, it seems to create a new set on top of them (hence theyget darker each time someone clicks them. I need to be able toclear them from the stage and start over - basically the codecreates a set of radio buttons, and then a set of radio buttons foreach of the main buttons created. I've tried destroy object -generates compiler errors.
View 1 Replies
Aug 14, 2009
I've got some MC's in my library that have radiobuttons in them -- all of this created at design time -- and pull them onto the stage dynamically. My question is how do I get the selectedData from the group? The setup is like this: In a MC called pageOne, I have a group of buttons with a group name of Q1, Q2, etc. I pull the MC onto the stage like this:
[Code]...
Do I need instance names on each of the buttons and add listeners to all of them?
View 4 Replies
Jul 16, 2009
i needed to change the code below to post the userAnswer from radio button group, to an ASPX page so i can read the data in and post it to a database.
[Code].....
View 4 Replies
Nov 11, 2009
Okay I'm struggling with my FLVPlayeback component. I have one on my stage, then when you click a button a movie loads in it, but as soon as i click on the home button to go back to frame 1 then the movieclip continues playing, (audio only) when i go back to the FLVPlayer, nothing is playing although you hear the audio and if you load another movie in the FLVplayer it plays over the other one.
I did try
Code: Select allMovieB.stop();
but its not working, it only gives me a
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at WorshipTeam_fla::MainTimeline/onPhotoClick2()
View 4 Replies
Feb 15, 2010
I have a main fla file, that preloads and loads three external SWF's just perfectly. The three SWF's are simple flip book animations. This is the site: [URL]. This is the only actionscript in the main.fla file.
Code:
var j = 0;
myarray = [];
cliparray = [];
createEmptyMovieClip("paper", -1);
_global.preloaderf = function(klip) {
[Code] .....
The problem is, that the first movie is really jumpy, the second is a little better and the third is the best. There's three buttons designated to each movie. My question is, why are the movies jumpy? I'm assuming it's because when one is visible, the other two in the background are still running and taking up the speed. How can I make the background SWF's go into a stop state, or whatever you might call it.
View 0 Replies
Jan 15, 2004
this may seem like an odd question. well after spending ages getting my slider to act like I want I now want it to stop at a certain point - but to act 'naturally' - basically the slider accelerates the more a button is pressed and uses a set deceleration number to slow down the slider when the button is unclicked. So the faster its going the longer and further the slider takes to slow down - 'ease' down. when it reaches zero it stops.
If you click on the blue arrow in the movie youll see what i mean. The problem comes up when i want to get the slider to stop. I want the slider not to go beyond a certain point (say 600). This gets very difficult if the slider is to act naturally (as before). I guess some kind of reverse engineering is required that works out what point to start the slow down based on where the slider is and what speed its going at??
View 9 Replies
Sep 8, 2006
This problem is driving us crazy. The idea is simple. We have one instance of the FLVplayback component on stage as well as a playlist of videos. When we click a video in the playlist the FLVplayback instance starts the progressive download and plays the video.However, when we click a new item in the playlist, the FLVplayback instance won't start playing this file until it has completed loading the previous file. Stopping playback makes no difference.Is there a way to stop the FLVplayback instance from playing AND downloading so it is instantly ready to start loading and playing a new oneOf course removing the instance and attaching it again is an option, but that screws up the functionality of the player's controls and really feels like a hack that we shouldn't have to use.
View 5 Replies
Dec 14, 2009
When my avatar bug makes contact with another type of bug, he eats it. Both bugs are movie clips; when the avatar gets into the collision detect zone of the edible bug, it triggers a quick animation in the "edible" bug: he becomes a blur for one frame then disappears (as though eaten).
The problem is the sound effect - a quick "whoosh". It needs to play once then stop. What happens now is that it's triggered repeatedly - a problem if the avatar passes over the edible bug slowly. If the avatar later passes over the spot where the edible bug was, the sound is triggered multiple times again. So I need the sound to play only once, then stop. There will be several copies of the edible bug's movie clip that need to behave the same way, so once the sound stops playing it needs to be available again for the next collision.
Here's what it looks like now:
private var sfx_edible:Sound = new eat();
function detectCollision(myevent:Event):void {
if (avatar_mc.hitTestPoint(edible_a.x, edible_a.y, false)==true) {
[code]....
View 1 Replies