ActionScript 2.0 :: Dragged An Mp3 Onto The Time Line ?
Jun 7, 2004i dragged an mp3 onto the time line and i want to be able to make it stop with the click of a button,
Code:
on (release) {
Sound.stop(["stap-1.mp3"]);
}
i dragged an mp3 onto the time line and i want to be able to make it stop with the click of a button,
Code:
on (release) {
Sound.stop(["stap-1.mp3"]);
}
My issue is that for my website I want there to be movies in between the interactive parts of it where the interfaces slide in and out. However, I can't stop a movie from playing over and over instead of playing once and going to the next frame.With 2.0 I haven't been able to find any research that helps me, probably because I don't know the correct keywords to search for.Right now I have my main time line set up with a loading bar on frames 1 & 2, that then jumps to frame 3 where I have embedded a movie (Instance named: mc_start) of the interface sliding in. Preferably after that I need it to jump to frame 4 where the actual interface is.
I can get the movie to end by going into the embedded movie's time line and simply have stop() ; at the final frame, but I can't get it to go to frame 4 on the main time line. If I having something like gotoAndPlay(4) ; on the final frame of the embedded movie's time line, it simply goes to frame 4 of the embedded time line and not frame 4 of the main time line. If there was a command to make it jump back to the main time line instead of the embedded time line, that would work perfectly.Coding on Frame 3 of the main time line to jump to Frame 4 would work if I knew the correct language to detect when the movie has ended (Movie is 191 frames long), so that afterwards it would immediately jump to Frame 4, but I haven't been able to find any resources that will teach me how to do it. Right now having gotoAndPlay(4) ; on Frame 3 of the main time line obviously makes it immediately skip the movie on Frame 3 and jump to Frame 4.
What I have is a movieclip and a button in scene 1 (which is the main timeline).There is an actionscript layer also on the main timeline. what I want to do is when I click the button, it would do a nextFrame(); in the movieclip timeline instead of the main timeline.
View 4 RepliesI'm using AS3. I have a timeline with 12 labeled frames (page 1...page12). On frames 1 to 10, I have 3 objects that users can drag and drop onto matching places. There is a timer (60 seconds) and a counter. Users should match 15 objects correctly. If so, they go to frame 12 (congratulations!). If not, they go to frame 11 (Sorry, try again), which returns them to frame 1 (page 1).
ISSUE When users drag an object (mouseDown) and don't release it when time is over, the dragged object remains on the screen. When users go to frame 11 and game starts over, the object remains throughout the entire game.
How can I get rid of the dragged object that isn't dropped when the time is over?
ActionScript Code:
//
// TIMER
var time1:int=60;
var myTimer1:Timer = new Timer(1000, time1);
[code]....
The code below is used to create one rectangle at a time when a button pressed. But they are randomly placed on the screen. I was trying to drag each and place each rectangle in a desired location on screen. But when I drag a rectangle (startDrag) with MouseDown ONLY THE FIRST CREATED RECTANGLE IS MOVED AND NOT OTHER RECTANGLES.
var i = 0
function newRectangle(x1,y1){
var r:MovieClip = this.createEmptyMovieClip("rectangles"+i, (i+2));
[Code].....
I have a time line of 1441 frames my frameRate is 24 fps so it takes 1 minute exactly to complete the timeline animation I want to Display the Remaining time as file starts I need formula to place in ENTER_FRAME event which displays the time left
View 2 RepliesI have a time line of 1441 framesmy frameRate is 24 fpsso it takes 1 minute exactly to complete the timeline animationI want to Display the Remaining time as file startsI need formula to place in ENTER_FRAME event which displays the time left
View 1 Repliesi want to duplicate a line 4 times, and move each line on Yaxis, with a delay of 1sec each time. I know i must use setinterval+duplicateMovieClip, but i've got pbs :-( actually, i've got my AS code on my line :
[Code]...
I'm trying to code the snap to grid functionality. The dragged object should snap to the grid if the distance between the object bounds and a grid line is less than 5px. I found a way to do it if the object's rotation is 0 but it doesn't work if I rotate the object. I need a different approach. Can you point me into the right direction with the algorythm or any source code?
View 3 RepliesAS2 on a button symbol:
on (release) {
_root.randomVar = pie
trace (_root.randomVar)[code]..........
If I put Var = X in the time line it comes out undefined, no variables seem to be working, tried it in 2x flash projects
I want to run a sound once in a timeline but want the sound to stop at the end of the first run on the timeline but want the timeline to continue to repeat without the sound running again.
View 3 RepliesWhat 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.
View 0 RepliesI am wanting to control the timeline of a MC using AS. What I mean is when I click on a movie click and drag right it controls the reverses the MC and when I go left it plays it (but i only want this to happen when I click and drag).
View 7 Replieshow to return to the main time line from within my movie clip. I thought it was something like _root.gotoAndPlay(4); but all I'm getting is errors.
View 1 RepliesI have one mp3 file in the time line. How to controle set volume
View 1 RepliesI have learned from a video tutorial (Flash CS5 in the Family 23: Banner Ad Part 1)to use the F5 key to set the length of a time line of a particular image.When using the F5 key on the MAC keyboard, it will only allow for the audio to be worked with.I've tried Apple+F5, Option+F5, Ctrl+F5 etc.What am I missing?
View 1 RepliesI'm using this action for specific keys to simply advance the time line -
on(keyPress "<Space>"){
play();
}
what if I want to use all the keys of the keyboard to control this action ? Is the group selector to use ? Like "all keyboard" "all keys"?
I have got AS3 code to do it -
stage.addEventListener(KeyboardEvent.KEY_DOWN, fl_KeyboardDownHandler);
function fl_KeyboardDownHandler(event:KeyboardEvent):void {
gotoAndPlay(currentFrame+1);
}
But wanted it for AS2 ?
I am trying to link a button via AS but I need to use a function that is on a different time line for it to work. I have no idea how I am going to do.
[Code]...
I am trying to use the "var flvControl" but that function is located on a different timeline.
I am building a Flash continuous play application for a company to use in a booth presentation at a sales show. In effect, it will be a more engaging Powerpoint presentation. Each slide will be a be a frame that will call an external swf into movie clip with the animation of text or fade in images in the external swf. Each external swf will stay on for about 10 seconds. I am looking for an action script that will first stop the advancement at each frame for 10 seconds (ability to edit seconds needed) and then move to the next frame and stop for 10 seconds then the next and so on and so on and at the end, start back at frame 1.
View 1 RepliesI am making a small project and i want to know how to get flash to change from one time line to the next , i am thinking of using an if statement to check if an object had passed the top of the stage and if that condition is true then i want it to go to the next layer on a different frame to play another animation?
View 4 RepliesI want to write a function on timeline whose arguments I want code to read from a xml file.
View 2 Repliesi am trying to play the timeline backwards once it reaches the end, but i cannot fine anything out on the net to explain how to do this without a button click.
View 1 Repliesi read this tutorial, it is about how to control the time line of the loaded swf
[URL]
but i get this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at main_fla::MainTimeline/frame1()
[Code]....
How do i refer back to a dynamic text box on the main stage?
View 1 RepliesI have a line which is stage.stageWidth long.Now i need in enter frame to shorten this line (like an reverse preloader, but its not a preloader) so that in given time value its length becomes 0.so from stage.stageWidth to 0 in given time.
View 8 RepliesI was wondering how I might pause my main time line with AS3, currently I'm using the following code for AS2 and it does exactly what I need it to do.[code]
View 3 RepliesWhen a button is presed on a child time line I would like to check the play head position on the root time line before it executes the action attached to the button. I think that maybe this is done with a function, but I am not sure.
View 5 Repliesso here's the function on main stage:
function slideImage(btnNum:Number)
{
trace("scrolling image");
trace(btnNum);
[Code].....
How can i acess slideImage function on the main stage. in AS2 _root.slideImage(btnNumber); would work. How Would I do this in AS3?
I have three FLV videos playing on my main time line.they are each set to auto play and the are each on individual frames.lets say frame 30-31 and 32.how do I have the video stop playing once it detects that the user clicked out of that frame?my problem is the video or I guess it's just the audio keep on playing even though I am already viewing some other page.
View 2 Repliesis there a way to reach the stage (the main time line) from ANYWHERE.In AS2 it was _root...The aim is : I want to add on stage an MC from within a class. As expected, addChild(mc) doesn't work, it adds the child to my class, not to the stage. So : is there any stage.addChild(mc) or MainTimeLine.addChild(mc) or anything like this ?The other way is to add the class on stage addChild(MyClassName).
View 12 Replies