Welcome, Guest. Please login or register.
Did you miss your activation email?
02/07/12, 07:35
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  Recent Tutorial Support
| |-+  Flash Ecards (Moderators: Flash-db, vesa kortelainen, Ronald Wernecke, Mohsin Sumar, Jorge Solis)
| | |-+  Heap big ecard issues....need help
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Heap big ecard issues....need help  (Read 4010 times)
JustinPB
Server what's that
*
Posts: 8


View Profile
« on: 03/20/09, 10:36 »

Hello everyone! I love the concept of this ecard engine...but I am having some issues.

I am able to send ecards to my email accounts just fine, and the dBText folder appears to have files in them. I'm a designer with little coding experience, so I'm not sure what is going on. When I click on the link in the ecard, I get the "Object Not Found!" screen.

I kinda looked around here on the forum for solutions, and my code currently looks like this for "SendEcard.php"

<?php

$CreateEcard = date(U);

$filename = $CreateEcard.".txt";

$ToEmail = $_POST["ToEmail"];
$FromEmail = $_POST["FromEmail"];
$ToName = $_POST["ToName"];
$FromName = $_POST["FromName"];
$Greeting = $_POST["Greeting"];
$IntroMessage = $_POST["IntroMessage"];
$EndMessage = $_POST["EndMessage"];
$EcardSelect = $_POST["EcardSelect"];

$ToName = stripslashes($ToName);
$FromName = stripslashes($FromName);
$Greeting = stripslashes($Greeting);
$IntroMessage = stripslashes($IntroMessage);
$EndMessage = stripslashes($EndMessage);

$Today = (date ("l dS of F Y ( h:i:s A )",time()));

$Created="Ecard Created on $Today";

$EcardNum = $EcardSelect;

$EcardText = "ToName=$ToName&ToEmail=$ToEmail&FromName=$FromName&FromEmail=$FromEmail&Greeting=$Greeting&IntroMessage=$IntroMessage&Created=$Created";


$fp = fopen( "./dBText/$filename","w");
fwrite($fp, $EcardText, 10000);
fclose( $fp );

######Email Card########
## You can change the subject and the message part around.
## Make sure to change the Link as stated
 in the Tutorial.
## (Change from 'someSite' to your actual site - leave the re
st the same


$ToSubject = "You have recieved a Flash Ecard from $FromName";
$Message = "$ToName,\nYou have recieved a Flash card from $FromName. \nClick the following link to view your card:\n\n http://www.stoneiron.com/Ecards/SelectCard.php?EcardText=$CreateEcard&ENum=$EcardNum\n\n-----------------------------------\nHere is the message that was sent:\n$ToName,\n$Greeting\n$IntroMessage\n\n-$FromName\n\n\n-----------------------------------\nThis card was sent from www.flash-db.com/Ecards/\n\nThe Flash-dB Team.";


###################
## This line actually sends the email - you should not have to change this.

mail(<".$ToEmail.">",$ToSubject, $Message, "From: ".$FromName." <".$FromEmail.">");


## This next line returns a success message to the movie.
print "_root.Status=Success your Card Has Been Sent!";

#### End #########
## By: Jeffrey F. Hill
## www.flash-db.com

?>
« Last Edit: 03/20/09, 10:43 by JustinPB » Logged
JustinPB
Server what's that
*
Posts: 8


View Profile
« Reply #1 on: 03/20/09, 10:39 »

Here's my SelectCard.php code....

<HTML>
<HEAD>

<TITLE>Here's your Flash Ecard - from the Flash-dB.com Tutorial</TITLE>

<?php
$ENum = $_GET["ENum"];
$EcardText = $_GET["EcardText"];

switch ($ENum) {

   case '1':
   $goto = "Ecard1.swf?EcardText=".$EcardText;
   $gotoFooter = "EcardFooter.swf?EcardText=".$EcardText."&EcardSelect=1";
   $Dimensions = "WIDTH=700 HEIGHT=525";
   $DimensionsFooter = "WIDTH=700 HEIGHT=250";
   break;

   case '2':
   $goto = "Ecard2.swf?EcardText=".$EcardText;
   $gotoFooter = "EcardFooter.swf?EcardText=".$EcardText."&EcardSelect=2";
   $Dimensions = "WIDTH=700 HEIGHT=525";
   $DimensionsFooter = "WIDTH=700 HEIGHT=250";
   break;

   case '3':
   $goto = "Ecard3.swf?EcardText=".$EcardText;
   $gotoFooter = "EcardFooter.swf?EcardText=".$EcardText."&EcardSelect=3";
   $Dimensions = "WIDTH=700 HEIGHT=525";
   $DimensionsFooter = "WIDTH=700 HEIGHT=250";
   break;

   case '4':
   $goto = "Ecard4.swf?EcardText=".$EcardText;
   $gotoFooter = "EcardFooter.swf?EcardText=".$EcardText."&EcardSelect=4";
   $Dimensions = "WIDTH=700 HEIGHT=525";
   $DimensionsFooter = "WIDTH=700 HEIGHT=250";
   break;

   case '5':
   $goto = "Ecard5.swf?EcardText=".$EcardText;
   $gotoFooter = "EcardFooter.swf?EcardText=".$EcardText."&EcardSelect=5";
   $Dimensions = "WIDTH=700 HEIGHT=525";
   $DimensionsFooter = "WIDTH=700 HEIGHT=250";
   break;
}

?>
</head>

<body bgcolor="#FFFFFF" topmargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0">

<center>

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
<? print "$Dimensions";?>>
<PARAM NAME=movie VALUE="<? print "$goto";?>"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="<? print "$goto";?>" quality=high bgcolor=#FFFFFF  <? print "$Dimensions";?> TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
</OBJECT>

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
<? print "$DimensionsFooter";?>>
<PARAM NAME=movie VALUE="<? print "$gotoFooter";?>"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="<? print "$gotoFooter";?>" quality=high bgcolor=#FFFFFF  <? print "$DimensionsFooter";?> TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
</OBJECT>
</center>
</BODY>
</HTML>

I have gone through the basic tutorial, and uploaded "Ecards.swf" "Ecard2.swf" "Ecard3.swf" "Ecard4.swf" "Ecard5.swf" and the two php files. I need verification on this, but I think I'm running PHP/5.2.5.

Any ideas?
« Last Edit: 03/20/09, 10:41 by JustinPB » Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6161


View Profile WWW Email
« Reply #2 on: 03/21/09, 03:47 »

I dont understand your question  Huh
Logged

happy flashing
Cool
Ronald
JustinPB
Server what's that
*
Posts: 8


View Profile
« Reply #3 on: 03/23/09, 08:32 »

Embarrassed Basically, nothing shows up but an error message when the recipient of an ecard clicks on their link. Sorry....I was vague.
« Last Edit: 03/23/09, 08:33 by JustinPB » Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6161


View Profile WWW Email
« Reply #4 on: 03/23/09, 09:06 »

Could you give a life link, so we can have a look?
Logged

happy flashing
Cool
Ronald
JustinPB
Server what's that
*
Posts: 8


View Profile
« Reply #5 on: 03/23/09, 14:19 »

I just sent an ecard to myself, and this is the link in the delivery message.

http://www.stoneiron.com/Ecards/SelectCard.php?EcardText=1237835924&ENum=1
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6161


View Profile WWW Email
« Reply #6 on: 03/24/09, 03:12 »

It is a path issue.

Be aware, that professional systems are running unix/linux - and therefor there is a difference between capital and non capital letters.

Ecards is not the same as ecards - they are different folders Wink

Your folder is named ecards, but you are trying to access Ecards, which gives you "object not found".

Check for all other entries as well.
Logged

happy flashing
Cool
Ronald
JustinPB
Server what's that
*
Posts: 8


View Profile
« Reply #7 on: 03/24/09, 06:30 »

That fixed a big issue, but for some reason, the flash card is still not visible when I click the link. (http://www.stoneiron.com/Ecards/SelectCard.php?EcardText=1237893373&ENum=1) Are there any reasons why it would not be displaying?  Huh

Justin
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6161


View Profile WWW Email
« Reply #8 on: 03/24/09, 08:17 »

yes - after it was created, you tried to write it, but it propably failed, because of the misspelled foldername.

Try with a new one.
Logged

happy flashing
Cool
Ronald
JustinPB
Server what's that
*
Posts: 8


View Profile
« Reply #9 on: 03/24/09, 08:25 »

I tried again, and there was not an error message or anything, only a blank white page. I sent a new one, and the directory listing seems to be okay, I just can't get it to display anything.

Here's my new link:

http://www.stoneiron.com/Ecards/SelectCard.php?EcardText=1237900967&ENum=1
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6161


View Profile WWW Email
« Reply #10 on: 03/24/09, 09:01 »

you still generate wrong links.
at least the capital E in Ecards is wrong, and I suppose it might be more
Logged

happy flashing
Cool
Ronald
JustinPB
Server what's that
*
Posts: 8


View Profile
« Reply #11 on: 03/24/09, 09:31 »

I think I found the problem. My "php" was wrong for the SelectCard.php script. After I fixed the directories, and changed the script up, it worked fine! Thanks for your help Ronald, I'll post back if I experience further difficulty.  Wink
Logged
JustinPB
Server what's that
*
Posts: 8


View Profile
« Reply #12 on: 03/24/09, 11:07 »

I am having another issue.

I want to display the ecard selector within a graphical interface. So I embedded the .swf file into a Dreamweaver CS3 .PHP page, and after some code modification, the embedded flash displayed correctly. However, the embedded file doesn't produce a .txt file in the dBText folder. When I run the .swf file (without being embedded) and send an ecard, it created a .txt file, and everything works perfectly. I need to embed the file, but I can't get it to work.

Justin
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6161


View Profile WWW Email
« Reply #13 on: 03/25/09, 07:14 »

you cannot just ambed everything.

The php stuff doing the background bussines, has to be in the background - and it has nothing to do with the frontend.

So keep it off of any integration thoughts.

If you want to do it in a more service and object oriented way, have a look into AMFPHP and rewrite it to use this.

The tutorial just shows you, how something like this basicly can work.

In doubt have a look into the loading and saving tutorials, which show you the basics, and some advanced techniques, about communication.

Extensions and improvements are allways possible.
« Last Edit: 03/25/09, 07:16 by Ronald Wernecke » Logged

happy flashing
Cool
Ronald
Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!