This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Flash Site Design > May 2005 > simple goto and stop action
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
simple goto and stop action
|
|
| schebito 2005-05-11, 7:24 pm |
| **Error** Scene=Scene 1, layer=Boton Invisible, frame=1:Line 1: Statement must appear within on handler
gotoAndPlay("foto1");
| |
| Mudbubble *TMM* 2005-05-11, 7:24 pm |
| so...are you asking what tis means?
if so, it means you placed an action on a button that needs an on
handler - the eror is telling you what you need to do:
on (release) {
gotoAndPlay("foto1");
}
if you want the script to be in the timeline - remove it from the button
and place it on the timeline.
chris georgenes
www.mudbubble.com
www.keyframer.com
team macromedia
schebito wrote:
> **Error** Scene=Scene 1, layer=Boton Invisible, frame=1:Line 1: Statement must appear within on handler
> gotoAndPlay("foto1");
| |
| schebito 2005-05-11, 7:24 pm |
| thank you!
however, i want to make a sort of photo gallery that when you step on the
photo (on rollover or click... ) it shows the next one. So I put an invisible
button and tried to program it. Every photo is on a different layer. The
frame where each photo lays has a stop order. so the button should make it
play on an action to be determined yet.
If I do it on the timeline the button would be useless... unless I really do
not need it
| |
| David Stiller 2005-05-13, 7:23 pm |
| schebito,
> If I do it on the timeline the button would be useless...
> unless I really do not need it
Not at all! :) My personal preference is to put *all* my code in the
timeline, or as much of it as I can, in order to keep it organized. When
you attach code to buttons or movie clips directly, you use an on() or
onClipEvent() event handler. When you put your code in a keyframe of the
timeline, you must give your buttons/movie clips instance names, so that the
code is able to "find" the asset you mean.
// Timeline script ...
myButtonInstanceName.onRelease = function() {
// tell whatever movie clip you want to do its thing
}
David
stiller (at) quip (dot) net
"Luck is the residue of good design."
| |
| schebito 2005-05-20, 7:26 pm |
| thanks David!
I solved it by writting a { } ... they were missing. About the code, I do
use an Action layer... in this case I only put stops, it was a gallery wich
would change pic on click. (it?s my fisrt flash after the macromedia course)
relating to another topic, I would really apreciate help for making a text
scrollbar...
I have a quite large text that I would like to be read by scrolling. After
trying to use downloaded scrollers, I realized that everytime i replaced the
text, it wouldnt work.
Is there any way you could teach me how to use the UI components? I am trying
to do make the movie load the text by using loadVariables("text.txt");
however, since I am really new at this, flash help is useless
| |
| David Stiller 2005-05-20, 7:26 pm |
| > however, since I am really new at this, flash help is useless
Flash Help does have a few "issues," but it is far from useless. If is,
in fact, a great way to go *especially* if you're new to Flash. Don't get
ahead of yourself. ;) Read the documentation and you'll find all kinds of
good information. Start with the "Find Developer Topics" image on the very
first page when you hit F1. Inside that, start with bullet point 2, "Read
about the ActionScript language". When you're done there, head over to
UltraShock.com and look up their UI Components tutorials. :)
David
stiller (at) quip (dot) net
"Luck is the residue of good design."
| |
| schebito 2005-05-20, 7:26 pm |
| geez thanks!
I know it isn?t useless, but from my view, the help could be in chinese and
still mean the same. Thank you for the hints. I will try to do that... I?ll
keep you posted about my findings!
| |
| David Stiller 2005-05-20, 7:26 pm |
| Xref: newsfeed-west.nntpserver.com macromedia.flash.sitedesign:122365
> geez thanks!
np
> I know it isn?t useless, but from my view, the help could be in
> chinese and still mean the same. Thank you for the hints. I will
> try to do that... I?ll keep you posted about my findings!
Keep at it. :) People trash the documentation a lot, and honestly,
from an experience developer's point of view, yes, it does have its
failings, but when you're just getting started, it helps temendously -- but
you have to work at it. No one said multimedia development was easy. If
they did, they were A) lying, B) ignorant (which is not a bad word, just a
particular quality), C) deluding themselves, D) trying to get ahead, or E)
brilliant.
David
stiller (at) quip (dot) net
"Luck is the residue of good design."
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|