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








Why Doesnt NumericStepper Display Its Value?


it works properly. its incrementing and decrementing properly. only, it wont show what its value is. its always blank.

why is this happening?




KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 04-11-2007, 09:07 AM


View Complete Forum Thread with Replies

Sponsored Links:

Pre Loader Doesnt Display Untill 60% Loaded
Hi all
Relative newbie here. Can't figure this out my preloader doesn't display until about 60% loaded?
Heres the A.S.
Any ideas?
Thanks Bill

stop();
textVar = "..::LOADING::..";
loaderInt = setInterval (Lbar,10) ;
function Lbar () {
percentInst.text = Math.round(getBytesLoaded()/getBytesTotal()*100) + "%";
if (getBytesLoaded() >= getBytesTotal()) {
play();
textInst._visible = false;
fill_MC._visible = false;
strokeMC._visible = false;
percentInst._visible = false;
clearInterval (loaderInt);
}
fill_MC._xscale =(getBytesLoaded ()/getBytesTotal ()*100);
}

View Replies !    View Related
Display Text If User Doesnt Have Flash
I'm trying to have my text display if flash doesnt work. can anyone help?


Code:
<div class="sectionheader">
<div id="ourschool">
<embed type="application/x-shockwave-flash" src="flash/h1.swf" style="" bgcolor="#F4F9FF" quality="high" flashvars="link=LinkURL&txtName=our school" height="29" width="250">
</div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("flash/h1.swf", "Gdu2.0", "250", "29", "8","#69B7FF");
so.addVariable("txtName", "our school");
so.write("ourschool");
// ]]>
</script>
</div><!--sectionheader-->

View Replies !    View Related
Internet Explorer Doesnt Display Flash
Hi

I am not very familiar with using flash in webpages and I have searched these forums for an answer to this problem without success.

My flash movie displays and works correctly in Firefox/Netscape but shows as a tiny 1pixel dot in IE.

Can some body please take a look at my code and tell me where I have gone wrong?


PHP Code:
<p class="bodytextwhite8pt">Highlighted dates are unavailable</p><br>
      <?php //CONNECT TO DATABASE
 
$hostname = 'localhost';
$mysql_user='myuser';
$mysql_pass='mypass';
$mysql_database='mydb';
 
$connection = mysql_connect($hostname,$mysql_user,$mysql_pass) or die (mysql_errno().": ".mysql_error()."<BR>");
mysql_select_db($mysql_database);
 
if(get_magic_quotes_gpc()) $_GET['ref'] = stripslashes($_GET['ref']);
 
$sql = "SELECT `id` FROM `calendars` WHERE `name`='". mysql_real_escape_string($_GET['ref'])."'";
 
$query = mysql_query($sql) or die(mysql_error());
while ($result = mysql_fetch_array($query))
{
 
$cid = $result["id"];
 
 
 
}
?>
      <div align="center">
        <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="<? echo $CALENDAR["data_value"]; ?>" height="<? echo $height; ?>" align="middle">
          <param name="allowScriptAccess" value="sameDomain" />
          <param name="movie" value="calendar.swf?link=calendar-data.php&cid=<? echo $cid; ?>" />
          <param name="quality" value="high" />
          <param name="bgcolor" value="#FFFFFF" />
          <embed src="calendar.swf?link=calendar-data.php&cid=<? echo $cid; ?>" quality="high" bgcolor="#FFFFFF" width="<? echo $CALENDAR["data_value"]; ?>" height="<? echo $height; ?>" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
        </object>

It all works splendidly in Firefox but good old IE has to go spoil things

TIA
Regards
C

View Replies !    View Related
Drop Down Menu Doesnt Display Over The Flash Area.
please see the link http://www.opal-stone.com in the top menu, click 'video' to open the video page. then move the mouse over the 'products' link in the top menu. you can see that the products drop down menu doesnt display properly due to the flash image on the video page. please help me to troubleshoot this problem. ask me for any clarifications. thank you for your valuable time and efforts.

View Replies !    View Related
Firefox Doesnt Display Image In "popup Window"
I followed the instructions from the tutorial "http://kirupa.com/developer/flash8/centered_popup_window.htm" and the popup windows opens fine in IE and Firefox, however when it opens in Firefox it doesnt display the image. Any ideas? the only code i changed was in the HTML and it was the width and heigth and took the scrollbars off oh and disabled resize. The image is a .png (transparent) thanks in advance.

View Replies !    View Related
[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!

View Replies !    View Related
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?

View Replies !    View Related
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

View Replies !    View Related
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?

View Replies !    View Related
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.

View Replies !    View Related
[F8] NumericStepper: Press Instead Release?
I would like to know if there is a way to configure NumericStepper then it will change its value when PRESS mouse instead release.

Thanks.

View Replies !    View Related
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

View Replies !    View Related
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

View Replies !    View Related
[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

View Replies !    View Related
[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>

View Replies !    View Related
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!

View Replies !    View Related
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

View Replies !    View Related
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.

View Replies !    View Related
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.

View Replies !    View Related
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.

View Replies !    View Related
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

View Replies !    View Related
Flash's Hidden Gems: The NumericStepper Component
This is an article discussion thread for discussing the SitePoint article, "Flash's Hidden Gems: The NumericStepper Component"

View Replies !    View Related
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...

View Replies !    View Related
HELP: Sprite.addChild(NumericStepper) Resizes Sprite To 100x100
If anyone can help me with this, I would be extremely grateful. It's driving me insane.

If I run this code:

Quote:




var mySprite:Sprite = new Sprite();
trace("mySprite 1:", mySprite.width, mySprite.height);
numericStepper = new NumericStepper();
trace("numericStepper 2:", numericStepper.width, numericStepper.height);
mySprite.addChild(numericStepper);
trace("mySprite 3:", mySprite.width, mySprite.height);




I expect this output:

Quote:




mySprite 1: 0 0
numericStepper 2: 80 22
mySprite 3: 80 22




But I get this output:

Quote:




mySprite 1: 0 0
numericStepper 2: 80 22
mySprite 3: 100 100




If instead I do this:


Quote:




mySprite = new Sprite();
trace("mySprite 1:", mySprite.width, mySprite.height);
numericStepper = new NumericStepper();
trace("numericStepper 2:", numericStepper.width, numericStepper.height);
mySprite.addChild(numericStepper);
trace("mySprite 3:", mySprite.width, mySprite.height);
mySprite.width = 80;
mySprite.height = 22;




Then the numericStepper is drawn as if it is squished to 20% its normal height.
If I pre-set mySprite width and height before adding the numericstepper, the trace output is 0,0 after adding it and it is not displayed at all.

Is there some way I can make the sprite only adjust to correctly fit the numericStepper OR resize it afterwards without distorting the numericStepper component?

As I was typing this, I came across this post:
http://www.kirupa.com/forum/archive/.../t-263027.html

Can anyone help me modify that solution for a numeric stepper?

Thanks!

View Replies !    View Related
Test If A Display Object Has Been Added To The Display List
Is there any way to test if a display object has been added to the display list?

View Replies !    View Related
Button Works, Doesnt Work, Works, Doesnt Work With Each Click
I have this code on a button

on (release) {
gotoAndPlay("smokeleft");
}

that obviously takes the viewer to a frame labled "smokeleft". At that frame there is a stop action and a MC with an instance name of "smokeleftmc"

I've followed this procedure with two more buttons and MC's, smoke and smokeright.

If a button is clicked once, it works perfect. However, if the button is clicked a second time, BEFORE one of the other two buttons is clicked, the play head will not trigger the MC again, rather it will move forward one frame (I assume it would move forward more if there wasn't a stop action).

If the button is clicked once, then a second button is clicked, then the first button is clicked a second time, it works exactly as designed. The only time there is a problem is if one button is clicked twice in a row.

How do I solve this? Thanks

View Replies !    View Related
It Works It Doesnt Work It Works It Doesnt...why?
I wrote a script
it has some variables
I send them as sendAndLoad (url, vars, post) to an Acces DataBase and I get the result back through an ASPX page.
It works fine....on different plattforms, Win xp Win 2000 Mac OS X. on a local machine as well as on the server. And it works fine for the majority of the users I have interviewed.
But apparently it doesnt work on all users machines, despite they have the correct version of the plugin, ie: flash player 7.
Any idea???

Cheers
Shirley65

View Replies !    View Related
Detect Flash / Display If Have / Display Image If Not.
Im using PHP so this is for "programmers" who use flash (or anyone who knows php enough to make a detection script).


I need to have a flash movie displayed on a page if it can determine whether or not the browser has the flash plugin. If it doesn't (ie can't tell what version, no plugin, etc) then I want it to display a GIF/jPg instead.

Using PHP and Flash 5

Help appreciated.

View Replies !    View Related
Diff Betn Display.and * Display.Sprite
Hello guys,

In many tutorials, I have seen that when the author want to use Sprite he imports flash.display.*

If he wants to use Sprite only then isn't it sensible to import Sprite only?

Whats the difference between importing everything with * and importing a particular class only?

Wont importing everything increase the movie size unnecessarily?

View Replies !    View Related
Did Now It Doesnt
why did this used to work now it doesnt...?

http://www.musthavetoy.co.uk

i knwo im meant to link to an .htm page but it used to work goign direct to a .swf file.... but now it doesnt know what to do with the ifel and tries downloading it rather than loading it up............ help pelase... i gotta elave the country in a week and i wana make this work thank you please xxxxxx

View Replies !    View Related
Did Now It Doesnt
why did this used to work now it doesnt...?

http://www.musthavetoy.co.uk

i knwo im meant to link to an .htm page but it used to work goign direct to a .swf file.... but now it doesnt know what to do with the ifel and tries downloading it rather than loading it up............ help pelase... i gotta elave the country in a week and i wana make this work thank you please xxxxxx

View Replies !    View Related
Why Doesnt This Work ?
onClipEvent (mouseMove) {
if (_root.test._xmouse <= 0 or _root.test._xmouse >= 601) {
_root.gotoAndPlay("close");
} else {
_root.gotoAndPlay("open");
}
}
onClipEvent (mouseMove) {
if (_root.test._ymouse <= 0 or _root.test._ymouse >= 201) {
_root.gotoAndPlay("close");
} else {
_root.gotoAndPlay("open");
}
}



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?

View Replies !    View Related
Doesnt Loop
hi

i have been trying to get this thing to work for ages now and i give up.

i have asked action scripting questions on this but it still wont work so can someone have a look at the .fla.

its only small - i stripped it down.
http://members.lycos.co.uk/jsurdy/flash_fix.

basically it should say "loading" until the exteranl MC is ready to play then FADES in. at the moment it doesnt loop it just carries on playing.

am sure theres a simple fix

can anyone help?
thanks

View Replies !    View Related
Still Doesnt Work
I have this code in a empty mc on the stage.... but it does not work!!!! argh. why?

onClipEvent (enterFrame) {
if (_root.MoviClipSlide._x == 300) {
_root.empty.attachMovie("MoviClipText", "MoviClipText_1", "3");
trace("**** ****");
}
}

View Replies !    View Related
Why Doesnt This Work In MX
Ok i have this working when i pulblish to flash 5 player but when i do it for the flash 6 player it doesnt work.


Code:
onClipEvent (mouseUp) {
if (Selection.getFocus() == "_level0.input1") {
_root.input1 = "";
} else if (Selection.getFocus() == "_level0.input2") {
_root.input2 = "";
} else if (Selection.getFocus() == "_level0.input3") {
_root.input3 = "";
} else if (Selection.getFocus() == "_level0.input4") {
_root.input4 = "";
} else if (Selection.getFocus() == "_level0.input5") {
_root.input5 = "";
} else if (Selection.getFocus() == "_level0.input6") {
_root.input6 = "";
}
}
Its part off my mail form so that when u click the text field it clears it automaticly for u and the code is on a blank MC but as i said it doesnt work when publishing to flash 6 player anyone got any ideas as to why ??

Thanks, Mental

View Replies !    View Related
Ok..why Doesnt This Work? Help Please
I have an swf movie that loads another swf movie in it. The loaded movie has buttons and everything but when I click on them nothing happens. When I open the file by itself and then click on the buttons it actually works. Any reason why this is happening??

View Replies !    View Related
Why Doesnt This Work..?
i have followed the directions of this preloader
and it is still not working..

i am doing this to learn
and so far...im not having any luck

i have attached the fla. in a zip. along with the
preloader tutorial.

can someone tell me what im doing wrong..

it would be a huge help to me..
on my quest to becoming as good as some of you

View Replies !    View Related
Y Doesnt This Work?
im trying to make a simple fade, for an image contained in placeholder_mc, here is the code im using, but i cant see why it is not working:

while (picalpha <100) {
setProperty(placeholder_mc, _alpha, picalpha + 5);
continue;
}
i initially use a getproperty line and set that as the picalpha,
shouldnt that just increment the alpha value by 5 until it reaches 100??
If u have any idea, please let me know, or another way i can make a simple alpha fade, thanks
Lee

View Replies !    View Related
Why Doesnt This Work
button1.onRollOver = function() {
toolstart();
_root.tooltip.bubble = Title1;
};

why doesnt this work from within a movie within another movie.

title1 is the text to appear inside a speech bubble called bubble.
tooltip is the movie that the bubble movie is inside.

any ideas apply within

View Replies !    View Related
Why Doesnt This Work?
if (shooting =True || Key.isDown(Key.SPACE)) {
_root.man.arms.gotoAndPlay("attack");
}

i have it set so that shooting = true and on the first frame of "attack" shooting = false so you can not double shoot.

View Replies !    View Related
Why Doesnt This Work?
I have a small flash movie that preloads and plays a sound loop.
But when the user goes to the next page the music plays even when they have turned it off. Ive tried using shared objects to drop a cookies to remember the volume setting but with no luck any help would be apprieciated

Here is the code im using in mx 04 pro

Frame 1


mySound = new Sound();
mySound.attachSound("0659");

// open and/or create a cookie
_global.cookie = SharedObject.getLocal("volume");



// off button

on (release) {
mySound.setVolume(0);

_global.cookie.data.volume = mySound.getVolume();
_global.cookie.flush();
}


thanks

View Replies !    View Related
Why Doesnt This Work?
I have a preloader function which reports the progress of a movieclip which is loading. In Internet explorer it works fine, however in mozilla firefox it doesnt. the number is reported back as NAN.

Can be seen at MI-7

my preloader function does this:

code: //create a new movieclip to load
//the external movie into
//check the download status of the external
//movie once every frame
function loaderFunction() {
_root.holderMc.hldMc.unloadMovie()
_root.holderMc.hldMc.removeMovieClip();
if (movieToLoad=="intro1.swf") { _root.opener_mc.gotoAndPlay(2) }
_root.holderMc.createEmptyMovieClip("hldMc", _root.holderMc.getNextHighestDepth())
//load the external movie into the new movieclip
_root.holderMc.hldMc.loadMovie(_global.serverAddre ss+_root.movieToLoad);
this.onEnterFrame = function() {
//trace the percentage of the movie that has loaded
percent = (_root.holderMc.hldMc.getBytesLoaded()/_root.holderMc.hldMc.getBytesTotal())*100;
if (!isNan(percent)) {
trace(percent+"% loaded");
if (percent == 0) {
percent_display = "";
} else {
percent_display = Math.ceil(percent)+"% LOADED.";
}
this.loadbar._visible = true;
this.loadbar._xscale = percent;
if (percent>1) {
this.reelmc._visible = true;
}
} else {
trace("0% loaded");
}
if (percent == 100) {
_root.holderMc.hldMc.play();
delete this.onEnterFrame;
this.reelmc._visible = false;
percent_display = "";
this.loadbar._visible = false;
this.mi7Logo._visible = false;
}

}
}

thanks

View Replies !    View Related
MC Does Play..Then It Doesnt..
Hello good ppl..
Im trying to keep this as clear as possible..

I got 5 graphic symbols with 5 invisble buttons..
Home,Tarieven,but3,but4,Contact

When you click on Tarieven it plays the Tariefmc AND the MC's in it..
But when you click on home and you click on tarieven again the MC's IN the tariefmc dont play..they r at the end..So there isnt an animation..

This is the AS ive put on the invisbutton..

<as>on (release) {
_root.welkommc._visible = false;
_root.contactmc._visible = false;
_root.tariefmc.gotoAndPlay(2);
_root.tariefmc._visible = true;
}
</as>

To be sure..ill put the home as aswell..

on(release){
_root.contactmc._visible = false;
_root.welkommc._visible = true;
_root.tariefmc._visible = false;
}

Well..Why dont the MC in the tariefmc dont play after you clicked on home or contact??..The MC in the tariefmc are called tariefmc1 and lijnmc..
Even when i put _root.tariefmc1.gotoandplay (1)
doesnt work either..

Could someone plzz tell me what is going wrong??..
BIG BIG THANKS!!..

View Replies !    View Related
This Doesnt Work
this isnt working

PHP Code:




stop();
if (place = 0) {
    gotoAndPlay(22);
}
if (place > 0) {
    gotoAndPlay(3);
}
if (place < 0) {
    gotoAndPlay(3);
}






could ne one help me?

View Replies !    View Related
Help Html Doesnt..
wierd... <br><br>help me!

View Replies !    View Related
It DOESNT WORK
I have a movie and within that movie i have other nested movies, maybe one or two.
I am trying to load pictures into the lowest movie clip.

the code is as follows:
stop();
my_mcl = new MovieClipLoader();
my_mcl.onLoadComplete = function(movieClip) {
trace("Loading is done for the movie clip "+ movieClip);
};
my_mcl.onLoadError = function(movieClip) {
trace("Error: " + movieClip+ " did not load.");
trace("Your load failed for the movie clip "+ movieClip);
};

// Set up button actions
next_btn.onRelease = function(){
nextFrame();
}
prev_btn.onRelease = function(){
prevFrame();
}

my_mcl.loadClip("photos/me-illustrated.jpg","jpgHolder");
name = "bright blue water";


Its simple and its from a tutorials you can find anywhere on the web, but it doesnt seem to work when i try and put it into my movie. Whats the problem anyone know?

View Replies !    View Related
Why Doesnt This Work
Should be simple.

I am sending data from flash to an asp page that sends mail. The mail sends but has nothing in the body. It seems like my varuables are not being sent. Any help would be great.

code:
stop ();

function sendForm () {
my_lv = new LoadVars ();
my_lv.fcontact = _parent.contact_txt.text;
my_lv.fcompany = _parent.company_txt.text;
my_lv.fphone = _parent.phone_txt.text;
my_lv.fsender = _parent.sender_txt.text;
my_lv.finquiry = _parent.inquiry_txt.text;
my_lv.send ("http://www.tm-g.com/forminfo.asp", "POST");
gotoAndPlay(23);
}

send_btn.onRelease = function () {
if (contact_txt.text == "" || company_txt.text == "" || phone_txt.text == "" || sender_txt.text == "" || inquiry_txt.text == "") {
gotoAndStop(22);
} else {
sendForm ();
}
};

View Replies !    View Related
DOESnT WORK
i copied the given html that i was given, i pasted it onto my site, but it doesnt work!!!!!!!!!! i dont get it

View Replies !    View Related
Why Doesnt This Work
im having a MC work sometime and not others check it out. click on a link such as "info" sometimes it goes to the info label and stops other time it glitches and goes to "info" and keeps going thru all the other sections.

http://www.rocketinnovations.ca/Karl/test.html

the code im using is
on (release) {
_root.gotoAndStop("info");
}
on (rollOver) {
_root.button2.gotoAndStop(2)
}
on (rollOut) {
_root.button2.gotoAndStop(1)
}

View Replies !    View Related
Why Doesnt This Shoot?
I have no idea what's wront with my AS?

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved