Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Create Stat Selections That Would Save



If your reading this, thanks. I'm trying to create a flash game based on Dungeons and Dragons. So I would like to know if anyone had ideas as to how I could create stat selections that would save and they would carry on throughout the game. I created a random function that when you click on the stat it generates a random number. I was wondering how I could save those stats, I checked the tutorials on SharedObjects, but it never worked. Thats my first problem, if anyone can help me with that, I would be very thankfull.

Thanks, Your Friendly Neighborhood Noob.

PS: The fla. is attached, and if anyone wanted to download it to see what I was talking about, maybe organize my code a little, its messy. Or just add the code for stats and saving/loading into the frames I've made? If you do, email it to jmclune@gmail.com. Thanks again!



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 06-07-2007, 12:22 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

A Stat Site?
Does anyone know of any tutorials that explain how to gather statistical data in a form and then to apply caculations to that data.. then i want to display that data to a website?

Here is an example of what I want to make...link

Hlpe With Stat Counter
I am using the tutorial for the stat count where u make 3 files
PHPCounter.swf
PHPcounter.txt
PHPCounter.php

I got everything done correctly. I got txt file changed to 777. Whats wrong nothing seems to work

Game Stat Solution
Hi Kirupa Forum,

I'm developing a team site and looking for easy ways to develop the official site with the stat factor. I'm a designer more than a coder so right now, I kinda know but looking for a process that makes the most sense to update stats or at least have the client do it.

I have the news in Wordpress and the main site will be all flash. I'm considering parsing some of the feeds from the wordpress to flash but blah blah on that cause that another task its self.

My first two methods for the updating the stats where
to do it by hand
or use some form of php and mysql.

I'm not really sure of a tutorial on how to do this in flash, xml or even mysql. I was just going to call of the database but in the end still do it by hand.

My question is there another method or a code that I could spruce up to get this done without taking too long?

Thanks
Bibble

Stat Counter For Flash
If you have an all flash based site, how do you about tracking stats like you would with html based sites.

Like finding out what pages people are going to, how long they stay, etc etc....

gkc

Create Then Save A New Symbol On The Fly?
Im doing a project, i have some script which takes a symbol and rotates and moves it radomly to create a really effective pattern/ illustration. each time you edit the symbol in mx you get a different effect.

I have found and edited script which allows me to draw a picture in the player. but i want to make a button which will save the image you have just drawn as the symbol which the pattern will use.

i know liitle script so be easy on me.

create - hit button - it replaces main symbol with the one you created - patterne starts again - and so on -again and again.

any helpers??

How To Create A 'save As' Link
I want to know how to create a 'save as' link in flash as I want users to be able to download mp3 files from my flash movies. i want them to click on a button and then have a 'save as' dialog box pop up, can this be done? I see Joshua Davis uses the feature I'm talking about to allow users to download zip or sit files of his tutorials. http://flashtothecore.praystation.com/

Any help would be great.

Thanks

Steve

Dynamically Create And Save .swf's?
Hi all! I'm starting off a project and I have a pretty lofty goal that I was hoping someone out there could help me with. I would love to be able to dynamically create and save .swf files. I have a quiz show sort of game prepared, and I would love to make it so that people can enter their own questions into the game. Do you guys out there have any ideas of how I could do this? I imagine that I could save their questions and answers into a mysql database- that much I can handle- but saving their .swf that knows which set of questions it needs to get is the hard part.

Does anyone out there know how I could go about doing this? It would be a great help to figure out how I could allow people to manipulate variables and save it as their own swf.

Thanks in advance,
Colin

Scorm : Stat Finish Calls
Newbie question

I need to connect with an LMS.

Do i need to add an onLoad javascript code or mabe a button event to Initialize with the LMS and and then add or make a function call FROM A BUTTON/ on unLoad javascript function to terminate the relationship with the LMS LMSFinish()).?

iaustin

Create And Save Text File
I've been looking around and at this point I'm not even sure this is possible with actionscript.

I need to create a text file in actionscript, then write to it.

The info to be written is one variable, or one line (a very long line).

This will be writing to a server as well where the swf will reside.

Or better yet, save this info to a database!

Thanks,

Can Flash Create/save Files?
Does anybody know if a flash movie can create/save files to the viewer's computer?

My project is this: I am creating an online course for a school I work for. The activity will allow students to drag-and-drop objects onto a canvas and create a scene. The students then need to either:

1) save the scene as a pic to their computer then submit to the teacher

or..

2) submit the scene as a pic file to a remote location directly

Are either (or both) of these options possible? If so, how?

Thanks for your response.

Create And Save Files With Flash Using AS 3.0
I wonder how can I create file using ActionScript 3.0 and save it? Is this is possible without using any other language? If it's not which is the best way to create a project which will save some data to the hard drive. How can I store some variables for example in txt file ot xml file?

Can Flash Create/save Files?
Does anybody know if a flash movie can create/save files to the viewer's computer?

My project is this: I am creating an online course for a school I work for. The activity will allow students to drag-and-drop objects onto a canvas and create a scene. The students then need to either:

1) save the scene as a pic to their computer then submit to the teacher

or..

2) submit the scene as a pic file to a remote location directly

Are either (or both) of these options possible? If so, how?

Thanks for your response.

**The Official Stat Your Favorite Flash Site***
This is the official state your favorite flash website and why.

I’ll start out with www.tronicstudio.com

Why: the design layout is flawless and they kept their theme throughout the site…. Good choice of photo’s as well.

Need A Way To Create, Save Xml Files On Local Disk
in flash 5 fscommand "save" did the trick just fine- can't do that in 6.
Has anyone used 3rd party plugins or another technique for creating, saving local XML or other text files?

Thanks!

How To Create An MS-Paint Like Tool With A Save Option?
hello there!

I am developing an application thats more like a color book.I can think of possibilities for applying colors to an existing art work.But i fail to think of how i can save the contents(the entire draw-board after applying colors) of the dynamically created content.. any help is greatly appreciated!

thanks a ton!

Drag And Drop Create A Card With Save ?
how would one create a drag and drop card creator with option to save (using php)?

is there a tutorial somewhere that I am missing?

Edit And Create Xml File And Save Changes With Code
I would like to edit an existing xml file on the server with a swf ie -add/remove nodes add an object to a node.
I would also like to find out how I can create a swf with code and save it to a server so any other swf could use it(or the same one).

Any suggestions

NEED INPUT STAT:calculation In A String - Then Eventually Calculate
Hi all... again,

// I HAVE to store this in a string.
var theproblem:String = "(Stage.height-aninstance._height)/2"

Eventually, I want to call that string and be able to calc it (to a number because it will end up to be an attribute value).
I tried loads of eval() and/or Number() combinations but all of them end up in NaN or undefined.

I really need some input on this.

Thanks all

Tab Selections?
Is there any way of gettin around this issue? When you load this flash site and hit the "tab" key on the keyboard it kind of jumbs from object to object selecting it with a thick yellow line? What did i do wrong and how do I get rid of this? Thanks...

Selections Box?
How can I make one of those drop down selection boxes just like a regular web site?

Scene Selections
i am trying to make a button jump to the previous scene and nothing seems to be working.

on(release) {
_root.gotoAndPlay("Scene 1", 1);
}

doesnt work.

then i tried naming the frames and doing it that way

on(release) {
_root.gotoAndPlay("p8", 1);
}

doesnt work.

can anyone tell me whats wrong?

Need Code For Emailing Selections
I want to have some combo box component selections emailed when the person clicks submit, I just want it emailed to me. Dont want to use CGI or other.

Any suggestions?

Combo Box And Multiple Selections
Hey all. Ok, I'm working with a combo box, and I have it set to multiple. Now one would assume that you could scycle through the items in the combo box and see if an item's been selected, but I see no method for that. Also, if I select multiple items and use the getSelectedIndex, it only returns the LAST item selected.

How do you get the index of ALL items that were selected?

Random Selections From An XML File
OK here goes. I have an XML file being loaded into flash(MX) see the sample below.


Code:
<tarot>
<card img="images/fool.jpg " name="The Fool">
<ExternalMeaning meaning=" Space before a decision or choice is made. A new cycle is about to begin that the seeker will enter inexperienced. New and endless possibilities. " />
<EsotericMeaning meaning=" The spirit of Aether. The limitless energy of spirit. Folly. Idea. " />
<Energys meaning=" Air " />
</card>
<card img="images/magician.jpg " name="The Magician">
<ExternalMeaning meaning=" Will and determination to see an idea or project though. Skill to organize and direct. Concentration and Control. Desires fulfulled by a strong will and the ability to utilize one's innate faculties to their fullest advantage. Originality and invention. " />
<EsotericMeaning meaning=" The magus of power. Creative focused attention. Will. Craft. " />
<Energys meaning=" Mercury " />
</card>


I can parse the XML file ok to show the picture and meanings for one card, I can use buttons to loop through all cards, but what I am trying to do is pick 3 random cards from the full XML file(78 cards)
and display them.

Can this be done?

Any help would be great!

Multiple Choice Selections
I'm working an a multiple choice question in Flash MX 2004 and I'm wondering if any of you know if there is a way to toggle on and off a selection.

Meaning. When they select "answer 2" and then "answer 3" they can click on "answer 2" again to make the selection box around it disappear. When they click the done button they will get there feedback. I can't remember how to toggle on and off movie clips with the true and false values.

[F8] Preventing Repeat Selections
Hello all. The following is some code to have movie clips randomly loaded into the main movie. How would I go about making it so that once a certain number out of the range was selected, it would not be repeated. That is to say, if the movie clip mcExercise2 has been loaded, it will never happen again, it will select a different number because "2" has already been used.


Code:
var nExerciseCount:Number = 0;


function randRange(min:Number, max:Number):Number {
var randomNum:Number = Math.floor(Math.random()*(max-min+1))+min;
return randomNum;
}
for (var i = 0; i<100; i++) {

}

function displayExercise():Void {
mcExercise.removeMovieClip();
this.attachMovie("mcC1Exercise"+randRange(1, 3), "mcExercise", this.getNextHighestDepth());
mcExercise._x = 410;
mcExercise._y = 270;

for(i=0; i<5; i++) { }
if(nExerciseCount <= 3) {
nExerciseCount++;
trace(nExerciseCount);
}

else {
mcExercise.removeMovieClip();
gotoAndPlay("C1A_End");
}
};


Any input or advice is most welcome. Thanks...

[F8] Multiple Selections In A ComboBox
Hi there!

Is it possible to make multiple selections in a ComboBox ?
i.e. make n consecutive selections and store them in an array
or make n selections in the open list of the CB by using (for example) the click-Shift Key keystroke

Purpose is to allow the user to select multiple different issues of a magazine with a maximum ease of use...
(Code I use is attached below)

Many thanks for your help!

Best regards,
Gerry


Code:
//import mx.controls.ComboBox; // imported in Parameters --> first frame
//----------------
CBBUY.addItem("Choose your issues...", "");
var myMainIssues = new LoadVars();
myMainIssues.onLoad = function() {
issues_array = this.myissues.split(";");
issuesdata_array = this.myissuesdata.split(";");
for (i = 0; i < issues_array.length; i++) {
CBBUY.addItem(issues_array[i], issuesdata_array[i]);
}
};
myMainIssues.load("Issues/issues.txt");
var CBBUYListener:Object = new Object();
CBBUYListener.change = function(evt:Object) {
// This will ouput the label of the selected item
var mainissues = new LoadVars();
mainissues = evt.target.selectedItem.label;
if (mainissues != "") {
// HERE I NEED TO PUSH EACH SELECTION TO A NEW ARRAY
// FOR STORING A LIST OF THE LABELS OF THE SELECTED ISSUES
// (LIST WHICH I CAN DISPLAY LATER IN ORDER SUMMARY
// AND USE AS A RECAP IN THE BILL)
trace(mainissues); // ??
}
// This will ouput the data of the selected item
var mainissuesData = new LoadVars();
mainissuesData = evt.target.selectedItem.data;
if (mainissuesData != "") {
// HERE I NEED TO PUSH EACH SELECTION TO A NEW ARRAY
// FOR STORING THE DATA OF THE SELECTED ISSUES
// (LIST WHICH I CAN USE LATER FOR COMPUTING THE AMOUNT
// OF THE PURCHASE)
trace(mainissuesData); // ??
}
};
CBBUY.addEventListener("change", CBBUYListener);

Track User Selections
I am building a type of quiz about insurance fraud, and i need to be able to track which button the user selects, store that in an array which is later used to direct the person to "you're a fraud" or "you're a fraud fighter" page. Any help would be appreciated.

How Can I Allow Multiple File Selections ?
I used FileReference's browse function,
But it's only can select one file at the same time.
How can I allow multiple file selections ?
Thanks a lot.

Multiple Selections In A ComboBox
Hi there!

Is it possible to make multiple selections in a ComboBox ?
i.e. make n consecutive selections and store them in an array
or make n selections in the open list of the CB by using (for example) the click-Shift Key keystroke

Purpose is to allow the user to select multiple different issues of a magazine with a maximum ease of use...
(Code I use is attached below)

Many thanks for your help!

Best regards,
Gerry










Attach Code

//import mx.controls.ComboBox; // imported in Parameters --> first frame
//----------------
CBBUY.addItem("Choose your issues...", "");
var myMainIssues = new LoadVars();
myMainIssues.onLoad = function() {
issues_array = this.myissues.split(",");
issuesdata_array = this.myissuesdata.split(",");
for (i = 0; i < issues_array.length; i++) {
CBBUY.addItem(issues_array[i], issuesdata_array[i]);
}
};
myMainIssues.load("Issues/issues.txt");
var CBBUYListener:Object = new Object();
CBBUYListener.change = function(evt:Object) {
// This will ouput the label of the selected item
var mainissues = new LoadVars();
mainissues = evt.target.selectedItem.label;
if (mainissues != "") {
// HERE I NEED TO PUSH EACH SELECTION TO A NEW ARRAY
// FOR STORING A LIST OF THE LABELS OF THE SELECTED ISSUES
// (LIST WHICH I CAN DISPLAY LATER IN ORDER SUMMARY
// AND USE AS A RECAP IN THE BILL)
trace(mainissues); // ??
}
// This will ouput the data of the selected item
var mainissuesData = new LoadVars();
mainissuesData = evt.target.selectedItem.data;
if (mainissuesData != "") {
// HERE I NEED TO PUSH EACH SELECTION TO A NEW ARRAY
// FOR STORING THE DATA OF THE SELECTED ISSUES
// (LIST WHICH I CAN USE LATER FOR COMPUTING THE AMOUNT
// OF THE PURCHASE)
trace(mainissuesData); // ??
}
};
CBBUY.addEventListener("change", CBBUYListener);

Datagrid Multiple Selections
How do i go about dealing with multiple selections within a datagrid?

Any tutorials or examples.

Thanks

Dave

Can You Record Selections As A Rythem?
I am working on a rhythm project where I am coding something where I have several buttons on a screen that need to be pressesed at any time and have that action recorded in time so i can loop it and have the rhythm played back. Is this possible to do in actionscript and if so how is it possible?

The idea behind this is that people can click boxes to make a sound and create rhythm patterns out of it and when they are happy with the music they made, then they can watch visuals created by that music. So I would need to have the selections not only play back in time as they were entered, but also have it be able to trigger events.

Thanks in advance.

JJS

Multiple Selections In A ComboBox
Hi there!

Is it possible to make multiple selections in a ComboBox ?
i.e. make n consecutive selections and store them in an array
or make n selections in the open list of the CB by using (for example) the click-Shift Key keystroke

Purpose is to allow the user to select multiple different issues of a magazine with a maximum ease of use...
(Code I use is attached below)

Many thanks for your help!

Best regards,
Gerry


Code:
//import mx.controls.ComboBox; // imported in Parameters --> first frame
//----------------
CBBUY.addItem("Choose your issues...", "");
var myMainIssues = new LoadVars();
myMainIssues.onLoad = function() {
issues_array = this.myissues.split(";");
issuesdata_array = this.myissuesdata.split(",");
for (i = 0; i < issues_array.length; i++) {
CBBUY.addItem(issues_array[i], issuesdata_array[i]);
}
};
myMainIssues.load("Issues/issues.txt");
var CBBUYListener:Object = new Object();
CBBUYListener.change = function(evt:Object) {
// This will ouput the label of the selected item
var mainissues = new LoadVars();
mainissues = evt.target.selectedItem.label;
if (mainissues != "") {
// HERE I NEED TO PUSH EACH SELECTION TO A NEW ARRAY
// FOR STORING A LIST OF THE LABELS OF THE SELECTED ISSUES
// (LIST WHICH I CAN DISPLAY LATER IN ORDER SUMMARY
// AND USE AS A RECAP IN THE BILL)
trace(mainissues); // ??
}
// This will ouput the data of the selected item
var mainissuesData = new LoadVars();
mainissuesData = evt.target.selectedItem.data;
if (mainissuesData != "") {
// HERE I NEED TO PUSH EACH SELECTION TO A NEW ARRAY
// FOR STORING THE DATA OF THE SELECTED ISSUES
// (LIST WHICH I CAN USE LATER FOR COMPUTING THE AMOUNT
// OF THE PURCHASE)
trace(mainissuesData); // ??
}
};
CBBUY.addEventListener("change", CBBUYListener);

Creatig Multiple Selections From XML And AS
Hello,

I am a Learning assessment tool which I inherited the code for. It was done it AS3 and Flash CS3. The application pulls in an XML file that contains 50 questions and Answers, with a time limit of 60 minutes. Everything works great, but I would like to make some modifications. What I would like to do is create two (2) segments of 25 Questions each, and I time limit of 30 minutes per segments. The XML file is easy enough to alter. It would be something like this.


Code:
<?xml version="1.0" encoding="utf-8"?>
<EXAM>
<SYSTEM>
<TITLE>HNLS BT Entrance Exam Section 1</TITLE>
<MINUTES>30</MINUTES>
<RETAKEPW>321owl</RETAKEPW>
<URL>dataTransfer.php</URL>
</SYSTEM>
<TEXT>
<SECTION id="1">
<PROBLEM id="1">
<QUESTION>Protein is digested by gastric, pancreatic, and small intestinal enzymes called:</QUESTION>
<CHOICE letter="a">amylases.</CHOICE>
<CHOICE letter="b">lipases.</CHOICE>
<CHOICE letter="c">nucleases.</CHOICE>
<CHOICE letter="d" correct="true">proteases.</CHOICE>
</PROBLEM>
<PROBLEM id="2">
<QUESTION>Proteins are broken down into:</QUESTION>
<CHOICE letter="a">glycerol and fatty acids.</CHOICE>
<CHOICE letter="b">oligosaccharides.</CHOICE>
<CHOICE letter="c" correct="true">peptides and amino acids.</CHOICE>
<CHOICE letter="d">proteases and lipases.</CHOICE>
</PROBLEM>



</SECTION>
<SECTION id="2">
<PROBLEM id="1">
<QUESTION>Protein is digested by gastric, pancreatic, and small intestinal enzymes called:</QUESTION>
<CHOICE letter="a">amylases.</CHOICE>
<CHOICE letter="b">lipases.</CHOICE>
<CHOICE letter="c">nucleases.</CHOICE>
<CHOICE letter="d" correct="true">proteases.</CHOICE>
</PROBLEM>
<PROBLEM id="2">
<QUESTION>Proteins are broken down into:</QUESTION>
<CHOICE letter="a">glycerol and fatty acids.</CHOICE>
<CHOICE letter="b">oligosaccharides.</CHOICE>
<CHOICE letter="c" correct="true">peptides and amino acids.</CHOICE>
<CHOICE letter="d">proteases and lipases.</CHOICE>
</PROBLEM>



</SECTION>
</TEXT>
</EXAM>
what I need help with is the code where a user can choose which section they want to take in order to complete the test. The current AS which should allow for multiple selections is this.


Code:
package exam {

import flash.events.*

//Custom Event class that sends up the number of sections in the loaded XML. If more than one, user will
//need to select the section they want to take before exam proceeds.
internal class MultiSectEvent extends Event {
public static const SECTIONS:String = "sections";
public var sectionCount:Number;
public var systemVar:Object;

//CONSTRUCTOR
public function MultiSectEvent (type:String, sCount:Number, systemVars:Object, bubbles:Boolean=false,
cancelable:Boolean=false) {
//pass to superclass' constructor (Event)
super(type, bubbles, cancelable);

//add section count so listeners know number of sections
sectionCount = sCount;
systemVar = systemVars;
}

//custom Event class, so MUST override clone().
public override function clone():Event {
return new MultiSectEvent(type, sectionCount, systemVar, bubbles, cancelable);
}

//custom Event class, so MUST override toString().
public override function toString():String {
return formatToString("MultiSectEvent","type","bubbles","cancelable","eventPhase","sectionCount",
"systemVar");
}
}

}
right now this does not work and the application breaks.

Displaying Array Selections
I'm not that knowledgeable with AS, but what I'm trying to do is display my selections from an array. Basically, there are some checkboxes -- from there the user ticks a few boxes, submits their preference and then the system tells them what they have chosen and acts accordingly.

In this case, the reason there is an array is because the user is selecting which videos they want to watch, and the videos will then play after each other, once one of the videos has come to an end.

At the minute, initially the array is set up, the user ticks the boxes, submits, then their options are added to the array. I'm having difficulty looping through the array to find only the values that have been chosen. Any pointers?

How To Create A Htmlbutton To Download Like "SAVE TARGET AS"
how to create a button possible to download like "SAVE TARGET AS"?

html-like just in flash?

thanks

URGENT Need To Create A "SAVE AS" Style Popup
I need to create a popup for a flash movie in the "SAVE AS" style. how can i do that? this is very urgent!!!!

Many thanks and sorry for the hurry

Adding Prices Between Combo Box Selections
Looking for any and all help in getting this to work. What I'm trying to do is have a few combo boxes, each Combo box would have a couple selections in it with prices. As the user makes a selection from each of the box the final total is calculated. For example, consider an aquarium set up package.

Box 1: Tank Size (options: 5gallon $5.00, 10gallon $10.00)
Box 2: Filter (options: Basic $10.00, Intermediate $20.00, Advanced $30.00)
Box 3: Lights (options: Incandescant $10.00 , Fluorescent $20.00)

So, the user makes a selection out of box 1 and picks a 5 gallon tank, and the total displays $5.00. they select Basic from box2, and the total now displays $15.00, and so on.

The dollar sign isn't critical as that can be a graphic on the page.

Displaying Variable Text Selections
I am trying to create a form in Flash.
I have attatched a jpg example of what i want to do to explain it better. I need some script on the 'add' button that will display all the variable selections the user just made in the text field below. Ultimately, I want the user to then be able to order the same shirt in a different size.

I had a bit of a search but i could really sum up in a sentence what i am trying to do(hence the weird subject title)

Lil Help? Components, Textfield Selections, And Focus (oh My)
i may've backed myself into a corner, i think.

i'm working on a lite html editor.. i have an input and output/preview textarea: one's regular text, one's html. i'm loading an external stylesheet and throwing the styles into the combobox, and using the combobox elements' data to create span tags with the class set as the selected element's data value.

the only problem is, i'm having trouble figuring out how to keep track of selection focus, down in the input box. i have other buttons for inserting bold, italic, etc tags around the selection, and functions for setting the selection parameters to variables onRollOver for the buttons. it works nicely.. when a button's clicked, focus shifts back to the input field, the original text is selected, no problem.

with the combobox, however, i can't find any reference to a way to keep track of rollover?? is there some alternate way to set the selection parameters before focus on the input textField is lost? i tried adding a listener to combobox.open().. focus is already lost. is there a way to set the selection parameters upon selecting the text? i've looked around pretty thoroughly and can't seem to find anything that quite solves this problem. any info would be much appreciate, thanks


e:// whoops.. mx 2004

[F8] PHP Mailform Not Sending Checkbox Selections
I'm currently using the BigJolt mailform I found in the tutorials on Flashkit. I've implemented it into my movie and everything works great, until I add checkboxes.

I have 5 Checkboxes that I need to know when they are checked. The 5th box is an 'Other' checkbox, with a textbox next to it to describe the 'Other' checkbox

Here's my somewhat modified code in PHP.


PHP Code:




<?  

/******************************************************
**
**   PHP Mailer 2.0   
**
**   This script is easy to configure. Just change the variables below to
**    suit your environment and PHP does the rest!
**
**   http://www.bigjolt.com
**   
*******************************************************/

/*******************************************************

Enter your site details below!

*******************************************************/

// Enter your contact email address here
$adminaddress = "us@us.com";

// my email
$myemail = "me@me.com";

// Enter the address of your website here include http://www.
$siteaddress ="http://www.site.com";

// Enter your company name or site name here
$sitename = "name";

// Enter the name of the company contact
$owner = "name";

/*******************************************************

No need to change anything below ...

*******************************************************/

// Gets the date and time from your server
$date = date("m/d/Y H:i:s");

// Gets the IP Address
if ($REMOTE_ADDR == "") $ip = "no ip";
else $ip = getHostByAddr($REMOTE_ADDR);

//Process the form data!
// and send the information collected in the Flash form to Your nominated email address
if ($action != ""):
mail("$myemail","Quote Submission",
"A visitor at $sitename has left the following information
First Name: $name
Company: $company
Email: $email
Phone: $phone
Current Website: $current_site
The visitor would like a quote on the following:
------------------------------------------------------

The visitor commented:
------------------------------
$comments

Logged Info :
------------------------------
Using: $HTTP_USER_AGENT
Hostname: $ip
IP address: $REMOTE_ADDR
Date/Time:  $date","FROM:$adminaddress");

//This sends a confirmation to your visitor
mail("$email","Thank You for visiting $sitename",
"Hi $name,
Thank you for your interest in $sitename! A representative is reviewing your request and will contact you within 1-2 business days.
Thank you,
$sitename
$siteaddress","FROM:$adminaddress");

//Confirmation is sent back to the Flash form that the process is complete
$sendresult = "Thank you for visiting <a href = "$siteaddress" target = "_blank"><u>$sitename</u></a>. You will receive a confirmation email shortly. ";
$send_answer = "answer=";
$send_answer .= rawurlencode($sendresult);
echo "$send_answer";

endif;

?>








How would I list the results of their checked boxes under this section of the email:

Code:
The visitor would like a quote on the following:
------------------------------------------------------


What actionscripting needs to be done?

Thanks in advance!

Multiple Video Selections From 1 Page?
Hello Everyone,
I very much need to come up with a solution to be able to have a list of available videos with a player embedded on my website pretty much along the lines of what is shown here:

http://www.kookscustomheaders.com/video.php

I have Flash CS3 but frankly I'm overwhelmed by it.
Does anyone know if there is a pre-packaged application or open source player available to do something like this?


Thank you very much for any help!

Filtering XML Data From Different Component Selections
I wanted to ask wich components in flash would be the best choice for this project, and would be easiest to program to achieve the desire effect?

I have started this project and used for my filter categories a LIST component, I made them filter correctly and added multiple selection. Now the time has come to filter the cards based on the two LIST component selections, not just one, and this is the place where I stopped. What concept should I use to make my XML filter based on selections from two different LIST components?

So I'm thinking maybe there is the easier way to do this than several list components. Maybe a DATA GRID?
Thnx.

To better understand my question here is the application itself http://milancvetkovic.50webs.com/CardCatalogue.html
And the code behing it:

PHP Code:




import fl.data.DataProvider;

var tError:String = "For some reason the content could not be loaded. We are sorry for the inconvenience";
var tErrorHolder:TextField = new TextField();
tErrorHolder.visible = false;
tErrorHolder.x = 200;
tErrorHolder.y = 50;
tErrorHolder.autoSize = TextFieldAutoSize.CENTER;
addChild(tErrorHolder);

var xmlLoader:URLLoader = new URLLoader();// kreiramo novi LOADER za XML
var xmlURL:URLRequest = new URLRequest("tblCard.xml");// kreiramo novi URL REQUEST
xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);// dodajemo LOADERu slusac dogadjaja
xmlLoader.addEventListener(IOErrorEvent.IO_ERROR, loadError);
xmlLoader.load(xmlURL);// ucitavamo vrednost URL REQUESTa kao argument funkcije LOAD

var cardsXML:XML = new XML();// kreiramo novi XML objekat
cardsXML.ignoreWhitespace = true;// podesavamo mu svojstvo igonrisanja praznih linija

function loadError(evt:IOErrorEvent):void {
    tErrorHolder.visible = true;
    tErrorHolder.text = tError;
}

//xmlLoaded funkcija koja ce biti pozvana nakon LOAD COMPLETE dogadjaja - ucitavanja podataka
function xmlLoaded(evt:Event):void {
    cardsXML = XML(xmlLoader.data);

    var aEdition:Array = new Array();// Ovde definisemo niz u koji cemo ugurati nase XML podatke
    for (var edition:String in cardsXML.tblEdition) {
        var editionName:String = cardsXML.tblEdition[edition].txtEdition;// dodeljujemo privremenu promenljivu u kojoj cemo sacuvati ime kategorije
        aEdition.push(editionName);// uguravamo ovu promenljivu uz pomoc metoda PUSH u niz
    }

    var dpEdition:DataProvider = new DataProvider(aEdition);// Ovde dodeljujemo vrednost koja je OBJEKAT u nasem slucaju NIZ, i to nakon sto smo ga izgradili u FOR LOOPu
    liEdition.dataProvider = dpEdition;
    liEdition.allowMultipleSelection = true;

    var aCondition:Array = new Array();
    for (var condition:String in cardsXML.tblCondition) {
        var conditionName:String = cardsXML.tblCondition[condition].txtCondition;
        aCondition.push(conditionName);
    }
    var dpCondition:DataProvider = new DataProvider(aCondition);
    liCondition.dataProvider = dpCondition;
    liCondition.allowMultipleSelection = true;
}

// Ova funkcija ce izvrsavati ucitavanje Karti nakon klika na LIST komponentu i odgovarajucu kategoriju
function selectEdition(evt:Event):void {

    var drzacSelekcije:Array = new Array();
    drzacSelekcije = evt.target.selectedIndices;// Niz koji cuva indexe visestrukih selekcija
    //trace("Drzac Selekcije= " + drzacSelekcije);

    var aCards:Array = new Array();// Niz koji ce sadrzati imena odgovarajucih karata i posluziti kao DP za Listu Cards
    var karta:String;// zaprav ime same karte koje ce biti ubaceno u aCards Niz u toku FOR LOOPa
    for (var card:String in cardsXML.tblCard.intCardID) {// LOOPujemo kroz sve brojeve karata intCardID
        //trace("Karta= " + card);
        for (var i:int = 0; i < drzacSelekcije.length; i++) {
            //trace("Index Drzaca["+i+"]= " + drzacSelekcije[i]);
            if (drzacSelekcije[i] == cardsXML.tblCard[card].intEditionID-1) {// Uporedjujemo Index klika sa brojem edicije od koga oduzimamo 1 jer nemamo 0 ediciju
                karta = cardsXML.tblCard.txtCardName[card];
                //trace(cardsXML.tblCard.intEditionID);
                aCards.push(karta);
            }
        }
    }
    //trace(aCards);
    var dpCards:DataProvider = new DataProvider(aCards);
    liCards.dataProvider = dpCards;
}
liEdition.addEventListener(Event.CHANGE, selectEdition);

function selectCondition(evt:Event):void {
    var drzacSelekcije:Array = new Array();
    drzacSelekcije = evt.target.selectedIndices;
    //trace("drzac= " + drzacSelekcije);    
    
    var aCards:Array = new Array();
    for (var card:String in cardsXML.tblCard.intCardID) {
        //trace(cardsXML.tblCard[card].intConditionID);
        for (var i:int = 0; i < drzacSelekcije.length; i++) {
            if (drzacSelekcije[i] == cardsXML.tblCard[card].intConditionID-1) {
                var karta:String = cardsXML.tblCard[card].txtCardName;
                //trace("card= "+card);
                aCards.push(karta);
                //trace(karta);
            }
        }
    }
    //trace(aCards);
    var dpCards:DataProvider = new DataProvider(aCards);
    liCards.dataProvider = dpCards;
}
liCondition.addEventListener(Event.CHANGE, selectCondition);







The XML is rather large so I'm giving the basic structure of it:

PHP Code:




<dataroot>
    <tblCard>
        <intCardID>NUMBER</intCardID>
        <txtCardName>TEXT</txtCardName>
        <intQuantity>NUMBER</intQuantity>
        <tblEditionID>NUMBER</tblEditionID>
        <tblColorID>NUMBER</tblColorID>
        <tblConditionID>NUMBER</tblConditionID>
    </tblCard>

    <tblColor>
        <intColorID>NUMBER</intColorID>
        <txtColor>TEXT</txtColor>
    </tblColor>

    <tblCondition>
        <intConditionID>NUMBER</intConditionID>
        <txtCondition>TEXT</txtCondition>
    </tblCondition>

    <tblEdition>
        <intEditionID>NUMBER</intEditionID>
        <txtEdition>TEXT</txtEdition>
    </tblEdition>

</dataroot>

Involking Browse() And Limiting # Of Selections
I'm creating a file upload ap. I need to limit the number of files selected from the file-browsing dialog box to just one. Would someone know how I go about doing this?

ActionScript Code:
//button event for the browse button
browseButn.clickHandler = function () {
  //The browse function displays a file-browsing
  //dialog box in which the user can select a local file to upload
  fileRef.browse([{description:fileDescription,extension:fileExtension}]);
}

Thanks!

Dynamic Text Field Selections
Here's the dealio,

I am trying to create dynamic selections of textfields. My current ideas for codes is this

newSel= setInterval(select, 1);
function select() {
Selection.setFocus("txtField");
Selection.setSelection(beginingOfFirstVisibleLine, endOfLastVisibleLine);
}

Does anyone know if there is a predefined properties in MX or MX2004 that will allow me to do this?

Generating A Page Based On The Selections
Ok,

So my last post got no help, so here is something that maybe someone out there can help me with. I have been google'n for days and cannot find this done anywhere.

I would like a user to select an item from a combo box.
then a list populates from that selection into a datagrid.
the user would then select a choice from the data grid
The selection that the user makes would be a link and would take them to another page in the same window _self or a seperate window. I dont really care.

Pretty simple i think , but i just cannot figure it out.
please please please someone help.

I could really use it .

I have the PHP code and the databases working i just dont know how to make that content clickable in the data grid.

Thanks
CH

Email Form With Drop Down Selections
Hi,
i'm looking for an email form that has a drop down menu in it and also certain items have to be filled in..
Anyone got anything like that please??

Random Frame/image Selections
In the 3rd frame of my main timline, lies a MC, in the MC is a code:
Quote:




onClipEvent (load) {
this.gotoAndStop (Math.ceil (Math.random() * this._totalframes))
}




In the MC, there is as well 5 frames, with diffrent images in each. It used to work fine. Everytime it reloaded, a diffrent image would appear. Now I put a pre loader and shift the whole animation 3 frames up, and now it goes psycho rave on me, and dosent changing.

Thanks for the help!

here is the .fla :http://www.pacific-emarket.com/speci.../html/test.rar
And here is the example of it going crazy: http://www.pacific-emarket.com/speci...volunteers.htm
Thanks again!

Keeping Radio Button Selections Selected
How do I do this?
I have radio buttons in scene1. I go to scene2, then return to scene 1 and my selection has gone.
Does making a MC _visible=false erase my selections?

Copyright © 2005-08 www.BigResource.com, All rights reserved