ActionScript 2.0 :: Flash8 Random Number Won't Save Using SharedObject

Mar 23, 2011

On my stage is a dynamic text box and a "save button".The text box shows a random number which somehow does not save.In the fla file I added is a circle whose color can be changed from red to green, just to point out what I mean.

View 3 Replies


Similar Posts:


Flash8 :: Random Number Decrease?

Oct 23, 2010

i have this script

Quote:

on (release) {
health -= 10;
if (health>500) {[code].........

I was wondering if there is a code i can use to replace the 10 with a random number between say 1-10.(Ergo when the script triggers the health is decreased with something between 1-10 instead of the set nr 10)

View 2 Replies

ActionScript 2.0 :: Flash8 Flash_A To Detect Flash_B's Sharedobject File?

Jun 30, 2009

I just learned how to use sharedobjects few week ago. Is it possible for Flash_A to detect Flash_B's sharedobject file?

View 1 Replies

ActionScript 3.0 :: Save Quiz Score With SharedObject?

Dec 20, 2009

I'm working on a quiz using AS3 on timeline. I can't figure out how to save the score at the end of the quiz.  The result of quiz is displayed by its dynamic text box (out_score.text), but it isn't saved along with the rest of information. When I go back to section I, all information is displayed, but quiz score goes back to zero (0). I have section I, which collects user information. Section II, 25 question quiz, and section III, which displays information and score.
  
SECTION ONE (labeled "inf"):
// score variable
var i:Number=0;

[code]....

View 13 Replies

ActionScript 2.0 :: Creating Save File Using SharedObject?

Jul 31, 2010

I have attempted to create a save file using sharedObject but it doesn't work. I don't get any errors it just doesn't seem to save when I press the save button. In the main frame I have:

Code:
user_so = SharedObject.getLocal("user");
if(user_so.data.tclock != undefined) {
clock_txt.text = user_so.data.tclock;
gregism_txt.text = user_so.data.gregism;
} else {
gregism = 0
clock = -1
}

In the save button movie clip I have:
Code:
on(release) {
user_so.data.tclock = _root.clock_txt.text;
user_so.data.gregism = _root.gregism_txt.text;
user_so.flush()
}

View 2 Replies

ActionScript 3.0 :: SharedObject - Save User Information And Score

Dec 16, 2009

I'm working on a project using AS3 and timeline coding. How to save user information and score. When I run the movie and complete form and answer quiz questions, information is displayed on closing section, but it doesn't save.

Here are the main sections by label:
// SECTIONS
Introduction (labeled "intro") -- contains directions
Information (labeled "inf") -- collects user information
quiz-questions (25 questions -- from q1 to q25) -- presents questions
closing (labeled "closing") -- displays user information plus score on quiz.

Here is the code by section
// SECTION INTRODUCTION
Section "intro" --- I have one button that goes to "inf" section
stop();
intro_bt.addEventListener(MouseEvent.CLICK, gotoInf);
function gotoInf(evt:MouseEvent): void{
[Code] .....

View 2 Replies

ActionScript 2.0 :: Generate A Random Number Between 2 Number BUT Without Generating 2 Same Number?

Jul 16, 2009

Dear Guys I Want To Generate A Random Number Between 2 Number BUT Without Generating 2 Same Number I Mean If For Example Already Generated Number "2" Next Time Did Not Generate It , Is There Any Solution

View 5 Replies

ActionScript 2.0 :: Sharedobject - Give The User A Option To Save That Layout/arangment?

Oct 29, 2005

i want to create a custumaizable interface that utalises the shared object code.for an over viewi am going to have a series of movieclips that contain navagation elements , that when draged into the order they want will give the user a option to save that layout/arangment .. so everytime they log in its the same ..

View 10 Replies

Actionscript 3 :: Use SharedObject To Track Number Of Clicks?

Aug 4, 2011

How do I use sharedObject to track the number of clicks and store them in a .txt file? My client wants to track the clicks of the user an Im not sure how to make this work with sharedObject.

View 1 Replies

IDE :: Generate Random Number Between 2 Number BUT Without Generating 2 Same Number?

Jul 16, 2009

I Want To Generate A Random Number Between 2 Number BUT Without Generating 2 Same Number I Mean If For Example Already Generated Number "2" Next Time Did Not Generate It,

View 4 Replies

ActionScript 3.0 :: Display A Random Number On The Click Of A Button Without Repeating Any Number In The Array

Sep 9, 2011

I'm trying to create a shuffle button for my mp3 player. I don't want it to repeat any song in the xml playlist until all the songs are played. Is there to display a random number on the click of a button, without repeating any number in the array until all the numbers in the array are used?

View 9 Replies

ActionScript 2.0 :: Function To Create A Random Number And The Char Move Accordingly Depending On The Number?

Aug 9, 2005

my functions in this fla i have. I use the function to create a random number and the char move accordingly depending on the number.

View 4 Replies

ActionScript 3.0 :: Random Number Generator - Make Each Number Unique So It Only Comes Up Once?

Nov 24, 2009

ActionScript Code:
var numbers:Array = [];
var newNb:Number;
var max:Number = 81;

[code]...

View 6 Replies

ActionScript 2.0 :: Random Number - Click On A Button The Variable Number?

Sep 18, 2005

lets say that when you click on a button the variable number goes up 1 or 2 but it picks it randomly
how would i do it

[Code]...

View 8 Replies

ActionScript 2.0 :: What Value Is Seeded To Math.random() To Generate The Random Number

Nov 18, 2010

1) what value is seeded to Math.random() to generate the random number?

View 2 Replies

IDE :: Create 100 Unique Random Numbers From Between 0 And 99 Where No Random Number Is Repeated?

Feb 28, 2009

Making a random number between lets say 0 and 99 is relatively straight forward using the Math.random class What is the best way to create 100 unique random numbers from between 0 and 99 where no random number is repeated?Would I make a random number, chuck it into an array then the next random number created is checked against the array, and if the number has been created before try for another number?

View 2 Replies

ActionScript 3.0 :: Make Random Number Between 1 To 10 Without Repeat Number Twice?

Dec 30, 2008

i want to make random number between 1 to 10 without repeat number twice or more i use this function to make random

function getRandomNumber(min:Number, max:Number):Number
{
var randomNumber:Number = Math.round(Math.random() * (max - min) + min);
return randomNumber;
}
getRandomNumber(1, 10);

View 2 Replies

ActionScript 2.0 :: Create A Random Number Without Using Math.random()?

Feb 5, 2010

How can i create a random number without using Math.random() I think this can be done with a array... i just don't know how.

i need it for a google banner. they don't allow Math.random() of random() in the sript

View 2 Replies

ActionScript 2.0 :: Flash8 Save To External File?

Apr 12, 2009

I have a number of different swf files that all have a score variable. I was wondering is it possible to save this variable into an external file and be able to load these variables in a different swf?

View 3 Replies

Flash8 :: Save Variable Data Is Swf Or Other File?

Jul 5, 2011

there are 2 items on stage, one is the "button" with instance name myButton and a dynamic text field.so the action script goes this way...

myVar=0;
myButton.onRelease=function(){
myVar++;
trace("click");
}

the dynamic text is initially zero (0) and when i click the button it counts the clicks up to here every thing works right but...when .swf file previewed in html after clicks if refresh is pressed the number is going back to zero.i want to upload this file and use on webpage.

View 5 Replies

ActionScript 2.0 :: Flash8 Author - Save / Publish .swfs From A .swf?

Jun 6, 2010

Can you save/publish a .swf from a .swf? For example, I want to make a .swf where the user can move around X's and O's representing players (say basketball) in order to depict a set play. There's a button to create keyframes for the X's and O's to tween between. And then an input text box to name the play. Can the play be saved? Something like this: [URL] Except I want anyone to be able to author plays online from my .swf rather than only me from my copy of Adobe Flash CS3.

View 1 Replies

Flash8 :: Number In Text Box?

Jan 29, 2010

i am trying to make a banking system, i have a text box which is called totaltxt, the number is currently set to 0, i press a "50" button, and the total should be 50 right?....but im getting 050 instead,heres my code, i am using AS2 btw

PHP Code:
var bank:Number;
bank.valueOf(totaltxt.text)

[code].....

View 2 Replies

Media Server :: SharedObject.NoAccess Error When Trying To SharedObject.getRemote?

Feb 18, 2012

I've installed developer version of Flash Media Server 4.5 and trying to get remote object, but no matter how I call my object all i get is this error .I've rad configuration guide and it told me that I should set StorageDir for shared objects, enable RPC (<RPC enabled="true">) and allow shared object (<Allow>users</Allow> in <RPC> - <SharedObject> tags)

View 1 Replies

Flash8 :: Find Out The Serial Number Of The MX

Jun 16, 2010

I recently bought a new machine and tried to put my Flash 8 software onto it. The serial number was fine, but it requested the serial number of the software I upgraded from, which I no longer have (MX, I think it was. I threw it out ages ago thinking I didn't need it ). I can't even remember what email address my macromedia/adobe account was under, it might even be under an email address for a domain I no longer have.

I do still have the software installed on my old PC. Is there anyway I can find out the serial number of the MX I upgraded from off of the Flash 8 on there? Or it is a lost cause?

View 1 Replies

ActionScript 2.0 :: Flash8 Random Without Overlap

Aug 1, 2009

I have a screen showing 6 buttons. 3 of these buttons are fixed controls which must always be in view while the remaining three will be randomly selected for each question from a total of about 150 possibilities (do I really have to make 150 differently labeled buttons? (but this is a side issue)). these randomly selected buttons show up at randomly selected screen positions? I'm vaguely aware that X and Y and random will be used here.

The idea is to prevent the user from becoming familiar with the layout and building an intuition which would be counterproductive to the aim of the application. The remaining aspect of this problem after randomizing the position of the three dynamically generated buttons is that they must not overlap the 3 fixed controls which must be always available. I'm sure II could spend weeks on this without a few good tips to point me in the right direction.

View 2 Replies

ActionScript 2.0 :: Flash8 Import Variables From .txt As Number?

Dec 4, 2009

I'm trying to import some variables set up in a .txt file. However the variables that I would like to behave like numbers are not doing so.

I have a variable in the text file called "&middleimg=1" when I pull this in and say do the following:

Code:
var numvar:Number=0;
numvar = _root.myvars.middleimg+1;

I get "11" rather then "2" as the result. I tried setting up my text file as such: "&middleimg:Number=1" but get an "undefined" result. Is there anyway to get imported variables to behave like a number instead of a string?

View 2 Replies

ActionScript 2.0 :: Creating An Input Text - A Random Number Will Be Typed In That Text Instead Of Having A Fixed, Pre-set Number?

May 13, 2006

I want to change the code a little bit by creating an Input Text. A random number will be typed in that text instead of having a fixed, pre-set number.

View 6 Replies

ActionScript 2.0 :: When A Specific Variable Equals A Specific Value A Random Number Decreases On The Current Number?

Feb 20, 2008

i have a project and i need that when a specific variable equals a specific value a random number decreases on the current number, its easy to make it decrease but i need to decrease instead of 4 to decrease a maximun of 5 and minimun of 3.ere is the code :

Code:

numeroDeTazos = 20;
quantidade.text = numeroDeTazos;
if (nrfinal2 == 33)
{

[code]....

View 1 Replies

ActionScript 2.0 :: Flash8 3 Random But Different Numbers From Same Range?

Aug 1, 2009

How to get say from 1 to 10, three randomly chosen numbers but simultaneously exclude the possibility of a repeated return (ie two 2s or three 6s)?

View 8 Replies

ActionScript 2.0 :: Flash8 Retrieve Index-number Of A Value In An Array?

Apr 30, 2009

For instance:

PHP Code:

my_Array = new Array();
my_Array.push("one", "two", "three", "four")

Here's the catch: another variable (for instance) called "three" is loaded. I want to look up "three" in my_Array and retrieve the index-number (should be 2 of course). How can I accomplish that?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved