|
-
hullo --i have f5
can anyone please help me with my movie ??
i have looked everywhere trying to find the answer but to no avail
what i am trying to do is to reset it to go back to the beginning after i have clicked all the buttons
layer one has the mc which is a rotation
layer two has the buttons listed below on it
x
xscale
y
yscale
vis false
vis true
alpha
reset
these buttons all work -but not the reset button --is there a code or function that will reset the the mc so that i can repeat the functions buttons as often as i may like to ,
thankyou for any help Terry
-
Post Mo' Bills
hey terrance80, have you tried labelling your frames?
eg - frame 1=reset frame x=end
have your button scripted so it goes back to "reset"
on (release) {
gotoAndPlay ("reset");
}
try that
-
if you don´t want your movie to go back to start place a function in first frame of _root
Code:
function reset(){
ball._x=0;
ball._y=0;//or whatever you want to reset
}
when you want to reset you can call it using _root.reset();
k.
-
how can i reset the movie
thankyou Chook and Kay Siegert for your help ---i still have a problem --i am very new to actionscript and am having difficulty
1. i dont understand how to label a frame and make the actionscript respond to that--here is what i have at the moment on the reset button
on (release) {
setProperty (_root.spike, _x, "350");
setProperty (_root.spike, _y, "350");
setProperty ("_root.spike", _xscale, "100");
setProperty ("_root.spike", _yscale, "35");
setProperty ("_root.spike", _alpha, "100");
setProperty ("_root.spike", _visible, "1");
tellTarget (_root.spike. _y) {
gotoAndStop ("reset");
}
tellTarget (_root.spike._x ) {
gotoAndStop ("reset");
}
}
response from generator when i press the reset button
Target not found: Target="350" Base="_level0"
Target not found: Target="350" Base="_level0"
i dont no what to do from here --lost --Terry
-
Post Mo' Bills
Target not found: Target="350" Base="_level0"
looks like you haven't named your instances, flash is looking for the mc named '350'.
When you drag that mc to the stage, in the instances pallettte, you'll see a field that says 'name', give that mc a name that corresponds to script, in your case - 350.
To label your frames, open your frame pallette, at the top of it there is field there that says 'label'.
Good practice is to keep your labels on a separate layer.
-
Re: how can i reset the movie
that´s your code:
on (release) {
setProperty (_root.spike, _x, "350");
setProperty (_root.spike, _y, "350");
setProperty ("_root.spike", _xscale, "100"); // don´t use quotation marks with numbers
setProperty ("_root.spike", _yscale, "35");
setProperty ("_root.spike", _alpha, "100");
setProperty ("_root.spike", _visible, "1");
tellTarget (_root.spike. _y) { // remove the "._y" - you can´t tell something to a coordinate 
gotoAndStop ("reset");
}
tellTarget (_root.spike._x ) { // pp.
gotoAndStop ("reset");
}
}
try to use f5 syntax:
on (release){
_root.spike._x = 350;
_root.spike._y = 350;
_root.spike._xscale = 100;
// ... and so on
_root.spike.gotoAndPlay("reset");
}
you have 2 tellTarget´s. what are you trying to do?
k.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|