all groups > macromedia flash sitedesign > june 2005 >
You're in the

macromedia flash sitedesign

group:

*NEWBIE* Linking to frames


Re: *NEWBIE* Linking to frames David Stiller
6/28/2005 4:35:44 PM
macromedia flash sitedesign:
rclifto2,

[quoted text, click to view]

Much of this depends on what object you've attached your on() handler
to. Is it a button symbol, a movie clip symbol? The answer determines what
the word "this" refers to, as used in the event handler.


David
stiller (at) quip (dot) net
Tackling the ActionScript Language Reference
http://www.quip.net/tutorials/

*NEWBIE* Linking to frames rclifto2
6/28/2005 7:44:27 PM
:confused; I've searched for quite a while through the forums before
posting... can't find a similar situation...
What I'm trying to create is a brochure in which frame 1 will be the complete
brochure that contains 25 buttons/links. Frames 2-26 are the information pages.
When pressing the button, there is a considerable delay before the link
manifests. I'm using the basic actionscript of:

on (release) {
this.gotoAndStop("5");
}

Why the delay? Be gentle - I told you I'm new. Thanks in adavance.
Re: *NEWBIE* Linking to frames rclifto2
6/30/2005 12:00:00 AM
It is attached to a button symbol. For example, "Name" may be the button
symbol and I am trying to link it to frame 5 that has info on the name.
I previously used the "on(release)" script without "this." but I read in
several places that it is good practice to include it.
Re: *NEWBIE* Linking to frames rclifto2
6/30/2005 12:00:00 AM
David,
I initially had frame labels but also tried it pointing directly to the frame.
There is still about a 1.5 second delay. Rather than waste your time on a
very minor problem, I think I'll just add to each button on the "down" frame so
that there is a little bit of animation and switch the "on(release)" action to
"on(press)". Maybe this will give a smoother & quicker transition appearance.
I really appreciate you offering your knowledge and experience to help me with
my problem. BTW: Great site - you put together some cool stuff!
Re: *NEWBIE* Linking to frames rclifto2
6/30/2005 12:00:00 AM
David,
As I looked to send the .fla I realized that the size of this seemingly small
file was 2.56mb. Could file size create a delay? I copied & pasted an image
from a .pdf straight into flash. Should I break those images apart -or does
that matter?
Re: *NEWBIE* Linking to frames David Stiller
6/30/2005 12:19:10 PM
rclifto2,

[quoted text, click to view]

Okay, given that, the "this" in this case refers to the timeline in
which the button resides. If this were a movie clip symbol, the "this"
would refer to the movie clip's own timeline.

So the following code ...

on (release) {
this.gotoAndStop("5");
}

.... would send the timeline -- the timeline in which this button resides --
to frame 5.

Ah, but wait! That 5 is in quotes. Why is that? Frame numbers aren't
strings (quoted items), but rather, numbers. The ActionScript, as written,
causes the Flash Player to look for a frame label named "5," and I suspect
there is no such label, right? Look up MovieClip.gotoAndStop() in the
ActionScript Language Reference and you'll see that this method accepts an
"object" ... which means either a number or a string. Since your aim is to
send the playhead to a frame, try removing the quotes.


David
stiller (at) quip (dot) net
Tackling the ActionScript Language Reference
http://www.quip.net/tutorials/

Re: *NEWBIE* Linking to frames David Stiller
6/30/2005 2:13:58 PM
rclifto2,

[quoted text, click to view]

That's odd. I could take a look at your FLA, if you like. If you want
send me an attachment.

[quoted text, click to view]

I shouldn't think that would be it, because the events are fired
independent of whatever animation occurs on the button frames. I perfer the
on (release) event personally because it allows the user to change his mind.
Haven't you ever clicked on a button, then dragged off and released without
being over the button? Doing so typically acts as a kind of "cancel" to
whatever the button does. By using on (press), the user commits himself to
the action as soon as the mouse button is clicked. This workaround might
just do it for you, though. Still, I'd be curious until I figured out the
solution. ;)

[quoted text, click to view]

I'm happy to help. :)


David
stiller (at) quip (dot) net
"Luck is the residue of good design."

Re: *NEWBIE* Linking to frames David Stiller
6/30/2005 3:13:58 PM
rclifto2,

[quoted text, click to view]

That is possible, actually. Is the FLA that big, or is that the SWF?
(I'll need the FLA, by the way, if you want me to take a look at it.)

[quoted text, click to view]

May not be a bad idea, but it all depends on the image and how it needs
to be used. If your compiled SWF is 2.5MB, you may want to consider
optimizing.


David
stiller (at) quip (dot) net
"Luck is the residue of good design."

Re: *NEWBIE* Linking to frames David Stiller
6/30/2005 4:23:33 PM
rclifto2,

[quoted text, click to view]

That begins to make it sound as if the file size is your problem, but
heck, I'll give your FLA another set of eyes.

[quoted text, click to view]

Will do.

[quoted text, click to view]

I think it depends on how you post -- whether you're in the forum via
web browser or a news client -- but in any case, go ahead and just email me
personally. I don't normally desire things sent directly this way, but your
issue has my curiosity piqued.


David
stiller (at) quip (dot) net
"Luck is the residue of good design."

Re: *NEWBIE* Linking to frames rclifto2
6/30/2005 7:50:00 PM
David,
I took out some content to send you a scaled-down .fla and it seems to have
decreased the lag a bit. Could you let me know if the existing lag is normal
or am I nit-picking? Here's a beginner question for you: do I send the .fla
to your personal email or is their a way to attach it to this post? (Couldn't
find one).

Re: *NEWBIE* Linking to frames rclifto2
7/1/2005 12:00:00 AM
David,
That sounds very logical. I'll be sure to remember this for future projects
as I work on converting more .pdf brochures to .swf.
Thanks again for your time, patience and for sharing your knowledge with
someone who's learning the ropes.
Take care!
Re: *NEWBIE* Linking to frames David Stiller
7/1/2005 10:34:39 AM
Follow up, having seen the poster's FLA ...

I'll tell you what I think the problem is. I believe your slow response
is due to all your text fields. I noticed that each "picture" of your pages
of text is actually a composition based on countless grouped text fields; in
fact, each letter of every word seems to be comprised of its own text field,
which means you have hundreds (if not thousands) of text fields in this FLA.
Ten to one, that's your problem. If you can convert your brochure to a
graphic -- say, a bitmap (BMP) or JPG -- instead, you'll find that the
pausing disappears.


David
stiller (at) quip (dot) net
"Luck is the residue of good design."

AddThis Social Bookmark Button