Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 24th, 2002, 06:38 AM
showy showy is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: china
Posts: 2 showy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to showy
trouble in load txt after wroten by asp


hey,someone help
i write some asp code:writeline("c="&myvariable),then the text wrote
c=variable,but it added a ENTER end of it,so,when i use loadvariable(mytext,0) in my flash to load the text,it did not work,
oh,how can i do with the unwanted ENTER,let flash load my text?
thanx

Reply With Quote
  #2  
Old March 25th, 2002, 12:50 AM
showy showy is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: china
Posts: 2 showy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to showy
this is my code,i try to change

hey,someone help
i write some asp code:writeline("c="&myvariable),then the text wrote
c=variable,but it added a ENTER end of it,so,when i use loadvariable(mytext,0) in my flash to load the text,it did not work,
oh,how can i do with the unwanted ENTER,let flash load my text?
and i changed the code:writeline("c="&myvariable) to writeline("c="&replace(application("countnum"),vbcrlf,"")) ,but i am failing in it,it always added a ENTER at the end,why?

this is my count.txt text:
c=28

this is my homepage code:
<HTML>
<HEAD>
<TITLE>counter3</TITLE>
<%
if isempty(session("conn")) then
application.lock
set counterfile=server.createobject("scripting.filesystemobject")
set temp=counterfile.opentextfile(server.mappath("count.txt"),1,true,false)
application("countnum")=temp.readline
application("countnum")=mid(application("countnum"),3)
application("countnum")=application("countnum")+1
temp.close
%>
</HEAD>
<BODY bgcolor="">
visiters£º<%=application("countnum")%>
<%
set temp=counterfile.createtextfile(server.mappath("count.txt"),true,false)
temp.writeline("c="&replace(application("countnum"),vbcrlf,""))
temp.close
application.unlock
else
response.write "visiters£º"&application("countnum")
end if
session("conn")=true
%>
<OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
WIDTH=550 HEIGHT=400 align="top">
<PARAM NAME=movie VALUE="counter3.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=>
<EMBED src="counter3.swf>" quality=high bgcolor= WIDTH=550 HEIGHT=400 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" align="top" width="550"></EMBED>
</OBJECT>
</BODY>

</HTML>

this is my flash code:
loadVariablesNum ("count.txt", 0);
num = c;
j = num.length;
s = Number(num.charAt(j-2));
g = Number(num.charAt(j-1));
with (siwei) {
gotoAndStop(s+1);
}
with (gewei) {
gotoAndStop(g+1);
}

Reply With Quote
  #3  
Old March 28th, 2002, 09:31 AM
StuffBoy StuffBoy is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Posts: 2 StuffBoy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
How to Pass variable to flash

Hi Snowy,

You know that flash will read the response of a ASP File "On the Fly".
This is how it works.

Contents of "Test.asp"

<%

VariableContents = "Testing123"
Response.write "&VariableName=" & VariableContents

%>

This will write the following to the screen

&VariableName=Testing123


Then all you do is within flash use the following code

loadVariablesNum ("Test.asp", 0);

and give it about 10 - 20 Frames to load the varibles into flash before
you do anything with the variables

IMPORTANT
This must be the only text that is wrote to the screen,
in one continues line of text with no HTML Code within it.


If you want Flash to pass you a variable Contents and you then write it to
a Text file this is what you do.


Contents of "WriteTextFile.asp"

<%

Const fsoForAppend = 8

Dim FileSystemObject
Dim FileSystemObject
Dim VariableContents
Dim TextToWrite
Dim TextFileName
Dim PathOfTextFile

TextFileName= "FlashVariables.txt"
PathOfTextFile = Server.MapPath(TextFileName")
VariableContents = Request("FlashVariableContents")
TextToWrite = "&VariableName=" & VariableContents

Set FileSystemObject = Server.CreateObject("Scripting.FileSystemObject")
Set objTextStream = FileSystemObject.OpenTextFile(, fsoForAppend)

objTextStream.Write TextToWrite


objTextStream.Close
Set objTextStream = Nothing
Set FileSystemObject = Nothing

%>

This will write the following to the text file (Without the ENTER/Return at the end)

&VariableName=Testing123


PS : All you need to do was use write instead of writeline as Writeline automaticly
puts a return after the line wrote.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > trouble in load txt after wroten by asp


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

IBM Developerworks




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway