I have some simple script that has 2 "movie clips". What I want to do is to start moving the second movie clip at the same time when the 1st starts moving. (both start moving at the same time) I tried the following script but it never works:
I'm new to Flash and just started working on an animated short. In one of the sequences, I realized too late that an object was too far left in the frame and needed to be moved back. Is there a way to do that in all of the keyframes at once rather than doing it one at a time? The thing that needs to be moved is a .png file, not a symbol.
Anyone want to tell me why this MC allways goes to frame 76 once clicked insted of checking the frame its on here is the code... function goQuestion(e:Event){ if(e.currentTarget.frame <=(60)){ e.currentTarget.gotoAndPlay(60)}else{ e.currentTarget.gotoAndPlay(76);}}
I'm Making a catalog on Flash CS4 ActionScript 3.0and I don't know ho to move between movie clips using buttons and action script...In Scene 1 I have 2 framesIn frame 1 y have a movie clip (MC) and inside that movie clip I have 10 framesIn frame 10 of the MC, I want to put a button that will take me to frame 2 of my original timeline (NOT frame 2 of the MC)an some one tell me how's it done?or if it can't be done that way...then ...How do I go from frame 1 to frame 2 on my original timeline in Scene 1 after the movie clip in frame one is done?
I'm looking for a way to automatically insert enough frames to span the length of embedded audio. Currently, when you add audio to the timeline in a frame, it doesn't expand the frames.
I am trying to step from AS2 to AS3, not that easy.. I got to this point with a simple 3 frames movieclip. Frame 1 gives the option of loading 2 different external swf, frame 2 load directly a 3rd external swf, frame 3 nuttin happen. All works ok except when from frame2 i will go back to frame1, one of the 2 button (to load ext swf) disappear. The code i wrote down is prolly not the best.[code]...
I have a Flash Movie that is using Actionscript 3.0 and I have a part of it, where the user has three choices of where to go. Once they go to one, it takes them to a certain frame, then returns to the choice frame. There are three choices here, and what I want to happen is have a button appear to move them past this section, only after they have viewed all three choices.
Why is it when I attach a movie to the stage using the attachMovie function or create a movie clip dynamically using createEmptyMovieClip and the drawing API the movie clips stays visible when I change between frames.
I've been given a avi file that I've turned into an flv and now need to create two versions of that flv, one with all the audio and one with a small section of the audio removed (its narrated and we need to remove the mentioning of a specific item).
I know I can import an flv into the flash timeline but am not sure how to kill the sound for a given portion of frames,
Was considering redoing the flv as two separate flv's, one with video and one with audio and then putting them into the timeline and cutting the audio up, but I would love a cleaner way, preferably with ActionScript
Recently I bought CS4 as I decided that I wanted to design and create a new website for hosting my music productions, I have used dreamweaver in the past so I am quite familiar with XML etc but I wanted to make something with a little more to it. After talking to quite a few people and reading into it all I found that this would be my best option. After thinking that it was all going to be quite nicely straight forward Im banging my head against a wall in trying to learn and understand Actionscript.
I have currently designed all of the pages, I have used a few tutorials on actionscript 3.0 and have the whole website is functioning, my pages, frames, labels and buttons are all functioning how they should on the timeline and there is around 14 pages..
The problem i've had for around 4 days now is getting all of my audio previewssnippets to work, i have around 20 of these and I need them to be spaced out on about 6 pages (frames) ; Each frame is a different release etc
In each frame, I have 8 buttons 4X play buttons next to each track and 4xStop next to that... play_btn, play_btn2, stop_btn2 and so on..
I've set it so that all I want to do is be able copy the code into the other frames and also the buttons (which are on a different layer) and then all I have to do is enter the filenames in the code below (Track1.mp3, Track2.mp3 etc)
So... it all works fine on my first frame of my release page.. The audio plays and stops for each track, no problems at all.
Now,, the problem happens when i copy the actionscript from my first release page(frame) to the next.. its about 25 duplicate functions, duplicate variables etc
Is there some kind of way I can put all of this into some kind of Class or Tag.. And this code only operates inside this frame and not in the next to cause the duplicate errors? I realise that I could Label every single variable, function and button differently covering all of the frames so that it dosn't cause the duplications to occur but, I am hoping there is some other way around this..
import flash.media.SoundMixer; //PLAY TRACK 1 var soundReq:URLRequest = new URLRequest("track1.mp3"); var sound:Sound = new Sound();
I have a site where I want to restrict the user from moving forward unless they have visited certain pages. So if you visit page 1, 2, & 3, then a button appears that lets you move forward. I have this working using buttons. See Example: boolean.zip
However what I need to have happen, is instead of having it check to see if you visited the page by clicking a button, I would like it to check if you visited a frame just be going to that frame. I am not sure how to do that.
I am getting the following error message: "TypeError: Error #1009: Cannot access a property or method of a null object reference. at fl.containers::ScrollPane/endDrag()"
The problem occurs when I like this: I click a button on the Main Frame which takes me to frame #2. I go back to the Main Frame and then come back to the frame #2. When I go to Frame #2. I get the error message. I suspect the problem is occurring because I am not emptying the "scrollPane_1" component on exit. In the code below scrollPane_1 is a scroll pane component. This is occurring on all pages that I have the scroll pane on. Also the scroll pane component is on stage and has an instance name of "scrollPane_1".
This is an Air for iOS file. Here's the code. stop(); scrollPane_1.source= myText_1; scrollPane_1.setSize(600,585); bnt_home_1.addEventListener(MouseEvent.CLICK, bnt_Goto_home_1); function bnt_Goto_home_1(event:MouseEvent):void { [Code] .....
If I have a 2 minute audio, and I want to scrub the animation frames around the 1 minute point, to see how they coordinate with the audio, is that possible?
I am calling some streaming video on frames 1-11 to play for a multiple choice game. My video and audio are out of sync at times on frames 3-11? [code]...
I developed a website using flash with Actionscript 3. I included a music as a background for the website and the music will loaded when the site loaded. But the problem that when I click buttons to move between pages(frames) then go and click button_01 the music will play again so I will have music playing more than one time in the background and the sound_btn will not work any more so even I click sound_btn the music will not stop. The code I'm using is listed down. What I should modify to not allow the music play more than one time in the background while moving from one page(frame) to another.
stop(); //number that is redefined when the pause button is hit var pausePoint:Number = 0.00; //a true or false value that is used to check whether the sound is currently playing var isPlaying:Boolean; [Code] .....
I'm trying to modify many .fla files (in CS3) that have a voiceover layer on them. Because I'm adding or deleting other items on the stage, I need to adjust the audio fo synch with the modified flash file. I have tried deleting frames and this happens - I select the unwanted frames, such as frames 200 to 300 of a 500 frame file. Then, the audio from frames 300 to 500 (at the end of the file) gets deleted instead.
I need to create gaps (like 200 frames of no sound) in the audio (.wav) file so I tried adding blank frames. When I click on "insert frames" in the middle of the timeline, Flash adds the new frames to the end of the sound timeline.
I also tried adding a keyframe at the beginnig of the range and Flash deleted all the frames after the keyframe.
It looks like any modification to the sound/audio layer only affects the end of the timeline. How do I modify sound parts in the middle of the timeline? I know this can be done but how?
Details: The audio layer (.wav) runs the whole length of the Flash file. The .wav file is a sound file in the Library; 22kHz Mono 16-bit 27.4s 12.1kb. The files were created in CS3. These files work fine.
Calling channel.position on an ENTER_FRAME event, I notice that it's not being updated every frame, but it looks more like every frame and a half.
var sound:Sound = new Sound(new URLRequest('music.mp3')); var channel:SoundChannel = sound.play(); // assume the sound is completely, // totally, 100% loaded
I'm having the problem that my video, which sits in a movie clip, does not stop the audio after moving to the next frame, even though the video instance is removed. Here is the code from the main timeline:
import flash.events.MouseEvent; next1_btn.addEventListener(MouseEvent.CLICK, ongoPage2); function ongoPage2(Event:MouseEvent):void {[code]....
if I want to play/test only 30 frames of 100, is it possible to hear the audio that just pertains to those 30 frames? Or is this only possible, IF the audio segment STARTS WITHIN those 30 frames?
What I mean is, can I add a sound that will only play if there are enough frames for the sound?I want to only play on the frames that it is on, but it plays all the way through the sound file regardless of the amount of frames.
I want to know that how to control frames at run time, I mean how we know that currently I am at which frame (running stage). Can we fetch the value of Frame at runtime?
i have a about 20 frame animation but what I want to do is to find out is there a way to set a time to play a certain frames i.e when movie starts it plays only 10 frames and then stops for a minute then after 1 minute it continues from frame 10 to frame 20 and then again stops for one minute and it starts over again
I'm making a timeline with a moving car. It has to go from left to right in about 11 hours. I got this code and the car is moving from left to right:
[Code]...
But everytime I refresh my page the car is at the begin again. So I have to attach it to a Timer/date class to it so it stops at a certain point / time and date.
Problem is, only one divider actually moves at a time. I found that if I set a timeout of about 50ms before moving the next divider that both dividers move. However, this seems like a rather awkward way to approach this and is error prone.
Anyone know if it's possible to move two dividers in a HDividedBox simultaneously or should I be taking another approach?
This has been destroying my noggin for hours now. I have an MC within an MC that I want to move from left to right, starting at 6.5x and needing to end at its width +6.5c (so 494.5x every time). Depending on the TOTALSECONDS I put in, it changes every time. It is always off, never perfect, and it is boggling my mind. Here is my code.
Code:
TOTALSECONDS = 90; // you can make this any number var pMove = (progressBar.blackBar.width + 6.5) / (TOTALSECONDS) /8; progBarMovement = Math.round(pMove*1000)/1000;
[Code]....
progresBar.blackBar.width is equal to 488. Add 6.5 to it, and we have 494.5. Regardless of how many TOTALSECONDS I use, this bar needs to move across the screen from left to right perfectly until it reaches 494.5, which should equal the "total" found in the code. It works for some numbers, doesn't for others. It is like numbers are being lost in transit. If I set the TOTALSECONDS to 10, it works perfectly. If I set the TOTALSECONDS to 90, it ends up at 476x rather than 495x where it needs to be. The longer the time, the worse it gets.
This should work flawlessly each and every time. This could not get any simpler, yet it is not working. Simple simple math and yet it doesn't want to work. I have to be missing something. Maybe the .x coords can't move on certain decimal digits, so those are being lost?