DupClip And On (release) {
Hi all, I have MC with action duplicateMovieClip. There is a button belonging to MC with links to http://www.... Everything works thanks to xml document. My problem is, that I don't need a link for website, but for common action in flash, for example gotoAndPlay(); etc. It doesn't have to be with xml document. MC is duplicated 80x and every button has to have different links. There is a script that I am using. Can someone help me please? Thanks
on (rollOver) { drag.gotoAndPlay(2); gotoAndStop(28); play(); } on (rollOut) { drag.gotoAndStop(1); gotoAndStop(21); play(); } on (press) { checkm = this._x;
} on (release) { if (checkm == this._x) { if (_name == "dragf0") { getURL(_parent._parent.XMLdata.firstChild.firstChi ld.attributes.dest, "_self"); } else { if (eval((("_parent.x_" add _name) add ".attributes.dest")) != null) { getURL(eval((("_parent.x_" add _name) add ".attributes.dest")), "_blank"); } if (eval((("_parent.x_" add _name) add ".attributes.dest2")) != null) { getURL(eval((("_parent.x_" add _name) add ".attributes.dest2")), "_self"); } } }
FlashKit > Flash Help > Flash ActionScript
Posted on: 06-08-2004, 02:08 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
On Release Stop On Release Play. How?
Its like a stop and play button. Like, lets say a button or much more likely, a movieclip, in the shape of a pause button, is clicked, it stops on the frame. Once it is clicked, it looks like a play button, and when it is clicked again, it plays from that same frame, And it then looks like a pause buttons again. How?
On Release
may sound a little stupid but, can't get the onrelease command to be available to me on flash 5. it keeps saying:
"Clipboard Actions: Line 1: Mouse events are permitted only for button instances
on (release) {"
HELPPP!!!
On Release (if .. Else )
I'm trying to on release of a button check the _y position of a MC on the stage. I wish to reposition it from position 1 to 2 if it's at 1 else I wish to reposition it to position 1 if it's at position 2.
Hope that made some sense, I'm not sure if I have to put this into a function then called it on the button release? If so where do I put the function?
This is the code so far :
on (release)
{if (move == 300) ){
setProperty ("move", _y, "300");
}else {
setProperty ("move", _y, "100");
}
Key Release
Hi!
Does anybody know if the Flash4 can understand a "Key Release" situation... If really exist this command or we have to simulate it.
Im making a 'Racing Game' and I need to know when the player isn't accelerating.
Ex: <Up> Key pressed = Car Accelerate
<Up> Key released or
< > No Key Pressed = Car Slow down.
Thanks a lot!
=Carlos Moffatt=
http://www.vocevai.com.br
On The Release Of A Key......
i'm trying to make a game where a guy guys runs across the screen, but i have a problem. I can make the guy run, but i want him to be able to stop when you release the key. How can i use an effective way of making him stop when you let go of the key.
thanks......
On(release){........
on(release){
DoSomething(_parent);
}
Please any one tell me what does this script do,
As I have a menu made of duplicated button with the script new array=....,
but I couldn't make the buttons to go to different urls
I think this script which is found in the script of the button is responsible for making links to all the duplicated
buttons
Please help me ...
I need this Urgent
Where To Put On(release)?
Hello!
I have a movie, which contains and moves a button, both in the library (because I use ActionScript to put several instances of it on the stage).
Now I simply want to the button to go to an URL when the user presses it:
On(release)
{ getURL("/mypage.htm")
}
But where to put my On(release)? This works fine, when I put the button directly on the stage (and then selecting Right Mouse->Actions). But in the button itself it seems not to work, and it also seems not to work in the movie.
Any ideas?
Martin
On (release)
I have a flash movie that I have published as a .exe. I have a button and the action is on release geturl I want to add a gotoandplay with this also. Is this possible?
For example
on (release) {
getURL("www.url.com");
gotoandplay(2);
}
What am I missing?
Thanks in advance
No 'on Release'?
hey
im pretty new to MX (well flash in general) but MX is what ive got...got a button problem linking scenes, ive read other queries and tried them out on my machine, still no luck..
ive no 'on release' on mine, i have 'on release(button)' also i
dont have this '_root' people go on about' also ive tried putting frame labels at the start of each frame in the scenes, still no luck.. what's going on?
mx users in the house?
Release On
I'm obviously a beginner, will someone please tell me where to find the "on release" action script and the "mail to" script. Thanks!
On(release) A Better Way?
Had set up my AS for buttons (code below) so a default mc would playin main stage when mvie loads and when user has rolled out of buttons. However, I need it so user can click on button to view scrollable text or interact with another mc.
As you can see below, the script has it so when user rolls out of button (wheter they clicked or not) default movie plays.
What's a better way so mc's stop until user wants to go back?
------------------
on (rollOver) {
gotoAndPlay("1open");
_root.mainStage.gotoAndPlay("stop");
_root.SuperPlay.gotoAndPlay("SuperGo");
}
on (rollOut) {
gotoAndPlay("1close");
_root.mainStage.gotoAndPlay("begin");
_root.SuperPlay.gotoAndPlay("SuperStop");
}
on (release) {
_root.mainStage.gotoAndPlay("stop");
_root.SuperPlay.gotoAndPlay("SuperStop");
_root.SuperText.gotoAndPlay("SuperText");
}
------------------
Thanks
On (release)....
on (release) {
function....;}
handles a single mouse click. is there a similar process for a double mouse click?
i would think flash would implement easier actionscript for such a popular option rather then checking time (milliseconds) between clicks.
Key Release
Is there a simple way to detect when a key is release (and not using an on() event handler) ? I found a tutorial on how to do it in flash 5, but that's know good and also the example took like 3 seconds to detect the release! And also I searched on google, but the dang engine omits the word 'on'!! Argh!
Key Release?
Is there any form of keyrelease? Im trying to script a movie clip so when you press a key, it goes to one frame, but when you release the key, it goes to another frame. If there is no keyrelease, is there any other way to script this?
After On(release) {
alright I have some buttons and this rugged dotted line to the right of em, and when you roll over the buttons, the text gleams a bit and the area near that button is lit up a bit, and after you click the button, I want the text to change colors and the lil dots next to it to change colors until a different button is pressed, how do u do that?
On(release)
ive used a movie from flashkit as part of my navigation.
when i direct one of or any of the buttons to a url in this case a stream it works no problem.
when i direct the button to another scene it doesnt work.
what am i doing wrong
please and thankyou.
On (release) {
im trying out a password application done in flash. it has an external AS file and External text files.
if i place the text and AS files on my server and place the password application within a projector file which the client woudl have what method would i use to link from the projector to the text/AS files
this is the script attached to the enter button after you enter your details.
on (release) {
hitRoutine();
}
this script is in the main time line running from frame 1. this reads from the txt file so maybe adding a geturl or something to this would make the movie look to the server for the AS file
#include "script.as"
any help appreciated
Tap Go Release Go Somewhere Else
Since I ahven't found a way double tap. How do you make a movie clip end and got to another movie clip when you release a key. I'm pretty sure this has been answered many times. But I didn't understand the other ones.
On (release)?
I have my button to
Code:
on (click) {
// Trigger Data Source Behavior
// Macromedia 2003
this._parent.wsc.trigger();
}
So when i click it, it send me an email. But how do i add this code onto it without messing ither one up.
Code:
on (release) {
gotoAndPlay(frame10);
}
On (release) End MC
hi!
Another stupid question by me!
Is that possible to do:
on (release) play-to-end MC but skip (88) frame (example)
please help!
On Release
What is the code for when you release a button it goes to another website?
On Release Get URL
Hi,
Here is my script,
on (release) {
get URL ("home.html");
}
Here is my error,
**Error** Scene=Scene 1, layer=Buttons, frame=232:Line 1: Statement must appear within on handler
getURL("home.html");
please advise
dmd
On Release
I would like to upload a swf file to a flash movie using buttons to do so.
I know that I have to create an empty movie.
Can anyone tell me the script needed for the button to upload the file?
On Release
Hi,
When my page loads, an outline fades in.
When I click on button 2, I want the outline to resize smaller.
When I click back on button 1, I want the outline to resize back to the original size.
I want to tell the button that if the outline is on the "released" state already, don't go to the frame label "released", but if it's on the "out" state, THEN go to the "release" state.
Here is my code:
menu_one_mc.onRelease = function() {
stick("menu_one_mc");
myPicLoader.contentPath = "clients.swf"
outline_mc.gotoAndPlay("released");
};
menu_two_mc.onRelease = function() {
stick("menu_two_mc");
myPicLoader.contentPath = "contact.swf"
outline_mc.gotoAndPlay("out");
};
menu_three_mc.onRelease = function() {
stick("menu_three_mc");
myPicLoader.contentPath = "promos.swf"
outline_mc.gotoAndPlay("released");
};
[F8] Key Release
Is there such a similar stament to get something like this (not correct)
if(Key.isReleased(Key.RIGHT)){
.....
On Release Get URL
Hi all,
1.) I have the following exact code for a button in a keyframe on the timeline (not in the button itself and of course excluding the quotes)
"
on (release) {
getURL ("www.yoursite.com", "_blank");
}
"
and I get the following error when I try and preview in Flash CS3
1087: Syntax error: extra characters found after end of program.
2.) Also, I have another layer with a "stop" action taking place at the same time that this button occurrs, however, once I have the script in the keyframe for the button, it seems to override the stop action. So, basicly, IM looking to stop the movie and get this button to, once clicked, open a web address.
Thanks all!
On Key Release?
i have some code for making a man move, and when he crouches, he wont go back up when its released
PHP Code:
if (Key.isDown(Key.DOWN)) {
this.gotoAndStop("crouch");
crouching = true;
}
i cant use else, because that would nullify all the other if Key.isDown statements. does anyone know some code for making an if statement based on when the Down key is released?
Get URL And On Release Help
Okay tell me whats wrongwith this code:
brochurerightunder.onRelease() {
getURL("http://www.google.com, _self");
}
I have this on its own actions layer, but it gives me an error...whats the matter?
On Release -won't Release
On(release) won’t release
I’m new’ish to ActionScript, so there must be something basic I’m doing wrong. I’m working in Flash 8. I’m trying to create a dragable object. I put the image I want to drag in a button. Then I placed the button in a MovieClip. Then I place the move clip at the root level of the main stage. It worked fine for one object. Then I created 3 more objects following the same steps and copying the code. I can drag the additional MovieClips, but they won’t stay in place when I release the mouse. If I can manage to click something else, they will stay in place. (The original MovieClip I created still works fine.) I put a trace on the “on release” command. It reportsfine on the movie clip that works, but does not report at all on the other MovieClips.
Here is the script attached to every button in each MovieClip.
// ==========Begin button script =========
on (press) {
startDrag(this, true, 314.8, 343.5, 700, 343.5);
}
on (release) {
stopDrag();
}
// ===== END SCRIPT ======
// ======================
I’ve also tried…
// ==========Begin button script =========
on (press) {
startDrag(this, true, 314.8, 343.5, 700, 343.5);
}
on (release) {
this.stopDrag();
}
// ===== END SCRIPT ======
FYI the swf can be seen at
http://www.mrwaynesclass.com/test.swf
The .FLA files can be found at
http://www.mrwaynesclass.com/testfla.zip
Thanks in advance for any help
On(release)
At my job I make banners all day long.
My question is, what the heck is THIS used for...
they tell me to place this code on the button over the banner.
Code:
on(release)
{
getURL(/:clickTAG, "_blank");
}
and other times they tell me to use...
Code:
on(release)
{
getURL(clickTAG, "_blank");
}
what the HECK is that "/:" thing, and what is it used for? If it's published under AS 2.0 its an error, but if its under AS 1, how I requested to publish it, then it works.
I almost think that its just an error this company has been making a long time, and for whatever reason it has been working anyway....
i know quite a bit about actionscript, but this thing, i just do not understand... please help!
On Release
Hi. I am a student and also trying to get to grips with ActionScript but I've become stuck!
Ok the situation: the document I am making is like a portfolio or DVD menu.
I have 4 rollover buttons. I also have a movie clip which is not in the workspace but is in the library.
What I want to achieve is that when one of the buttons is clicked the movie will be called to the canvas and played. This is going to be my way of transferring from one page to another within the portfolio.
The code I have for the button is:
on (rollOver) {
_root.mouse_over_button2 = true;
}
on (rollOut) {
_root.mouse_over_button2 = fstartlse;
}
on (release){
}
I'm pretty sure the code I need goes in the on (release) brackets but I have tried numerous bits of code none of which seem to work.
Any help would be brilliant.
Thanks
Key Release Help
Hi everyone, this is my first post in the forum, and I'm hoping you guys will be friendly and helpful.
First warning, I'm fairly new to actionscript.
I'm working on an art installation project for school, and I have wired a USB keyboard to react with sensors in a circuit. It is a reasonably simple tracking system.
This is the program I've made:
http://imagearts.ryerson.ca/jcerilli...lightgraph.htm
The problem I'm having is that I only want the bar/numbers to increase by one each time a key is pressed, not to continually increase. Ideally, I'd like it to only react when the key is released, but I'm having troubles figuring out how to do that.
Right now I'm using this as my code (and something similar on the Dynamic Text):
if(Key.isDown(74)){
bar2.nextFrame();
light2.gotoAndPlay(2);
}
Any help would be greatly appreciated!
Key Release?
ok my question is i want to have this buttons so that once say i release the "A" key it will stop my movieclip but how do i do that?
i know there are a few ways of saying if key is down and on that note how do i say if a key has been pressed because the getCode function doesn't work for me as i have to press a different key before i can press that one again and the key.isDown will say if it's been pressed but then it will constantly do action as the key is still being pressed.
On (release)
Hello there,
I have a strange problem with a button that has the "on (release)" action telling 5 different movie clips to gotoAndStop at labeled frames within their own timeline. Only two clips react but the others don't...so is there a limit to how many clips an on (release) action can talk to?
Would really appreciate it if anyone could help..
Cheers
On Release Under FOR
I have a FOR {
var temp:MovieClip = eval("but"+Number(i+1)); // this seems to be OK
temp.onRelease = function() { tx.text += i; }; ////// and, I just get i+1, at every button release
}
suggestions?
On Release 2.0
hi - i can't find this command in behaviors. i have a button that on release i need to send the movie to go to and play scene 1. can someone tell me what the 2.0 AS script is for this command?
thanks.
About To Buy FMS Soon - When Is Release Of FMS 3?
I'm about to buy FMS probably within a week or so.
So, when is official release date of FMS 3?
Should I wait for it, or just proceed with FMS 2?
I
'd hate to do what I did last time when I bought over $4,000.00 worth of CS2 software just to have CS3 released two weeks later! DOHH!!!.
So, since I know FMS 3 is lurking out there in Alpha (or possibly even Beta) I'd like to not get burned again like I did last time.
Any info would be GREATLY appreciated.
On (release) Run .swf?
Hi,
I am developing a simple flash website see here -->
http://dialspace.dial.pipex.com/town...son%20Godfrey/
This loads a new .swf file (on release - open URL) when the user selects one of the option buttons i.e. home, about RG, etc.
However, this is causing IE to freeze, it works fine if I open an html file which contains the .swf file?? but not if I reference the .swf file direct.
Should I have a different html page for each swf file?
what am I doing wrong?
I saw this code on one of the examples:
on (release) {
_root.contents.loadMovie("locations.swf");
}
but I'm not sure how to apply this to my site to try it?? what does the _root.contents. refer to??
Thanks in advance.
On Release
Sorry , I 've asked this question already on AS forum, but I didn't really get the answer I was looking for. I need an If-statement, that runs if your key.LEFT is being RELEASED. I know the normal code ( if.Key.isDown.......) but that runs the script if the key is pressed. It has to run when it's released.
Anyone?
Any help would be greatly appreciated.
Luster
On Release
Ok i am making a stop sounds and play sounds button
I know stop is stopAllSounds() something like that
What is play sounds if it is in my library
on (release) {
something else i dunno
thanks for any help in advance
On(release) Help
okay, so far I have
on(release){
play();
}
i'm assuming between the () is where I put the name of the animation. Is the name the name i give it when i convert it into a movie? And where do I put this animation that I want played? I'm sorry this is probably a dumb question but I'm still new to flash. Thanks
On Second Release
Hi
I'm experimenting with drop down menus. I have a simple movie clip, that on frame 2, drop down keeping 2 more buttons. I found out, that it wont work with, onrollOver, so i use onrelease instead. This works quite well, but i need the movie to go to frame 1 again. Then i use a onrollOut command, but this gives some really weird results. Release outside, doesnt work the way i wont it to do, and i cant figure out more. Then, is there a way for flash, to register a second onRelease? So when they click forst time, it will go to frame 2, and when they click second time, it will go back to frame1?
Thanks
On (release) Run .swf?
Hi,
I am developing a simple flash website see here -->
http://dialspace.dial.pipex.com/town...son%20Godfrey/
This loads a new .swf file (on release - open URL) when the user selects one of the option buttons i.e. home, about RG, etc.
However, this is causing IE to freeze, it works fine if I open an html file which contains the .swf file?? but not if I reference the .swf file direct.
Should I have a different html page for each swf file?
what am I doing wrong?
I saw this code on one of the examples:
on (release) {
_root.contents.loadMovie("locations.swf");
}
but I'm not sure how to apply this to my site to try it?? what does the _root.contents. refer to??
Thanks in advance.
On Release
Sorry , I 've asked this question already on AS forum, but I didn't really get the answer I was looking for. I need an If-statement, that runs if your key.LEFT is being RELEASED. I know the normal code ( if.Key.isDown.......) but that runs the script if the key is pressed. It has to run when it's released.
Anyone?
Any help would be greatly appreciated.
Luster
On Release
Ok i am making a stop sounds and play sounds button
I know stop is stopAllSounds() something like that
What is play sounds if it is in my library
on (release) {
something else i dunno
thanks for any help in advance
Key Release
hi,
Code:
onClipEvent (load) {
upcnt = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.UP)) {
upcnt = 1;
}
}
consider the above code.
is there any command, when a Up arrow key is released the variable upcnt becomes zero.
On Release
hi guys
I am trying to create a frame with 3 questions on it. The user answers either yes or no to all the questions. They are free to answer the questions in any order and are given feedback for each answer they select.
I have created a box on the same frame that i want the feedback to appear in. I have used a separate movie clip for each bit of feedback (6 x MC)
The problem is, that the overlap.
I am using the movieclipname.play () method. I also have the feedback on the second frame of each MC, with nothing but a stop () on the first frame so they can sit and be invisable.
I tried to get round this by calling all 6 MC's on each button, but setting five to movieclipname.play () and the one i want to work to movieclipname.play (2). But this doesn't help
any ideas ?
suppose i could play with the visability ???
|