Flasher Archive

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


Subject: RE: FLASH: Pause Actions?
From: Branden Hall
Date: Mon, 20 Dec 1999 20:42:48 GMT

I have been watching this thread for a while now, and figured I ought to
tell you how to do this:

Frame 1:
set variable "scriptstatus"=""
stop

Button inside of frame 1:
On (Release, Key: <Enter>)
Load Variables ("http://www.everlastlive.com/signup/mailer-flash.cgi",
0, vars=POST)
Play
End On

Frame 2:
if (scriptstatus eq "")
goto 4 and stop
end if

Frame 3:
Goto 2 and play

Frame 4:
Loop While ((scriptStatus) = 5)
If ((scriptStatus) = 1)
Go to and Stop ("ok")
Else If ((scriptStatus) = 0)
Go to and Stop ("address")
Else If ((scriptStatus) = 2)
Go to and Stop ("already")
End If
End Loop

Thats it... it will now wait until the variables are loaded.

--
Branden J. Hall
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Multimedia Developer/Instructor | Multimedia Developer
Fig Leaf Software | Kimmuli.com
bhallatfigleaf [dot] com | brandenatkimmuli [dot] com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=--=-=-=-=-=-=-=-=-=-=-




-----Original Message-----
From: owneratchinwag [dot] com [owneratchinwag [dot] com]On">mailto:owneratchinwag [dot] com]On Behalf Of Dino
Giacomazzi
Sent: Monday, December 20, 1999 3:25 PM
To: flasheratchinwag [dot] com
Subject: Re: FLASH: Pause Actions?


I think i may have figured out a solution to this problem, however Im not
sure if my syntax is correct because in theory it should be working, but its
not..

here it is.

I moved the if then statements out of the button and put them in a frame
called "eval". So when you click the button it sends the variable to the
CGI..

I placed: Set Variable: "scriptStatus" = "5"
in the frame of the main timeline that loads the form Movie Clip, so that
the value of scriptStatus can be checked by the Loop and find a number
there.

This is the Button Action:

On (Release, Key: <Enter>)
Load Variables ("http://www.everlastlive.com/signup/mailer-flash.cgi",
0, vars=POST)
Go to and Play ("eval")
End On

Then in the "eval" frame i have the following script...

Loop While ((scriptStatus) = 5)
If ((scriptStatus) = 1)
Go to and Stop ("ok")
Else If ((scriptStatus) = 0)
Go to and Stop ("address")
Else If ((scriptStatus) = 2)
Go to and Stop ("already")
End If
End Loop


can you see any mistakes with my syntax? When i click the submit button,
the text variable changes value, however the MC jumps to "ok" regardless
of the value displayed in scriptStatus.

----------------------------------------------------------------------------
------
The last message


Im working on a signup form so people can submit their email address for a
mailing list. I got together with my neighborhood perl programmer and he
modified his standard mail.cgi to send a variable value back to flash based
on a couple of things...they are

1. if the email address is not valid (no @) then send scriptStatus = 0
2. if the email address is already in the database send scriptStatus = 2
3. if the email address is ok and not in the database send scriptStatus = 1

In my movie i have a hidden text variable called scriptStatus which displays
the value from the CGI. This all works perfectly and I love it very much.
I then put an if statement in the button that looks like this:

On (Release, Key: <Enter>)
Load Variables ("http://www.bigrockstar.com/signup/mailer-flash.cgi",
0, vars=POST)
If ((scriptStatus) = 1)
Go to and Stop ("ok")
Else If ((scriptStatus) = 0)
Go to and Stop ("address")
Else If ((scriptStatus) = 2)
Go to and Stop ("already")
End If
End On

Every time I submit an address it goes to the named frame "address"
(scriptStatus =0 i.e. invalid email address).
In the scriptStatus text variable box, it displays the proper number 0, 1,
or 2..

I have also noticed there is a deley from the time you click the submit
button until the number shows up in the scriptStatus box. So my guess is
that the if statement in the button is reading the scriptStatus box before
the data comes back from the server, therefore, its blank and gets a value
of 0, or no value at all and is going to scriptStatus= 0..


Now my Question! How can i pause the actions script so that there is time
for the CGI to post back to flash before the If statement reads the
variable?

Any other solutions to this puzzle would be greatly appreciated as well.

Dino

PS. this is the first time I have tried to use IF/ELSE and really have no
idea how it works so my script could be completely screwed as well...

thanks in advance

dg













flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Streaming Media WEST '99 Conference & Exhibition
"The Worlds largest Internet Audio & Video Event"
December 7 - 9, San Jose Convention Center, California

Reserve your space today at http://www.streamingmedia.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...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Streaming Media WEST '99 Conference & Exhibition
"The Worlds largest Internet Audio & Video Event"
December 7 - 9, San Jose Convention Center, California

Reserve your space today at http://www.streamingmedia.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: Pause Actions?, Dino Giacomazzi

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