Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: Need some help with button to control a movie clip
From: ifx
Date: Tue, 18 Jul 2000 22:15:17 +0100

Hi Helen... (or whomever wants to help)

I took your advice and set my submit button action as follows.. but it
doesn't seem to work as expected.
The code:

On Release
If (textfield="")
Begin telltarget("/movieclip")
Go to and stop("label1")
End telltarget
Else
Begin Tell Target("/movieclip")
Goto and stop("label2")
End telltarget
End if
End on

When I test the movie and hit the submit button, the clip plays but always
goes to "label1" even if I put content into the field. As an experiment I
put a value of "1" after the textfield in the "if" statement... and when I
played the movie, the clip would only go to label2 even with content in the
text field.

Anyone know what I'm missing here?

Thanks again!!

Alan

>>
>> Hi,
>>
>> I need to set up a submit button that controls a movie clip based on whether
>> a user enters text into some text fields. Let's say I have 3 textfields...
>> one for name, the second for address and the third for phone number. I also
>> have a 4 frame movie clip on the stage (first frame is empty to be invisible
>> on the stage) with 3 error messages that play according to the user input of
>> the textfields. If the user fills out 1 and 3, but doesn't put info. into
>> field 2, then the movie clip will play to frame 3 where there is a message
>> that says "you need to fill in your address" etc... I also need the script
>> to be able to send the movie to another frame in the timeline if all the
>> info. has been filled out. At that frame, there is a "thank you" page and
>> other stuff. It seems simple enough.. but I'm having trouble putting the
>> code together. I'm thinking I can just get away with a "if/then goto and
>> play" type statement... but not totally sure of how to go about this.
>
> Alan,
>
> You'll have to sort out the logic for your error checking first (eg, do
> you want to sent an error message displayed for every field that was
> left blank individually, or do you want one message if *any* of the
> fields are blank, or something else?) Once you have the logic structure
> determined, start simple to test -- maybe with one textfield (thistext)
> and your movieclip with two labelled frames, textok and texterror. Then
> try code on the submit button like
>
> if (thistext="")
> begin tell target("/mc")
> goto and play(texterror)
> end tell target
> else
> begin tell target("/mc")
> goto and play(textok)
> end tell target
> end
> stop
>
> and put code at the end of each section of the mc to tell target the
> main timeline (begin tell target "/", play) to resume playing.
>
> Then just work up as needed for all your fields. (Usual disclaimer:
> That's what I'd do anyway)
>
> Helen
> ---------------------------------------------------
> helen triolo � http://i-technica.com � 301-424-6037
> Flash Q&A archive � http://i-technica.com/flashlist
>
> flasher is generously supported by...
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> flashforward2000 and the Flash(tm) Film Festival
> July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
> www.flashforward2000.com
> Produced by United Digital Artists and lynda.com
> Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
> shockwave.com and Electric Rain.
> 1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
> Register before June 30 and save $200!!-- www.flashforward2000.com
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> To unsubscribe or change your list settings go to
> http://www.chinwag.com/flasher or email helpatchinwag [dot] com
>
>


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
www.flashforward2000.com
Produced by United Digital Artists and lynda.com
Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
shockwave.com and Electric Rain.
1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
Register before June 30 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: Need some help with button to, Helen Triolo

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]