|
Problem integrating Flash-ASP:
1. Flash action script on "Login" button:
on (release) {
loadVariables ( "Login.asp", 0, "POST" );
gotoAndPlay ("LoginStatus");
}
2. action script for Label "LoginStatus"
if (bLoginStatus == 1)
{
gotoAndPlay ("LoginSuccess");
}
else {
gotoAndPlay ("LoginFailed");
}
3. Login.asp - It's just a test script, so, no password matching yet.
I just want to see the effect of changing "bLoginStatus" to 1 or 0 and that it works as intended.
<% response.write "bLoginStatus=1" %>
Yes, this is it. A very simple ASP script isnt it?
4. Observation:
The flash movie always go to the "LoginFailed" frame for some reason...
It does NOT matter if "bLoginStatus=1" in Login.asp
How can you make sure that your variables has been loaded successfully? I tried to make sure there enough time to load variable by adding a while-loop to waste time:
var i
i=0
while(i<100000)
{
i=i+1
}
if (bLoginStatus == 1)
{
gotoAndPlay ("LoginSuccess");
}
else {
gotoAndPlay ("LoginFailed");
}
norm
|
|
|
|
|
I haven't done this for a while. So I hope my annswer isn't too historic.
///Assign bLoginStatus TWO frames before eg.
bLoginStatus =2;
if (bLoginStatus == 1)
{
gotoAndPlay ("LoginSuccess");
}
if(bLoginStatus == 0 {
gotoAndPlay ("LoginFailed");
}
/// If the default still exists then just play the last frame
prevframe()
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
You are the intrepid one, always willing to leap into the fray! A serious character flaw, I might add, but entertaining.
Said by Roger Wright about me.
|
|
|
|
|
Thanks for the feedback.
Question 1: "Assign bLoginStatus TWO frames before"
Why exactly TWO?
Question 2: No, for some reason, it did not work.
The script still seems to execute independent of what's written in the ASP file.
It's a shame that a C++ programmer get stuck on a simple thing like this... shame.
norm
|
|
|
|
|
norm wrote:
Why exactly TWO?
I guess you could make it one frame before.
it just means you are assigning the bLoginStatus variable repeatedly.
norm wrote:
It's a shame that a C++ programmer get stuck on a simple thing like this... shame.
Disgusting !!
I'll send you my email and if you have a dummy FLA to test send it over. Although I only have Flash5. I'm quite sure its something real simple.
One of thos things you could spend stacks of time wasted on.
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
You are the intrepid one, always willing to leap into the fray! A serious character flaw, I might add, but entertaining.
Said by Roger Wright about me.
|
|
|
|
|
thanks. just came back, let me try some more and see if i can do this.
else, this shame is going to remain with me for as long as i breathe
norm
|
|
|
|
|
I gave up. I already spent two days on this problem. Please guide me out of this master!
~just sent you the files, it's a little over 2MB~
norm
|
|
|
|
|
Is this possible to inform the site not to be 'cached' in the users' PC. I am trying to calculate the site's hit rate... The cache didnt give me the exact hit rate for some reasons (my web server maintenance people told me that!!).... Please help
I was born intelligent Education ruined me!.
|
|
|
|
|
Using:
<%Response.Expires = -1 %>
in an asp page will prevent the page from being cached. If you're not using asp, you can expire the page deliberately by using something like:
where the time/date is any arbitrary value prior to the time of the page request. Expired pages are not cached.
I've gone to find myself. If I should get back before I return, please keep me here.
|
|
|
|
|
Roger Wright wrote:
in an asp page will prevent the page from being cached
Yes.. I do use ASP page....
Can I out the
Roger Wright wrote:
<%Response.Expires = -1 %>
in the banner page or footer page .. that comes in all the pages of my site... so that I can avoid code repetation?? Will this help??
I was born intelligent Education ruined me!.
|
|
|
|
|
Since the Response.Expire value is part of the http header for the page I would expect that this would have to be set before anything is sent to the client. I haven't used it, just looked it up for you, but I'd try it very early in the script. I think I saw in a later post that your are using Javascript, so the other form might be a cleaner solution - just include it as part of the string(s) you output for the HEAD element.
I've gone to find myself. If I should get back before I return, please keep me here.
|
|
|
|
|
Roger Wright wrote:
just include it as part of the string(s) you output for the HEAD element.
Right... u got the way that is implemented NOW!
I was born intelligent Education ruined me!.
|
|
|
|
|
SPS wrote:
u got the way that is implemented NOW!
Is it not working, or is it just a pain in the arse to repeat in every page? If the latter, stick it in an included page.
I've gone to find myself. If I should get back before I return, please keep me here.
|
|
|
|
|
Roger Wright wrote:
Is it not working
NO, it is working... what I meant was, I had just implemented as ur suggestion. And I have made them in the header include... no probs!!
Thanks
I was born intelligent Education ruined me!.
|
|
|
|
|
apologies for a basic question,i am new to HTML. how do you display text on a web page so that it scrolls(moves) across the screen on viewing? Thank you!
|
|
|
|
|
Have a look at the MARQUEE[^] element.
HTH
Cheers,
Simon
"The day I swan around in expensive suits is the day I hope someone puts a bullet in my head.", Chris Carter.
my svg article
|
|
|
|
|
but note that that MARQUEE is not a standard part of the HTML spec, and isn't supported by some browsers (notably Mozilla, or anything that uses the mozilla code)
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
I use my ASP page to communicate with my access database. Is there any way to find the list of 'tables' in my access database from ASP or using jscript??
I was born intelligent Education ruined me!.
|
|
|
|
|
I've found the following example.
Hope it helps you
Michela
<%
conn.Open strconnection
set rs = conn.OpenSchema(maxTable) ' maxTable=20 for me
%>
<%
do while not rs.eof
if rs("table_type") = "TABLE" then
%>
<%
end if
rs.movenext
loop
rs.close
%>
» | Tables
| | Table Name | | <%=rs("table_name")%> |
|
|
|
|
|
Thanks....
Will give a try on it!!
I was born intelligent Education ruined me!.
|
|
|
|
|
I have created a simple C# ASP.NET app, that uses a database(SQL) which is programed only to check users againsit a the database entry. when I try to run the program, I get to the server page, and than when I enter the user password, than I press invoke. however I just get a "The page can not be displayed - There is a problem with the page you are trying to reach and it cannot be displayed." error message. To my knowledge I have programmed this correctly, but can't seem to get pass this error. The below code is all I'm doing:
[WebService(Name="TestWebServer Web Service", Description="Test SQL Database")]
public class Service1 : System.Web.Services.WebService
{
const string connStr="server=SILICON;uid=sa;pwd=;database=MytestDatabase";
[WebMethod(Description="Method to Authenticate Users")]
public bool Authenticate(string username, string password)
{
SqlConnection dbConn = new SqlConnection(connStr);
string sqlStr = "SELECT Password from PM_USERS where UserName = '" + username + "';";
dbConn.Open();
SqlCommand dbCommand = new SqlCommand(sqlStr,dbConn);
SqlDataReader dbReader = dbCommand.ExecuteReader();
bool returnBool;
if (dbReader.Read())
{
if (dbReader[0].ToString()==password)
{
returnBool = true;
}
else
{
returnBool = false;
}
}
else
{
returnBool=false;
}
dbReader.Close();
dbConn.Close();
return returnBool;
}
that's pretty much it!
|
|
|
|
|
|
Ooops, I did mean webservice! tried the debugger, still trying!!
|
|
|
|
|
|
I want to extract the title of the web page that I am in... Any option for this... Example code will help me a lot!!
I was born intelligent Education ruined me!.
|
|
|
|
|
what tool do you use?
vbs or ..?
|
|
|
|