Flash Form - Problem With DateField And NumericStepper
Hi,
i am using loadVars to gather form data and send it to the formmail cgi on the server. This works fine for all textfields and comboboxes, but not the dateFields or numericSteppers, they always appear as "undefined". I reckon its a problem with how those values are stored and how i am reading them out?
AS:
formdata = new LoadVars();
formdata.fCompany = this._parent.fCompany.getText(); <- these work
formdata.fHistory3 = this._parent.fHistory3.getValue();<- this is a numericstepper and doesn't work
formdata.fDecDate = this._parent.fDecDate.getValue();<- this is a datefield and doesn't work
formdata.send("http://www.uniqueresorts.co.uk/cgi-bin/cgiemail/form.txt" , "", "POST");
Appreciate any help,
Seb
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 02-23-2006, 06:28 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Contact Form With DateField
I hope someone can help me with this because I can't get it to work myself. I have created an contact form with Flash and in this form there is a Datefield and I want the value of this Datefield to be send to my email by php. I can't figure it out how I can set the selected date to an variable which can be send by php, perhaps someone can me? (the rest of the contact form works fine)
Thanks in advance,
Remco
How Do I Pull Selected Date From The DateField Component & Send It To PHP Mail Form?
ok.. after searching and finding no luck.. or answers... i'm not too sure i'll get one either, but i figured i ask anyway...
I created a form, that has a DateField component in it, so basically a client can choose their desired deadline date for a project. When they complete the form, and hit send, the goal, is to have all the info they entered passed to PHP which will generate an email an send it along to me. The problem i'm having, is figuring out HOW to pull the date the user selects from the component, and pass it to PHP... any ideas?....
Quick side note:
I'm beginning to think that NO ONE EVER uses this component because after searching all over the web, and every Flash forum i know of... NO ONE seems to know how to do this...(which makes it pretty useless if you ask me) So what do people do to get information like this???
thanks in advance
NumericStepper Component (Flash Prof 2004 )
How can i disable the user from physically modifying the textbox in the NumericStepper Component? I just want them to be able to increase or decrease the value using the up and down buttons.
The problem i seem to be getting is that if the user clicks in the textbox, changes the value, the value that is returned IS NOT the value they changed it to BUT the initial value when they clicked inside the textbox. Hence the need to disable it.
Thanks.
[F8] Verify Value In NumericStepper
Greetings,
I'm trying to put together a quick simulation/tutorial for registering one of our products. I've got 7 input text fields and 6 numeric steppers inside a movie clip. I need to verify that the student entered in the correct values/data when they click the "register" button. If they enter the correct information, they go to a final screen. If they enter the wrong information, they get an error message. I've got the text fields figured out, but can't figure out how to do the NumericSteppers. Here is what I've got that works for the text fields:
code: this.bRegister.onRelease = function():Void {
if (SiteName_txt.text == "SKC" && Description_txt.text == "Savi Knowledge Center"
&& FirstName_txt.text == "John" && LastName_txt.text == "Doe" && Unit_txt.text == "Training"
&& PhoneNo_txt.text == "4085551234" && Email_txt.text == "johndoe@savi.com") {
_root.attachMovie("smaMainRegistered", "finish", _root.getNextHighestDepth());
_root.finish._x=400.0;
_root.finish._y=300.0;
_root.attachMovie("GoodJob", "Good", _root.getNextHighestDepth());
_root.Good._x=400.0;
_root.Good._y=300.0;
}
else {
_root.attachMovie("error", "error", _root.getNextHighestDepth());
_root.error._x=550.0;
_root.error._y=90.0;
}
};
I've tried adding the following to the if statement: code: && latDegree.NumericStepper == 37 and code: && latDegree.NumericStepper == "37" When I enter either one of these to test it on the numericstepper with latDegree instance name, it brings up my error message no matter what value I enter in the stepper. Any thoughts/advice welcome.
Thanks!
NumericStepper Under A Mask
Hi,
Anybody has an idea as to how i can use a numericStepper inside a masked clip? I know dynamic text fields / input fields will not show up unless i embed the font and i suppose the problem with numericStepper component is of similar nature as it uses device fonts.
I can probably figure out a way to get by without the stepper, but hopefully somone out here knows a way.
Whaddyasay?
Problem With NumericStepper
In my application there is one button which popup one window on its press event.
now this window has two numericStepper named as
"start_mix" & "end_mix"
and I has applied "change" listener to both the component.
now problem is that when i close window component at that time the "change" listener of 2nd numericStepper (end_mix) is called automatically.
I have also put trace(end_mix.value) in its "change" listener function but which shows wrong value.
plz help me. I am not getting how this function called automatically.
Thanks
NumericStepper - Instant Action
we have:
-one button
-one label
-one NumericStepper
button code:
Code:
on (release) {
label1.text=stepper.value;
}
How can i make, when changing the value of NumericStepper, the label to get instantly the value of NumericStepper, without pressing the button?
ComboBox NumericStepper Conflict. HELP
The scenario is this:
Two separate movieclips. Movie1 has the combobox component, Movie2 has the numericstepper component.
Two buttons on the stage:
button1.onRelease attaches Movie1.
button2.onRelease attaches Movie2.
If I push button1 the combobox is shown correctly. But if I push button2 after I pushed button1, the value of the numericstepper in Movie2 is not visible. The numericstepper is simply blank. Worth mentioning is the fact the the numericstepper still works, as in it still changes the value as it should.
However, if I push button2 the first time, the numericstepper is displayed correctly. But if I push button1 and then button2 again, the value of the numericstepper disappears.
If I remove the combobox from movie2, the issue disappears and the numericstepper behaves as it should no matter how many I display Movie2 before I display Movie1.
This issue is beyond me so I'd really appreciate some help on this.
Thanks.
RemoveChild()/NumericStepper Issue
Hi guys,
When I use this simple code:
ActionScript Code:
import fl.controls.TextInput;
optionsStepper.addEventListener(Event.CHANGE, onOptionsChange);
var xIndex=15;
var yIndex=35;
var optionField:Array = new Array();
for (var i:int = 0; i < optionsStepper.value; i ++) {
optionField[i] = new TextInput();
optionField[i].x=xIndex;
optionField[i].y=yIndex;
addChild(optionField[i]);
yIndex+=25;
}
function onOptionsChange(e:Event) {
xIndex=15;
yIndex=35;
for (i = 0; i < optionField.length; i++) {
removeChild(DisplayObject(optionField[i]));
}
for (i = 0; i < optionsStepper.value; i ++) {
optionField[i] = new TextInput();
optionField[i].x=xIndex;
optionField[i].y=yIndex;
addChild(optionField[i]);
yIndex+=25;
}
}
It keeps giving the error
Code:
Error #2025: The supplied DisplayObject must be a child of the caller.
The error occurs when lower the value of the NumericStepper twice, i can infinitely higher the value of the NumericStepper.
Help very much appreciated,
Tilpo
NumericStepper/ComboBox Problems
Hello. I have a learning interaction that utilizes NumericStepper component instances as well as ComboBox instances. The file was working fine until yesterday when all of a sudden the text field that displays users' selections no longer does so. Any ideas about how these components suddenly "broke"? Is there a way I can fix this?
Thanks
[flash8] NumericStepper Problem
Hi!
Currently im developing an application where a user can create his own e-card. Im having a problem with the numericStepper component when trying to increase the font for the first time.
I set a maximum of 125 and a minimum value of 10. When a user clicks on a textfield the numericStepper gets the value of the current size of the text in the textfield.
If the user tries to increase the font for the first time...the numericStepper suddenly jumps to it's max value, instead of jumping 1 value up. When the user continues editing the problem no longer consists..so it happens only the first time when increasing the font, decreasing goes well! The numericStepper is getting a value from a textfield that is being populated when a user clicks on a specific textfield. This is the code I got.
huidigveldje means in dutch(currenttextfield)
Code:
var commentspunten:mx.controls.NumericStepper;
_root.commentspunten.minimum = 10;
_root.commentspunten.maximum = 125;
_root.commentspunten.stepSize = 1;
_root.commentspunten.enabled = true;
on (change) {
var huidigveld= _root.huidigtekstveld.text;
huidigveldje= eval (huidigveld);
_root.currentfontsize.text = this.value;
if (huidigveldje == _root.mijn_tekst_comments.Mijn_comments_txt0){
_root.fontsizelinks.text= _root.currentfontsize.text;
myTextFormat = new TextFormat();
myTextFormat.size = this.value;
_root.mijn_tekst_comments.Mijn_comments_txt0.setTextFormat(myTextFormat);
}
if (huidigveldje == _root.mijn_tekst.Mijn_txt0){
_root.fontsizerechts.text= _root.currentfontsize.text;
myTextFormat = new TextFormat();
myTextFormat.size = this.value;
_root.mijn_tekst.Mijn_txt0.setTextFormat(myTextFormat);
}
//
if (huidigveldje == _root.binnen_links.binnen_links_txt0){
_root.binnenfontsizelinks.text= _root.currentfontsize.text;
myTextFormat = new TextFormat();
myTextFormat.size = this.value;
_root.binnen_links.binnen_links_txt0.setTextFormat(myTextFormat);
}
}
Thnx M
[FLEX] Using NumericStepper In DataGrid
I have this code for uploading files to a PHP-script. It works fine when I place my NumericStepper(id="sida") outside the DataGrid but when I try to put it inside, Flex can't find the property "sida". What code goes where to solve this, anyone?
Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:com="*" headerHeight="8"
layout="vertical" width="100%" minWidth="400" height="100%" minHeight="200"
borderColor="#F1F1F1" themeColor="#A7A7A7" color="#000000" backgroundColor="#F1F1F1" creationComplete="initCom();">
<mx:Metadata>
[Event(name="uploadComplete", type="flash.events.Event")]
[Event(name="uploadProgress", type="flash.events.ProgressEvent")]
[Event(name="uploadCancel", type="flash.events.Event")]
[Event(name="uploadIOError", type="flash.events.IOErrorEvent")]
[Event(name="uploadSecurityError", type="flash.events.SecurityErrorEvent")]
</mx:Metadata>
<mx:Script>
<![CDATA[
import mx.controls.*;
import mx.managers.*;
import mx.events.*;
import flash.events.*;
import flash.net.*;
import mx.collections.ArrayCollection;
//Vilken sida
[Bindable]
private var value:Number;
private var _strUploadUrl:String;
private var _refAddFiles:FileReferenceList;
private var _refUploadFile:FileReference;
private var _arrUploadFiles:Array;
private var _numCurrentUpload:Number = 0;
// Set uploadUrl
public function set uploadUrl(strUploadUrl:String):void {
_strUploadUrl = strUploadUrl;
}
// Initalize
private function initCom():void {
//srv.send();
_arrUploadFiles = new Array();
enableUI();
uploadCheck();
}
// Called to add file(s) for upload
private function addFiles():void {
_refAddFiles = new FileReferenceList();
_refAddFiles.addEventListener(Event.SELECT, onSelectFile);
_refAddFiles.browse();
}
// Called when a file is selected
public function onSelectFile(event:Event):void {
var arrFoundList:Array = new Array();
// Get list of files from fileList, make list of files already on upload list
for (var i:Number = 0; i < _arrUploadFiles.length; i++) {
for (var j:Number = 0; j < _refAddFiles.fileList.length; j++) {
if (_arrUploadFiles[i].name == _refAddFiles.fileList[j].name) {
arrFoundList.push(_refAddFiles.fileList[j].name);
_refAddFiles.fileList.splice(j, 1);
j--;
}
}
}
if (_refAddFiles.fileList.length >= 1) {
for (var k:Number = 0; k < _refAddFiles.fileList.length; k++) {
_arrUploadFiles.push({
name:_refAddFiles.fileList[k].name,
size:formatFileSize(_refAddFiles.fileList[k].size),
file:_refAddFiles.fileList[k]});
}
listFiles.dataProvider = _arrUploadFiles;
listFiles.selectedIndex = _arrUploadFiles.length - 1;
}
if (arrFoundList.length >= 1) {
Alert.show("The file(s):
• " + arrFoundList.join("
• ") + "
...are already on the upload list. Please change the filename(s) or pick a different file.", "File(s) already on list");
}
updateProgBar();
scrollFiles();
uploadCheck();
}
// Called to format number to file size
private function formatFileSize(numSize:Number):String {
var strReturn:String;
numSize = Number(numSize / 1000);
strReturn = String(numSize.toFixed(1) + " KB");
if (numSize > 1000) {
numSize = numSize / 1000;
strReturn = String(numSize.toFixed(1) + " MB");
if (numSize > 1000) {
numSize = numSize / 1000;
strReturn = String(numSize.toFixed(1) + " GB");
}
}
return strReturn;
}
// Called to remove selected file(s) for upload
private function removeFiles():void {
var arrSelected:Array = listFiles.selectedIndices;
if (arrSelected.length >= 1) {
for (var i:Number = 0; i < arrSelected.length; i++) {
_arrUploadFiles[Number(arrSelected[i])] = null;
}
for (var j:Number = 0; j < _arrUploadFiles.length; j++) {
if (_arrUploadFiles[j] == null) {
_arrUploadFiles.splice(j, 1);
j--;
}
}
listFiles.dataProvider = _arrUploadFiles;
listFiles.selectedIndex = 0;
}
updateProgBar();
scrollFiles();
uploadCheck();
}
// Called to check if there is at least one file to upload
private function uploadCheck():void {
if (_arrUploadFiles.length == 0) {
btnUpload.enabled = false;
listFiles.verticalScrollPolicy = "off";
} else {
btnUpload.enabled = true;
listFiles.verticalScrollPolicy = "on";
}
}
// Disable UI control
private function disableUI():void {
btnAdd.enabled = false;
btnRemove.enabled = false;
btnUpload.enabled = false;
btnCancel.enabled = true;
listFiles.enabled = false;
listFiles.verticalScrollPolicy = "off";
}
// Enable UI control
private function enableUI():void {
btnAdd.enabled = true;
btnRemove.enabled = true;
btnUpload.enabled = true;
btnCancel.enabled = false;
listFiles.enabled = true;
listFiles.verticalScrollPolicy = "on";
}
// Scroll listFiles to selected row
private function scrollFiles():void {
listFiles.verticalScrollPosition = listFiles.selectedIndex;
listFiles.validateNow();
}
// Called to upload file based on current upload number
private function startUpload():void {
if (NumericStepper(sida).value == 0 {
Alert.show("Fyll i sida!", "Du glömde fylla i några saker!");
}
else if (_arrUploadFiles.length > 0) { // lägg till else om ovan aktiveras
disableUI();
listFiles.selectedIndex = _numCurrentUpload;
scrollFiles();
// Variables to send along with upload
var sendVars:URLVariables = new URLVariables();
sendVars.action = "upload";
sendVars.value = NumericStepper(sida).value;
var request:URLRequest = new URLRequest();
request.data = sendVars;
request.url = _strUploadUrl;
request.method = URLRequestMethod.POST;
_refUploadFile = new FileReference();
_refUploadFile = listFiles.selectedItem.file;
_refUploadFile.addEventListener(ProgressEvent.PROGRESS, onUploadProgress);
_refUploadFile.addEventListener(Event.COMPLETE, onUploadComplete);
_refUploadFile.addEventListener(IOErrorEvent.IO_ERROR, onUploadIoError);
_refUploadFile.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onUploadSecurityError);
_refUploadFile.upload(request, "file", false);
}
}
// Cancel and clear eventlisteners on last upload
private function clearUpload():void {
_refUploadFile.removeEventListener(ProgressEvent.PROGRESS, onUploadProgress);
_refUploadFile.removeEventListener(Event.COMPLETE, onUploadComplete);
_refUploadFile.removeEventListener(IOErrorEvent.IO_ERROR, onUploadIoError);
_refUploadFile.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, onUploadSecurityError);
_refUploadFile.cancel();
_numCurrentUpload = 0;
updateProgBar();
enableUI();
}
// Called on upload cancel
private function onUploadCanceled():void {
clearUpload();
dispatchEvent(new Event("uploadCancel"));
}
// Get upload progress
private function onUploadProgress(event:ProgressEvent):void {
var numPerc:Number = Math.round((event.bytesLoaded / event.bytesTotal) * 100);
updateProgBar(numPerc);
var evt:ProgressEvent = new ProgressEvent("uploadProgress", false, false, event.bytesLoaded, event.bytesTotal);
dispatchEvent(evt);
}
// Update progBar
private function updateProgBar(numPerc:Number = 0):void {
var strLabel:String = (_numCurrentUpload + 1) + "/" + _arrUploadFiles.length;
strLabel = (_numCurrentUpload + 1 <= _arrUploadFiles.length && numPerc > 0 && numPerc < 100) ? numPerc + "% - " + strLabel : strLabel;
strLabel = (_numCurrentUpload + 1 == _arrUploadFiles.length && numPerc == 100) ? "Upload Complete - " + strLabel : strLabel;
strLabel = (_arrUploadFiles.length == 0) ? "" : strLabel;
progBar.label = strLabel;
progBar.setProgress(numPerc, 100);
progBar.validateNow();
}
// Called on upload complete
private function onUploadComplete(event:Event):void {
_numCurrentUpload++;
if (_numCurrentUpload < _arrUploadFiles.length) {
startUpload();
} else {
listFiles.dataProvider.removeAll();
sida.value = 0;
enableUI();
clearUpload();
dispatchEvent(new Event("uploadComplete"));
}
}
// Called on upload io error
private function onUploadIoError(event:IOErrorEvent):void {
clearUpload();
var evt:IOErrorEvent = new IOErrorEvent("uploadIoError", false, false, event.text);
dispatchEvent(evt);
}
// Called on upload security error
private function onUploadSecurityError(event:SecurityErrorEvent):void {
clearUpload();
var evt:SecurityErrorEvent = new SecurityErrorEvent("uploadSecurityError", false, false, event.text);
dispatchEvent(evt);
}
]]>
</mx:Script>
<mx:Canvas width="100%" height="100%">
<mx:DataGrid id="listFiles"
allowMultipleSelection="true" verticalScrollPolicy="on"
draggableColumns="false" resizableColumns="false" sortableColumns="false"
top="0" left="5" right="5" bottom="5" width="100%" height="100%">
<mx:columns>
<mx:DataGridColumn headerText="Filnamn" dataField="name" wordWrap="true"/>
<mx:DataGridColumn headerText="Storlek" dataField="size" width="80" textAlign="left"/>
<mx:DataGridColumn dataField="Sidnummer" width="80" headerText="Sidnummer" sortable="false" rendererIsEditor="true" editorDataField="value">
<mx:itemRenderer>
<mx:Component>
<mx:HBox horizontalAlign="center">
<mx:Script>
<![CDATA[
// Maybe I have to put something here???;
]]>
</mx:Script>
<mx:NumericStepper id="sida" height="21" change="value = sida.value"/>
</mx:HBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
</mx:Canvas>
<mx:ControlBar x="10" y="540" height="43">
<mx:Button id="btnAdd" click="addFiles()" label="Lägg till" labelPlacement="left" icon="@Embed(source='assets/lagg_till.png')" fontWeight="bold" textAlign="center" fontSize="10"/>
<mx:Button id="btnRemove" click="removeFiles()" label="Ta bort" labelPlacement="left" icon="@Embed(source='assets/ta_bort.png')"/>
<mx:ProgressBar id="progBar" mode="manual" label="" labelPlacement="center" width="100%"/>
<mx:Button id="btnCancel" click="onUploadCanceled()" label="Avbryt" labelPlacement="left" icon="@Embed(source='assets/avbryt.png')"/>
<mx:Button id="btnUpload" click="startUpload()" label="Ladda upp" icon="@Embed(source='assets/ladda_upp.png')" labelPlacement="left" textAlign="center"/>
</mx:ControlBar>
</mx:Panel>
Retrieving Information From The NumericStepper Component
I'm trying to use the NumericStepper component in our interface. I need the user to click up and down to choose a value which we will then use to change the _width property of a movie clip object on our timeline.
I'm using MX2004 and still gtting used to the new "hints" method of building code.
I've set up the component, filling in the appropriate minimum and maximum values, along with the step size. What we are having trouble with doing is writing the actionscript that allows me to retrieve the actual value selected when the user clicks/changes the value of the numStepper.
I've found several examples that use "listernerObj" and "addEventListener", but the examples almost seem too complex for what we need.
The numStepper is set up to allow the user to select a number from 15 to 25 that I will later use to change the width of a graphic on the stage with the setProperty function.
I used the following example as a starting point:
a numStepper that had years and used the chosen year to print a message in a window. The numStepper instance is called "year" in this example.
code: box=new Object()
box.change = function(eventObj){
var num=eventObj.target.value;
if (num<1978){
trace("You're GenX")
}else{trace("You're Millennial")}
}
year.addEventListener("change", box);
I'm not clear on the use of "eventObj", or "change".
But using this as a starting point, I have set mine up as follows: The graphic instance is called "bar1", and the numStepper instance is called "rate1".
[as]newRate=new Object();
newRate.change = function(eventObj){
var num=eventObj.target.value;
setProperty(bar1, _width, num);}
}
rate1.addEventListener("change",newRate);[AS]
It appears that the variable "num" is the actual value chosen by the user with the numStepper. But I don't have a clear understanding of the script around it.
If anyone can help me clear this up or point me in the right direction, I'd greatly appreciate it.
thanks!
Public Var M:NumericStepper; Read-only Property?
i get the following error
Illegal write to read-only property NumericStepper on global.
if i do 1 by itself it gives me the above error.
if i do 2 which i want to do it gives me the above error
... Note : NumericStepper component is in my library
package {
import fl.controls.*;
public class myclass extends MovieClip{
public var mystepper:NumericStepper;
public function myclass(){
mystepper = new NumericStepper(); //1
mystepper = makeNumericStepper(params); //2
}
public function makeNumericStepper(params...){
var stepper = new NumericStepper(); // this works fine no problem
set properties...
return the stepper
}
}
so how the hell do i make a numericStepper thats a public var
XML Binding, Index Of Element, And The NumericStepper
This is kind of complicated, but a cookie to whoever can help me.
Problem: I need to access the index for an element coming out of an XML file, using the bindings of the standard xmlconnector component. Right now, I have the element bound to the numericStepper. This works fine, but the numericstepper does not conform to the GUI I need, so I need to either a.) completely change the layout and functions of the numericstepper or b.) simply access the index of the binding some other way.
Background:
My XML file contains "n" number of pages, with a few bits of info per page. Like so:
Code:
<page>
<leftDisplay>datafiles/screen01L.xml</leftDisplay>
<rightDisplay>datafiles/screen01R.xml</rightDisplay>
<titleDisplay>Module 1</titleDisplay>
<screenTitle>Course Objectives</screenTitle>
<notes>a few notes here</notes>
</page>
<page>
...
</page>
<page>
...
</page>
The xml is bound to a dataholder, and gets the current page to display by the index number of the numericstepper (where "screenNum" is the stepper instance). Thusly:
Normally, the Index uses a constant value, typically 0. In this case though, becuase I have an unknown "n" number of pages, I want to use a mechanism to page through the content. The numericstepper, being a component, has event listeners that can fire events when clicked, which works great.
All I need is a way to figure out what I can bind that Index to that will give me the flexibility to have the GUI look how I want. Skinning the numericstepper doesn't work all that well, because I need much larger buttons, in a different orientation, without the number field, and the prebuilt components are pretty much a gigantic huge mess to change in my experience.
Any hints at all? I'm pretty well-versed in this stuff, but can't find the way to handle this one.
XML Binding, Index Of Element, And The NumericStepper
This is kind of complicated, but a cookie to whoever can help me.
Problem: I need to access the index for an element coming out of an XML file, using the bindings of the standard xmlconnector component. Right now, I have the element bound to the numericStepper. This works fine, but the numericstepper does not conform to the GUI I need, so I need to either a.) completely change the layout and functions of the numericstepper or b.) simply access the index of the binding some other way.
Background:
My XML file contains "n" number of pages, with a few bits of info per page. Like so:
Code:
<page>
<leftDisplay>datafiles/screen01L.xml</leftDisplay>
<rightDisplay>datafiles/screen01R.xml</rightDisplay>
<titleDisplay>Module 1</titleDisplay>
<screenTitle>Course Objectives</screenTitle>
<notes>a few notes here</notes>
</page>
<page>
...
</page>
<page>
...
</page>
The xml is bound to a dataholder, and gets the current page to display by the index number of the numericstepper (where "screenNum" is the stepper instance). Thusly:
Normally, the Index uses a constant value, typically 0. In this case though, becuase I have an unknown "n" number of pages, I want to use a mechanism to page through the content. The numericstepper, being a component, has event listeners that can fire events when clicked, which works great.
All I need is a way to figure out what I can bind that Index to that will give me the flexibility to have the GUI look how I want. Skinning the numericstepper doesn't work all that well, because I need much larger buttons, in a different orientation, without the number field, and the prebuilt components are pretty much a gigantic huge mess to change in my experience.
Any hints at all? I'm pretty well-versed in this stuff, but can't find the way to handle this one.
Breite Von Komponenten (Label, Slider, NumericStepper) Feststellen
hello actionscript.org members !
in my first version of this post i wrote in german - good example for 'don´t drink and post' - i am sorry !!
I am trying to get the exact width of a Label, Slider and NumericStepper component !
I have attached some Flash Files to demonstrate my problem.
The Problem in short:
The componets are in the library of main.fla.
I create a instance of InputField in MainControll (which is the Document Class of main.fla).
In InputField the three components are created and placed on stage.
To demonstrate what i am trying to achive I have underlined the components with three different rectangles (in red, green and blue).
They should exactly fit the width of the components (starting with component.x and ending where the component ends = component.x+component.width, but the don´t).
I have attached an image where the problem should be shown quite clearly.
If anyone could have a look i´d be very gratefull !!
Thanks an advance,
Matthias
PS: another problem:
I´d like to leave the main.fla empty and lood the components which are now in the library of main.fla from an different swf (shared library ?)
It would be great if anyone could give me a hint how to do that...
DateField
I am using Flash MX 2004 Pro and trying to use the DateField.
I am having no luck returning the date. I can get the Year and Month be using displayedYear and displayedMonth but no luck with date.
I have done endless searching and cant figure it out. Any help would be much appreciated.
Get Value From Datefield?
dear all,
i'm a newbie too, and i tried to make a simple survey.
one of item, i used the datefield component.
the problem is, how to make/get value from this component in order to be displayed as a dynamic text field? example for the combobox, i used this script
Code:
answer = combobox.getValue();
thanks.
Datefield / AS3
Does anyone have a datefield class or component for AS3 Flash they'd be willing to share? I haven't used DF for a long time and didn't even notice it wasn't included in CS3...those cheapskates...I got a tight deadline and didn't figure in time to code my own date component ..............arggggggghhh!!!
Josh
DateField
I am not able to link a DateField component in Flash to a php page. Is there a way to add a var to the DateField because everything works fine when a var is added to a text field? Thanks
DateField
I was wondering how to store a DATE value, selected from the DATEFIELD component into a variable.
I.e. so that the user will enter a date (Sept. 12, 2005), and on subsequent frame, that date will be written as text. Thus, how can I store a selected date into a variable??
Thanks,
D dot B
DateField - Please Help
I have asked this before on this site but I havent got even a reply yet!!!!
does any one know how to select a start date and then a finnish date then find out how many days had gone between!??!!!??!?!?!
DateField - Please Help
does any one know how to use the date picker to select a start date and an end date and then find out how many days are in between?????
any help would be massively helpful!!!!!!!!!!!
DateField - Please Help
I have asked about this before but no one ever replied
how would I use a date filed and then get a start date and end date then work out how many days were in between??/
can any one help me at all??/
Datefield
Hi guys,
I'm trying to put something together and could use some help. I'm trying to use actionscript and a datefield component to load a picture (with the same name as the date chosen in the date field +.gif) into an empty movie clip. My experience with actionscript has been pretty basic so far, and I've searched all over and can't figure this out. If anyone can help or point me in the right direction please please please please help .
If I haven't explained what I'm trying to do very well let me know and I'll try give more details.
Thanks
Datefield Use In CF
Hi there,
I'm a new member since today and I am pretty new to Flash. I have a question related to the datefield component in Flash and how to post the selected date in a form variable for later use in ColdFusion.
Thanks / Frank.
My code is the following:
<form method="post" action="demo2a.cfm">
Please select the criteria you want to appear on your checklistbr>
<cfoutput query="recordset1">
<cfloop index="option" list="#recordset1.ref#">
Criteria #option#<input type="checkbox" name="checklist" value="#option#"/>
<br>
</cfloop>
</cfoutput>
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="32" height="32">
<param name="movie" value="calendartest.swf">
<param name="quality" value="high">
<embed src="calendartest.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="32" height="32"></embed>
</object>
<br>
<input type="submit">
</form>
How Use Datefield Components?
Hi, I using flashMX UI components - datefield. But how do I add in a script using 'trace()' to show which date the user have selected??
Thanks..
Datefield Instability
Can anyone help me with the datefield component. seems to cease up and not allow you to pick a date or scroll through months?
DateField Problem
I have a flash page where user selects two dates through datefield components.
and the on next button press the selected dates are stored in vars.
when he comes back dates are loaded to the components back.if datefields are not undefined.
systax is
_root.arr.selectedDate = _global.arrDateT;
this works fine...
but if the user goes two steps further by pressing the next btn after selecting the dates, and again pressing the next btn from that page after making some check butoon selection...now he's in the third page and vars that has the date values are unchanged...now if he decides to com back to the first page to reselect dates..he comes two steps by pressing back buttons...
now comes the problem...datefieds are unsigned...and he can select new dates even its still unsigned...
but i trace the vars they still contain the saved values...
any idea why this happens?
Nameez
DateField Component WTF?
WTF???!!!
Am I missing something here? I drag the component on the stage it works the first few times I test the movie, however it just stops working after a while without me chaning the code or anything.
Can someone tell me what I'm doing wrong?
[F8] Datefield Problem
My datefield is part of movieclip A.
When i click on the calendar part of the datefiled componet it expands showing the calendar - as it should - and it expands overtop of movieclip A - however it doesnt expand overtop of movieclip B - which is next to it - so essentially i have 1/2 the calendar showing .- This is obviously a depth problem.
As a result i do a swapdepth with movieclip A
swapDepths(_root.getNextHighestDepth());
Which works fine and now movieclip A is the highest on the stage.
Now when i click on the datefiled to expand the calendar. The Calendar is below Movieclip A.
So it seems as if movieclip A swaps depths fine, but the pop-out calendar componet stays on a lower depth.
What am i doing wrong here?
Thanks in advance.
[F8] Datefield Problem
My datefield is part of movieclip A.
When i click on the calendar part of the datefiled componet it expands showing the calendar - as it should - and it expands overtop of movieclip A - however it doesnt expand overtop of movieclip B - which is next to it - so essentially i have 1/2 the calendar showing .- This is obviously a depth problem.
As a result i do a swapdepth with movieclip A
swapDepths(_root.getNextHighestDepth());
Which works fine and now movieclip A is the highest on the stage.
Now when i click on the datefiled to expand the calendar. The Calendar is below Movieclip A.
So it seems as if movieclip A swaps depths fine, but the pop-out calendar componet stays on a lower depth.
What am i doing wrong here?
Thanks in advance.
Datefield Component Help
Hi all!
i'm having trouble with the datefield (selector) - when i preview publish the file it works fine (when i click the text box or the little calendar icon the calendar comes up for selection) however when i publish/upload it the calendar pop up doesn't work. (the drop down menu doesn't work either)
I've published it with actionscript 2 and for player=6
any help would be great
thanks
DateField Component?
(got to be the WORST component I have used yet)..
anyways..
ok..
Im confused, and maybe someone who has experience with it can help me out.
two DateField components on the stage
From
&
To
I have the dateFormatter added, and I can pull the data from the components..
but I have went back and am trying to add a 'control check' (trap) so that the any date chosen in the FROM compoenent is not a date BEYOND the TO date chosen... and if so.. then just choose the day BEFORE the TO date.,
same thing fro the TO field (eventually).. cant choose a TO date BEFORE the FROM date..
when tracing things.. I am creating/setting a new DATE object as the selectedDate...
everythign is tracing fine..the conditional check between the two components (dates) is working fine.... (getTime() and then compare)..
and when I trace out the new Date() obj I am applying.settign as the new selectedDate for the component.. it is correct..
however the DISPLAY (field) will NOT update to the new selectedDate obj?
I saw a method for the displayMonth and displayFullYear I think..but nothign for displayDay... nor any mention on how to update the display (text field) to the correct date obj that the selectedDate is set to..
hope this make sense.. LOL open to whatever you got..
Thanks
SelectableRange In DateField
Hello,
I have two dateFields in my movie, one for "check in" and the second for "check out" in a hotel.
I have this code in the "check in dF" to disable dates before today
_root.intro.selectableRange = {rangeStart:new Date(now)};
Now I'd like to show in the "checkout df" only the days after the date selected in the "check in df"
How could I do that?
Thank you to everybody.
Datefield UI Component
Hi!
I am new to Flash 8 Pro. I am trying to use a datefield component where you can scroll through months and years to easily go back 30 or 40 years.
When I place the datefield on the stage I can only move back or forward one month per click, and holding the mouse down does not move the date.
I wonder if the component that I saw was customized, or am I doing something wrong with the datefield component that is bundled with Flash 8?
Thanks
Datefield Component
Hi guys,
I am having a bit of an issue with the datefield component.
If i run the swf containing the component then it works fine.
If i then load this swf inot another swf then it stops working.
Anyone?
thanks
DateField / DateChooser In CS3/AS3
I'm puzzled beyond wildest dreams why I don't have a date picker component when I'm doing a AS3 (actually an Air application) in Flash CS3. When I make an AS2 project the DateField and DateChooser is listed, but in AS3 they are gone along with other components as well. Several times I have had the feeling now that going to AS3 gives me less options in Flash!! Is it just me or how do I do these things in an AS3/Adobe Air application?!
I would prefer to have a visual component I can move around on the stage, just like with the text fields, dropdowns etc., rather than writing it in AS3 where I don't see it until I run the application...
Regards,
Allan Jensen
DateField Questions
Hi
I'm really hoping someone can help me here as I've looked for hours and can't find exactly what I need.
Basically, I want to use a dateField on a booking enquiry form. I want to display diferent accomodation price values in another text box depending on the date that has been selected in the dateField component. I can define the different ranges using the selectableRange statement but I'm not sure how to proceed from here.
Thanks in advance!
DateField/DateChooser
Hi guys,
I'm trying to use the DateField component to enable only certain days, like imagine a roster for the nights a play will be showing. Does anyone know how I can do this? I hope this isn't too newbie-ish, but I have looked for a solution--go easy on me.
I've searched around, and with the DateField component I found out how to enable only one day and have the rest disabled using quote:instancename.selectableRange = new Date(2007, 8, 6);
I know I can disable ranges / enable them, but the nights aren't on specific days, so I'd have to use more than one enabled range or something, and that I don't know how to do.
So my problem is enabling more than one day, if anyone knows or knows where I can look--please help.
Thanks.
Josh
Edited: 09/05/2007 at 07:10:41 PM by JoshuaR
DateField Component ?
Hello everyone,
I am trying to create a form within my flash movie that allows the user to select the date(for scheduling purposes).
I came across the "dateField" component in Flash 8 and thought it might be something worth looking into. I have never worked with components, so I am not sure what is involved in setting them up. I have tried looking into some resources and most talk about Cold Fusion. Is this required to activate components? If not, does anyone know of a tutorial that could help me with this? Also I have noticed that my navigation gets screwed up once I drag the component into my movie. My form is located within a movie clip that is not on the main timeline. Not sure if this is part of the problem. Any help would be "extremely" appreciated. Thanks in advance!
Here is the link if anyones interested (located on the "quote and schedule" page)
http://www.duvalldesigns.com/test_site3/index2.html
DateField Component
I am not able to link a DateField component in Flash to a php page. Is there a way to add a var to the DateField because everything works fine when a var is added to a text field? Thanks
Datefield Component
I'm using the datefield component in flash and what I'm trying to accomplish is when the user clicks a date in the datefield, it displays the date in a dynamic text field and shows the data in an XML file that is related to the date clicked? Any help at all would be cool.
Thanks
DateField Component And PHP
Hello All,
Im creating a form for a booking system. When the user chooses the date and submits. The booking gets emailed to a specific address. Im using the datefield component in flash. I usually use PHP to push data from a text field and email. But i'm stuck here, because the datefield is not a text field. Can anyone please help me.
someone gave me this code to trace the date.
myDateField.addEventListener("change", this.getDate);
function getDate(evt:Object):Void {
trace(evt.target.selectedDate);
}
The above code traces the output.
Can someone also please tell me, the code for how to push the data to a PHP email script that i have. I have defined the text fields with variables.
Thanks so much. The script for the Submit button is as follows:
on (release) {
if (startDate eq "" or endDate eq "" or registrationType eq "" or messasge eq "") {
stop ();
} else {
loadVariablesNum ("form.php", 0, "POST");
gotoAndStop (21);
}
}
I'm not a pro in flash. Please help me.
Cheers
Datefield UI Component
Hi!
I am new to Flash 8 and I'm trying to use a datefield. I've seen it used in many sites and I've seen you can quickly scroll through months and years to arrive at the date you desire.
However, when I put my datefield on the stage, I can only move month by month, and only by clicking with no scrolling functionality.
Can anyone explain how to get my datefield to work with all its functions?
Thanks
|