ActionScript 3.0 :: More Than One Function One Thing THEN Do Another?
Jan 18, 2009
I'm wondering how you add more than one function to a button? When the button is clicked I want a tween to be carried out which brings a image onto the stage, then once that is there I want each button of a menu to tween in one after another. How can I do this with actionscript?
I've tried just adding the tweens all under one function but they are carried out all together rather than one after another..
When you click on "works" on my site it reveals a menu with 2 other buttons, but when you try to mouse over the 2 buttons the whole thing dissapears. What I've done is set the "works" button to jump ahead in the animation to reveal the menu which is actually one large button with the 2 other buttons on top. The large button is set to - on rollout goto and play frame 1.
I have a special canvas class covering my entire stage, and a bunch of Sprite hotspots on the layer below. If I put the hotspots on the same layer as my canvas, the canvas does not register MOUSE_DOWN events if my mouse is inside one of the hotspots, since the hotspots are targeted instead. However, if I keep the hotspots on the lower layer, the canvas handles all the MouseEvents. Is there any way to make MouseEvents target more than one thing, so that both the canvas and hotspots respond to MouseEvents? (The canvas is a bitmap drawing class and the hotspots are supposed to trigger when the cursor touches them or clicks on them.)
I want to use a next/previous image thing, which loads the next image from an array into a second movieclip(which will be hidden)... then swap the visiblity of mc_1 and mc_2 ...attach a preloader and stuff.its basically an effort to save some peoples on 56K dial-up lines.so it alternates between mc_1 and mc_2 (which is the easy bit)
this code works, although when I rerun the function by clicking on "box" it just loads the image at pic[0] (winterrangep1.jpg) while tracing this.picNumber in the loadNextNumber function I get NaN.That only becomes NaN when _root.box is clicked, not when it is run from the _root.
Anyways, click on that link. As you can see I've set it up so that clicking on one will change the color of the other. As well, they have a rollover to another color.
But, I want to add a rollout thing to each link so that when I rollout the link will go back to the color it was before I rolled over.
Right now it stays with the rollover color and when I add a rollout thing it is constrained to one color. I need it to be adaptive to each situation as I will be adding more links and more colors down the road.
I just need a rollout action that will not change it to a certain color, just the color it was before I rolled over.
If you understood that at all answer. If not, tell me or ask a question to clear it up. I might even whip up a larger version of it with more colors to make it clearer, but only if you need.
I found this tut http:[url]...and wat i want to do is have thing like Flash.I know how to make the lines thicker but i need when you click the button the lines turn thicker like the As changes.
i'm working on a flash xml gallery. But there is one thing i can't figure out.i like it very much when the thumbnails are not i 1 line but 5 next to each other and then down. So the 6th one must load underneath the first one. Is there an actionscript for or is too complex?
ok i've beent rying to get this to work for the past hour or so and i'm really confused so i'm gonna try here...i'm trying to make one thing load...and after that has loaded...another thing load...i know you can do all that in the timeline but it would all turn out messy...so i was wondering if you could do it in the action box...and i've tried this so far...
Worked on a project for 8 hours. I should have saved it, but the abobe stuff seemed to be bullet proof. I pressed the up arrow and poof gone.
Why is there not some sort of auto save for when it crashes? such a simple task you completely forgot. I guess now I have to save non stop to use your product. I don't want to sit there and mash that crap all day long. Another thing why does cutting and pasting frames from another file always put it in random spot? then when you go to move it, you have one messed up animation. When you click on a layer, you see the motion in the little colored line, and then the actual pic. When you select more then 1 layer it only picks one of the dotted lines, but it proceeds to copy incorectly.
BTW why restrict underscores in screen names? WHY? I can't come up with any good reason.
I'm new to the forum, and to flash. I'm trying to create a photogallery in flash, with buttons. I already got the button part ready, but I'd like to add a drag and drop, and a zoom in /zoom out button out option. The problem is, I can get the zooming thing, and the drag and drop thing in AS2, but not in AS3! I'll link the script I used for the button here, as well as a screenshot of my timeline.
I have a background symbol that does the loading external jpg job, and a engine as3 that loops 2 backgrounds continuously on the screen. However, only one background can load file although they "new" from the same symbol. To test this urr... phenomenon, I exchange the order of "new" code of 2 backgrounds, then whichever on top will perfectly load the jpg file and the other will remain blank. has anyone faced this problem before? or knowing how to solve it? this external loading is really painful to me from the beginning.
[Code]...
so as you can see, I put the B2 = new fBG() prior to B1=new fBG(), then I can see B2 but not B1 and if I exchange the order, I can see B1 but not B2. That's the problem!
I am wanting to make a game, and I need a gravity code that works great. I want gravity, a jumpibg code, and then a code to make something stop when it hits another thing.
We create training material for nuses and working on a mask that will shadow everything but what is seen in a highlighting box. Basically I created a movieClip with a box border and no fill.I then move that onto the stage on the timeline when I need it to come on screen during the movie.I move the box and size it.The box is assigned a var myPos (just so it knows it's name by an array). At frame 1 I have this function set up:
I have designed some thing within adobe illustrator(vector images), and my project im doing for myself is being able to add these vector images in, and be able to modify them, colours, add stuff to them and so on. I've seen things done on the net before with these used, but can't seem to find any tutorials regarding this.
This client of wants a flash video player of a model, modeling some clothes.
They are going to set up 3 different cameras around her at the same time filming her - one from the front, one from the side and one from the back. Each clip lasts exactly 3mins and they are filming her at THE SAME TIME.
Now after this, they want to put a FLASHPLAYER on their website with the video playing in a screen with 3 buttons underneath one saying FRONT VIEW, one saying SIDE VIEW AND one saying BACK VIEW. The three separate videos will be integrated in some way with this one flash file.
The video player might start playing the FRONT VIEW first.
BUT lets say 30 seconds into the clip I press the SIDE VIEW button the video switches to the side view on 30 seconds - The side view video doesn't play right from the start. Like I said before for example if the person is speaking and says "hello there", if you switch angle by clicking one of the buttons just at the point after she has said the word "hello", you switch to the angle where he is just about to say "there". If you see what I mean.
As I said before there are 3 separate video clips:- FRONT VIEW, SIDE VIEW and BACK VIEW. Now I am not sure if these have to be embedded in the FLA file or can be contained in a separate folder on the server so that the SWF can access them. I am worry about streaming over the internet thats why I THINK Flash Media Server3 MIGHT be a solution BUT I don't know. BUT they must be seamless.
AGAIN to reiterate...LETS say I am watching the SIDE view 30 seconds after the clip has started and the model starts scatching her head and then AT THAT POINT I click the front view button below I see the model scratching her head from the front view at THAT precise moment.
So all the videos seem to work at the same time to the casual viewer/user and it looks as though you are just switching views whenever you want.
I have been looking all over the net to see if someone has produced a working example or if there is a tutorial somewhere but I have found NOTHING.
I think there might be a problem pulling this one off as each video clip could be 4-5 MB in size and if they are streaming then there would be download problems and these videos might stop due to people with various bandwidth restrictions UNLESS all the videos were integrated into the flash library and were referenced from within by Actionscript but then the resultant SWF could be HUGE.
The garage door has a chevrolet logo on it that is pulsating. I know how to make buttons but I need the garage door to become a button that when clicked the animation plays rather than it playing automatically.The top of the tool chest will be a button that plays the animation in reverse and the drawers are buttons that open to an email form for each. But I don't know how to target these buttons because they are nested two levels below the main timeline.
create those mix and match things that you often see on those fashion websites (You would select what variety of clothing you would want by clicking through the different items until you get the combination that you want, and then submit that choice to the store). I heard that it can be easily done in flash and so I am asking if it can be done.
I have nothing made at the moment. I just want to be able to know what the heck the client was talking about before I send her a contract. It'd be really messy if I come off as a guy who doesn't know what he's doing.
If you have a flash movie, how do you put everything in loading techniques so people who open our website do not wait too long.
For example if you have portfolio section menu in you web. Do we have to call the portfolio.swf with the loading inside the portfolio.swf ? I just really dont understand how the loading works. Can anyone give some flow chart of the logic behind the loading technique.
Im trying to dynamically make a dotted line box around some thing. Making the box is simple but and I make it dotted or do I have to make a lot of little lines. Im going for a selection box like look
I have like a bullet shooting thing which shoots bullets (obviously), and it sorta rotates around a point and fires at a movie clip. At the moment the bullets move outwards because of a animation in side the bullet movie clip, but how can I make them move outwards and away from the thing that fired them using actionscript?
I am using actionscript to place every thing on the flash dynamically. However, when I was finished I noticed a tiny little bug that I just can't fix. Whenever the stage.height is an even number one of the objects is misaligned by half a pixel. When ever the stage.height is odd it is perfect. See images below for what I mean. Here is the related actionscript (called upon load and resize):
I have a movie clip(a large image that has the same size as the stage) and a button in a square that is small (150x150) . The zoom has to be like this: I click on the button once and I have to zoom in (only once) exactly where the square is (in the center of it). When I click the zoom button again I have to zoom out and every thing has to be like like the beginning. This is the code I have:
Been a while since I have used flash, but I finally have a chance to get my hands dirty again. I'm putting together a video player and all it's all working fine so far.
I was wondering how you can add similar functionality to the player like YouTube, where you can skip to any part of the video before the entire flv has downloaded?