Controls
hi i've been trying to look for simple control functions for play pause rewind stop and forward.i put the play and stop ones...(btw i'm still new to actionscript)Stopon (press) {gotoAndStop(1);}Playon (press) {gotoAndPlay("movie");}like i know its really crappy but i need simple ones like this, coz the other ones that i found on this forum or everywhere else were all, the ones like:Playing=falsestopped=falsepaused=trueThese ones never work!... my buttons arn't working.I'm just making a 30 second movie, as an assessment, and need to have these controls on there. please help. Thank you.Paul
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 06-09-2007, 06:19 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
2 Player Game. Moving Cars Controls Help With Controls
hi i have the controls for car number 1 that would be the arrow keys if
(Key.isDown(Key.RIGHT)) {
this._rotation += manuverSpeed;
} else if (Key.isDown(Key.LEFT)) {
this._rotation -= manuverSpeed;
}
if (Key.isDown(Key.UP)) {
if (speed<speedMax) {
speed += accel;
}
} else if (Key.isDown(Key.DOWN)) {
if (speed>-speedMax) {
speed -= accel;
but how can i make controls for car 2 ... i wann use wasd but i cant figure out how the key.a doesnt work.
Drag Controls Override All Other Controls On Movie?
I have a movie that loads into the main timeline and can be dragged around using:
on (press) {
startDrag("");
}
on (release) {
stopDrag();
}
That works great except that to close that movie again I've added a little button to say on press, unload movie.
Problem is none of the buttons or links on that page will work while it is being dragged around. How can I make the links and buttons work but still make the movie draggable?
Player Controls For Swf Similar To The Flv Player Controls Component?
Is there a component that is similar to the flv component that will control playback of a swf? or can this component also be used for a swf? I tried to create a player that uses loadmovie to load a swf, which works, but when i tried to create play, pause, forward (next scene), rewind (previous scene) etc it doesnt work and the audio and playback of the animation doesnt follow the controls when i click on the buttons. t hanks
Key Controls
i want to control a movie clip on the stage by keys on the keyboard...
arrow up = forward
arrow down = back
arrow left = spins left (anti clockwise)
arrow right = spins right (clockwise)
also if the object is facing in a diagnal direction then when pressing arrow up, it should head in that diagonal direction..
please help
basically my flash movie looks like a birds eye view of a character running about the stage but has objects in his way.
i also want to know how to make objects that the character cant get passed and that the character cant runn of the stage.
Key Controls
i want to control a movie clip on the stage by keys on the keyboard...
arrow up = forward
arrow down = back
arrow left = spins left (anti clockwise)
arrow right = spins right (clockwise)
also if the object is facing in a diagnal direction then when pressing arrow up, it should head in that diagonal direction..
heres and example of what i want :
http://www.flamjam.com/lab/ice_skater_popup.htm
please help
i also want to know how to make objects that the character cant get passed and also that the character cant run off the stage.
.exe Controls
does anyone know how to disable the Play, Rewind, Step Forward, and Step Back controls on an .exe file. Or even to disable the keyboard shortcuts for these controls?
thanks
Mov Controls?
Hello everybody.
I'm trying to find out how to put the control bar at the bottom of an MOV file in Flash MX. I work on Windows XP.
I've placed the MOV in it's own FLA file, and published it as an SWF.
A click of the button calls the SWF and it plays perfectly...but it has no controller (play, rewind, stop) at the bottom.
How can I make this appear so the user has control?
(I tried to do a search so I didnt have to bother anyone, but I couldn't find what I was looking for)
Thank you for your time.
pug
MC Controls MC - How
Hi All,
I have a question to which I am hopin g someone out there will be able to answer for me.
Here it is, I have a movie that contains two frames (first one being the preloader). On the second I have two movie clips - one called "playbox" and the other called "control".
Within the movie clip "control" timeline first frame I want to put another movie clip named "trigger" (like the horse!). What I want to happen is when the movie clip hits the first frame, it tells the movie clip "playbox" to go to and stop on a certain frame for example 6.
Is this possible and if so how can I do it?
It won't be controlled by a button just when that specific frame is entered.
Hope someone can help me out here.
D
How Do I Add The Controls
How do I add the controls such as play, pause,...? I would guess it's done in HTML, therefore I have added my coding below.
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflas
h.cab#version=7,0,0,0" width="208" height="190" id="fcd"
align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="fcd.swf" />
<param name="loop" value="false" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="fcd.swf" loop="false"
quality="high" bgcolor="#ffffff" width="208" height="190"
name="Untitled-1" align="middle" allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
Swf Controls
Sorry in advance if this is very obvious.
Is it possible to add basic controls (play/stop/vol) to a .swf file similar to the skins that are used for flv? Or do you have to build them from scratch?
Cheers
Noel
Mc Controls
is there a way you can tell a mc to play once you enter certain 'frame name' ?
FLV Controls
PPl,
I've imported a .flv into my movie and masked the file which look and work really well. Now my client has asked about creating a sound on/off btn for the movies. Thing is when I use the StopAllSounds action, it freezes the movie at the sametime. I then thought about setting the root volume to 0 but this seem to do nothing. Is there an easy way to achieve this?
It seems that actionscript can talk to the .flv so I would have thought this would be possible!
Thanks in aticipation
Map Controls
Hello, I've been working on some map controls, zoom and pan, and I'm having trouble getting the map to stop on the edge when the user has zoomed in. If they never zoom then it's fine but it's almost like when they zoom it stretches the pixels of the movieclip and what was once 1 pixel now becomes a 20x20 pixel block, is this making sense?
I'm going to attach the file here so take a look and let me know what you all think. You'll notice that when you pan left it stops fine on the left edge but if you zoom in and then pan left, it jumps at the left edge. Thanks and please help!
Flv Controls
Well here is what i came up with but ... when u click to fast it goes pass the Cue point ... If anyone knows how to reword this .... I would be grateful....
Code:
var cArray:Array = ["one","2","3","4","5","6","7","8","9","10","11","12","13","two","15","16","17","18","19","20","21","22","23","24","25","26","three","28","29","30","31","32","33","34","35","36","37","38","39","four","41","42","43","44","45","46","47","48","49","50","51","52","53","five","55","56","57","58"];
var cIndex:int = 0;
forward_mc.dir = 1;
backward_mc.dir = -1;
function chapterMove (e:MouseEvent):void {
cIndex += e.currentTarget.dir
chSeek(cArray[cIndex]);
}
function chSeek(id:String):void{
var pt:Object = vid.findCuePoint(id, CuePointType.ACTIONSCRIPT);;
vid.seek(pt.time);
vid.stop();
images_mc.gotoAndStop(pt.name);
}
Map Controls...
Hi all! I'm new here at Actionscript.org and I have a problem that has been giving me fits for a few days. I've searched the archives and I didn't find anything specific to my question.
Situation:
I am creating an interactive CD ROM which has a world map in it. This map needs to have the following, clickable zoom in and out buttons, clickable directional buttons and the ability to drag. I currently have all of the above requirements coded and working but I'm running into a few issues.
Here is a screenshot of the map page:
http://www.malocs.com/forums/map.gif
1. The onClipEvent code that is placed on the movieclip is capturing random mouseDown and mouseUp events and triggering the dragging function. This results in the map following the mouse when the user did not intend to click and drag the map. This happens on RANDOM mouse clicks and it is not easily recreated. It could happen after the user clicks the zoom out button ten times or it could happen when the user clicks the left directional button only once.
Here is the code that is placed on the movieclip:
ActionScript Code:
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.stopDrag();
}
}
2. I'm having problems with the movieclip RANDOMLY inverting when the user clicks the zoom out and zoom in buttons.
Here is the code for the zoom out button:
ActionScript Code:
on (press) {
mapSlide._xscale -= 35;
mapSlide._yscale -= 35;
}
Here is the code for the zoom in button:
ActionScript Code:
on (press) {
mapSlide._xscale += 35;
mapSlide._yscale += 35;
}
Here is the code for the left direction button:
ActionScript Code:
on (press) {
mapSlide._x += 75;
}
Here is the code for the right direction button:
ActionScript Code:
on (press) {
mapSlide._x -= 75;
}
Here is the code for the up direction button:
ActionScript Code:
on (press) {
mapSlide._y += 75;
}
Here is the code for the down direction button:
ActionScript Code:
on (press) {
mapSlide._y -= 75;
}
Here is the code for the recenter button:
ActionScript Code:
on (press) {
mapSlide._x = -97;
mapSlide._y = 5;
mapSlide._xscale = 75;
mapSlide._yscale = 75;
}
Please help as I am totally dumfounded as to why the onClipEvent function randomly executes when the user clicks on the map navigation buttons. I'm also dumfounded as to why the map will randomly invert and scale when the user clicks any of the zoom or nav buttons.
Like I stated earlier these problems are random which leads me to believe that I have a problem with my logic. Please advise.
Controls SWF HELP HELP HELP
hI
I want load many swf & control thise away from buttons.....
1- play swf
2- stop swf
3- pause
4- forward
5- rewind
6- load in specific space
7- next swf
8- previous swf
9- copy current swf & paste in specific place in PC
10- scroll bar control in swf.
HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP HELP
FLV Controls
After getting the buffertime right, another problem occured:
my .swf for the controls doesn't appear on the video on the site.
The .swf that loads the .flv and the .swf for the controls are in the same folder, local and on the server that hosts my site. When I check the movie local, the controls are in place. But when I upload it, the controls aren't loaded.
Anyone have a clue??
Thanks in advance :-)
Key Controls
Hey all,
Appreciate any help anyone can give me.
I am trying to add keyboard controls to my movie. I currently have a pause and play button, along with next, previous, etc. All works fine. The problem I am having is two fold.
I have added this code to my pause button.
on (keyPress "<Space>") {stop();
}
But for some reason it isn't working. I have seen that I should probably use Key Listeners... but I am not exactly sure what I need to do with those.
The second issue, can the space bar have dual functionality? Say on release stop, and on release play? so that the user only has to hit the space bar to start and stop the movie?
Thanks for any/all help.
Controls
is it possible that by using one button to control two flash?
X And Y Controls With XML
I am using XML to build a picture gallery with thumbnails, and I am trying to arrange them. and I understand how to control the X and Y positioning using the "declare instances" part of scripting.
Can anyone help?
FLV Controls
I have several FLV's loading into a blank movie clip on a timeline. each FLV in encoded to have controls for volume and scrubbing through the video. I have a '_visable' code at the end of each individual FLV to 'hide' it which works fine until the scrollbar is moved on the FLV then it throws it completely out and it hides all wrong and even doesnt come back when the button is pressed agin to launch it. any ideas how i can get around this issue? I dont want the movies to unload, just hide when they are finished or indeed another one is loaded prior to the previous one ending.
thanks for any advise.
SWF Controls Another SWF
I need one flash file to control the timeline of another flash file in the same html page. Is this possible? Of so how do I go about it?
Please help. Thnx
Anybody Know How To Use Volume Controls?
I wanted to know how to change the volume on my flash movie from within itself. It has the option but I can't figure out how to use it. It's under "Objects", then "Sound" then "SetVolume". Anybody know how to use this?
Disabling Controls ?
How can I disable the options such as zoom; play; forward, etc... when a user right clicks, for example, on a movie?
Ideally, I would like to disable all options except "about macromedia flash player x", as I've seen on some websites.
The flash menu on http://www.macromedia.com website would be an example.
Thanks for any help.
If this is a fully covered subject somewhere else, a link would be appreciated too.
Sound Controls
Im trying to make a good sound control and I have a a MC with different frames containing repeating sounds. TO change the tracks the user just presses a button that changes the frames which changes the sound. I've made a stop button but how do I make a play button that will play the track the user had selected?
2 Sound Controls?
I've linked 2 sounds to my movie and created a slider. Is it possible to create 2 sliders to control the volume of each sound seperately?
Everything I try drops the volume on both instead of just one.
Sound Controls
OK!
here is the thing,
I have animation with several sounds,.. when I start with one sound that comes latter I need to stop the one that started earlyer, but when I use
s = new Sound();
s.attachSound(_root.sound1);
s.stop()
it stops also the sound that it comes latter, (the sound that is playing, but it is not attached like one first).
also the same thing is, when I use the, setVolume, or setPan, the two of my sound are starting to behive the same,
(if i make the value of the setVolume lesser the two of my sounds will become quiet, also if I setVolume to louder the bouth will become loud, but attached only one..)
please I could realy use help on this one,
thanks!
Sound Controls
I want to know how can I create a sound control, just on/off will do,
This is a large project and I don't think I can use the setvolume() control because there is a number of sound files running throughout. I just want a simple swith the sound off and switch it back on again option...any ideas?
Still Goofy Controls
Unload helps some but actionscript MC on level1 ( called from a button within scene 2) sends the main movie to another (third) page even though nothing on the second page refers directly to that third page.
Once I go backand start all over from the main page and over to the second page, then the stop button works and actually stops and unloads the A.S. MC.
I am confused. Grrrrr.
I am probably doing this the "hard way".
Should I post the coding here ?
Please Help With Sound Controls
i followed the instructions that come with flash help to make sound controls (volume and balance) it works if i open it as a swf but as soon as i put it into html it does not the buttons jump to top right as you click on them
Gas Tube Controls......help Me Please
hi,
i want to do the following.
Interactive Flash animation of 4 gas flows passing through supply tubing and a flame ionization detector.Interactivity allows user to turn on/off any combination of the gas flows. Have cutaway pictures of the flow system and detector.how can i do that?
any helps will be appriciated.
thanking u.
sudheer.
Movie Controls
I1st question
need to know some action script code to put into my pause and play buttons that will pause the movie in the current frame, then resume when the play button is pressed. Can anybody help?
2nd question:
to make the situation more complex I need the buttons to control the movies that are a seperate instance! any idea of what variables I can set so I dont have to crate the buttons for all 21 movies??
Volume Controls
OK so Flash MX gives me a nice volume control but
I have read all the helps, manuals and tutorials but
cannot figure it out. All I want to do is have
a song playing and then be able to let the user control
the volume. Is that to much to ask.
If my song is named "song.mp3" then what do I do?
Window Controls: | _ | | X |
What is the code to make the window control buttons, like the ones at the top-right of the screen? (In Windows)
_ X
Volume Controls
I have a sound associatedd with my swf file, which works okay.
Using the "ActionScript Reference" under "Help" in Flash 5,
I found "creating volume controls" under "Sound".
I believe i followed the instructions but I get the
following warnings when I test the movie :
Symbol=volume, Layer=Layer 1, Frame=1: Line 1: Mouse events are permitted only for button instances
on (press) {
Symbol=volume, Layer=Layer 1, Frame=1: Line 5: Mouse events are permitted only for button instances
on (release, releaseOutside) {
The help file says to convert the button to a movie clip.
Have i mis-interpreted the instuctions`?
Id appreciate any help in pointing out where I have gone wrong
thanks,C
Mouse Controls
hello again. im trying to make my cursor control a movie clip so that when the mouse isnt over the movie clip then it will go back to frame one. i understand a little about this. if the mouse is over a certain x and y position, then keep movie clip on the screen. if you move the mouse out of those coordinates then go back to frame one of the movie clip. because i have a stop action in the first frame and nothing else, it seems to disappear. hope someone can help. thanks again. learning so much from you guys.
Sound Controls
Hi everybody, i've got a problem about controlling the sound in a movie.
I created a pan to regulate the volume of the music base in a swf, and two buttons to stop and play the same mb. it all works: fine! but.. the swf can load some external movies that have a talked audio.
they are loaded and they start, the controls I created to regulate the music, work on the external audios too (first of all the stop button stops the ext audio but not the video, and the play one doesn't works!): I wouldn't want it to happen... what can I do?
thanks a lot,
fabrizio
Playback Controls
i have a swf, which began as a quicktime file which was quite large. Then i have loaded that swf into another flash piece through loadMovie. The question i have is is possible to create playback controls for the loadMovie swf? and if so can anyone suggest a good tutorial where i can learn it from? I have only a tutorial for an embedded quicktime, but that is no use to me as my quicktime is too large and i don't want to publish my final flash piece as a quicktime.
please help!
thanks
george
Movement Controls
I Want To Make A Character Move Up, Down, Left & Right By Using The Arrow Keys. When Moving, I Want The Character Do A Animation (walking) When You Stop, It Stops Moving. Also I Want To Make When A The Character Touches A Wall It Stop And Doesn't Go Through... I Tried All This But It Didn't Work And Someone Help Me?!
Navigation Bar Controls
www.buckleyavenue.com
I have a web page for a customer i'm working on. The left side has a Flash navigation bar. When you click a button it loads a new page overall.
The only one that works now is 'Association Info > General Info'
Can I get the flash menu to stay on that particular button?
Any ideas will be greatly appreciated.
Mark
Music Controls
I am a newbie to Flash and I am trying to create a simple music player to use on a website. All I want to do is play one music file and have 3 basic buttons to control it. Stop, Play, and Pause.
I have imported a music file into an swf file and set it to stream with nothing more done to the swf file. I have then created a second swf file and set it up to play the first swf file in a layer by itself. I did this so the player controls are in a seperate swf file and in a seperate layer within the second swf file. In the second swf file that plays the first I setup 3 buttons to pause, play, and stop the playback of the first swf file. I added the standard "action" commands in Flash to these buttons to stop, and play the file. But they do not work. The only thing I can get to work is if I set the stop button to "stop all sound". But neither the pause or play buttons will function at all. In looking around I see that many people have created action scripts to acomplish effectivly the same thing but I am not that far into Flash yet. Does anyone know of a way to make these built in action commands work? Or is there a simple way of accomplishing this?
Attached is the player file that contains the buttons if this helps explain what I am trying to do.
Any responses would be appreciated.
Scottie63
Building .exe Without Controls
I've got a completed movie and I want to make it an executable.
when I publish it as a projector .exe, I want to tell it not to loop the movie, and also to hide the menus at the top of the window (file, etc).
How do I do this?
Movie Controls
I am very new to Flash, and want to run a movie file (avi) in flash. I have imported to Library added to timeline etc, but now would like to add some start and stop controls/buttons, but do not know where to start (if you excuse the pun!)
Sound Controls
I am making a sound control panel for a training cd. I have a volume control, play, pause and stop. I have it setup to run through the sound once since it is someone talking I don't want it to loop (0,1). Here is my problem...the buttons work great except for when the sound file runs all the way through. After it runs completely through, let's say that the end user wants to listen to it over again. Most people will simply click play. ON my panel in order to get it to play again, you have to click stop and then play. Any ideas on how to fix this? I am attaching the fla file for your perusal.
~Clay
Audio Controls
i want to make a simple radio for my site. i want havea prev_btn, next_btn, and volume control(a slider). i want the prev_btn and the next_btn to go through a list of tracks. could anyone send my an .fla so i know what to do or just tell me what to do??
and if you know how to make wave bars that would be cool too.
Cheers
Movie Controls
Hello everyone or anyone... I was wondering how I can make it so when a user right clicks on my movie they are not able to control anything (zoom, rewind, etc...) I just want them to see settings and about macromedia. Thanks in advance for any help.
Volume Controls
scrambledfigs wrote on 03-04-2004 10:37 PM:
Hello there. The volume control on my music player is giving me a bit of trouble. I'm using Flash MX 2004 Professional on OSX.
I'm using a button converted to a movie clip (like the action script guide says) that has "startdrag" action assigned to it. If I use the volume control code from the action script guide (modified for my purposes):
onClipEvent (load) {
top = _y+35;
bottom = _y-35;
left = _x;
right = _x;
_y -= 35;
}
onClipEvent (enterFrame) {
_root.soundmovie.sound1.setVolume(_y-top);
}
The volume slider travels too far from one side to the other, moving beyond the graphic. If I change the x coordinates to compensate, I can't turn the volume to 100 percent, only to whatever I changed the coordinates to.
Is there any to limit the distance the slider travels without affecting the max volume?
Thanks,
Scrambledfigs
One Movie Controls Another?
I have a main movie that loads another inside it. I want buttons in the main to control the loaded movie. I'm sure it's possible. Any ideas?
Thanks
Justin
|