ActionScript 3.0 :: How To Use Shared Variables

Dec 13, 2011

Anyone know how to use shared variables?would have to make a simple script, I have two swf on different computers and want to put a button on one, when I click, appears in the other a 1 and when I click again, a zero appears.

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Shared Variables In Flash?

May 6, 2008

I have created the flv file with the video streaming and i put two buttons, one is for "Enable the Sound" and another one for "Disable the sound" that's working properly. But what i need is there are so many video streamings are there in the site if i click to "Enable the sound" then the video will play with sound in all videos . If i click for "disable the sound" then all the videos in the site will play without sound. This is the concept, i don't know how to store a common variable for sound to achieve this concept.

View 2 Replies

ActionScript 3.0 :: On Entering First Frame, Get Shared Object Values, Enter Into Variables

Apr 7, 2011

I am trying to create an AS3 Fla to score a quiz's results. The quiz is a separate swf that stores its results to a shared object ("G1"), and both the quiz swf and this new scoring swf would reside on the same website.
 
I've tried scripting the AS3 in the new scoring Fla but I keep getting error messages.
 
So far, here's what I have that doesn't work.

[Code]....
 
The goal is to open the scoring swf, populate some variables with the values from the SO, then (not yet tried in the script) apply some if/else conditions to show specific results based on scores.

View 3 Replies

ActionScript 3.0 :: AIR Shared Object Shared Between Flash & AIR?

Mar 13, 2009

I created a very simple experiment to attempt to access the same shared object in Flash Player and AIR.

A Flash SWF creates a local shared object.

A AIR application (being tested from CS3 or installed) opens the same shared object.

The data does not persist. Is this theoretically possible?

View 1 Replies

Actionscript 3 :: Cannot Get The Shared Whiteboard To Be Shared?

Aug 18, 2010

I am building a shared whiteboard and I cannot get the shared whiteboard to be shared. I have successfully created a shared method and I see the shared object in the Admin Console that it is there and connected but can't see the drawing on a different browser. I am posting the entire actionscript code.

package
{
import flash.display.Sprite;[code]......

View 3 Replies

ActionScript 2.0 :: Defining Variables - Unique To Load SWFs Instead Of Declaring All The Variables

Mar 21, 2012

I have an empty SWF that's sole purpose is to call loadMovieNum and start the project. Each loaded movie has a few variables defined within them - unique to those loaded SWFs. Instead of declaring all the variables in each SWF can I declare all of them in one place, in the first frame of the empty loader it all starts from? I'm thinking I can then declare a variable which each loaded movie can increment as needed for me.

View 2 Replies

ActionScript 3.0 :: Variables True/false Custom Variables Work In Flash?

Aug 20, 2008

How do variables true/false custom variables work in flash?

For example, what I want to do is create a simple true=false variable that I can call on an if statement later.

For example:

Code:
Var1 = true;
if (!Var1)
{

[Code]....

I noticed that neither the "Var1 = true;" part or the if(!Var1) part worked in flash.

View 4 Replies

ActionScript 3.0 :: Array Of Variables - Make A Bunch Of Variables From A For Loop

Feb 21, 2009

How can I make a bunch of variables from a for loop. for example for (var i=0; i<total; i++) {var bunch(i);}. that i make a bunch of variables named bunch1, bunch2, bunch3. I keep getting errors. I program and use so many different languages that I dont know if that can be done with AS3. my only other alternative i can think of is to create some sort of event dispatcher object array. but I dont know how to get them all to send events to one listener with there index number.

View 5 Replies

Actionscript 3 :: Changes To Array Of String Variables Doesn't Update The Variables Themselves

Jul 30, 2010

I have a list of strings that I add to an array, then attempt to set those values in a for-loop using data that I read in. The array gets updated, but the values the array contains do not. I also have an array of buttons that I update this same way that works great, but strings don't seem to work the same way. I have tried moving the string array to give it full scope, and still nothing...

public class test extends Sprite
{
// Declare a list of strings
protected var title0:String = undefined;

[Code]....

View 1 Replies

ActionScript 3.0 :: Load Data From Different Variables - The New Variables Come Back As Undefined?

Jun 15, 2010

I'm writing code that takes data from mysql that's processed by a PHP script. It's actually a bit bizarre, at least to me. Anyway, here's some basic AS3 code that's moving toward what I want to do:

var loader:URLLoader = new URLLoader();
var urlRequest:URLRequest=new URLRequest("receive.php");
urlRequest.method=URLRequestMethod.GET;[code]....

For some reason, the statement "trace(evt.target.data);" produces a whole pile of garbled text before the actual stuff that it's supposed to show Because of problem #1, I've had to include a throwaway variable at the beginning, otherwise the first variable I try to pass into AS3 comes back as undefined. This causes errors when I run my flash movie in the IDE, but when I run it from the browser it doesn't seem to have any effect.But this is the strangest thing of all whenever I make any changes to the database (and subsequently try to load data from different variables), the new variables come back as undefined. For example, let's say that I add another entry to the database, and decide to load students 2, 3, and 4 instead of 1, 2, and 3. When I do that, any new data I've added comes back as undefined, even though when I view the PHP output in my browser, it looks just fine.

And now for the REALLY bizarre part: I'll copy that output, paste it into my PHP script as an echo statement, comment everything else out, and my flash movie runs fine. Even though the output from the PHP script is exactly the same, it gives me errors.

View 9 Replies

Possible To Use Shared Library?

Mar 22, 2011

In my child swf I am using the sound from library with "attachSound". I also use the play/pause button controls of this sound alongwith the other animation.

Now when I load this into my main swf file with "loadMovie", It plays fine but no sound. I found that this is due to no sound linkage in my main file library.

View 2 Replies

ActionScript 3.0 :: Array Variables, Variables Not Working Correctly?

Jul 11, 2011

There is a bird, and you control its upwards movement with a key. It has thrust, gravity, it works fine. The problem is I have a bunch of icicles that come at the bird that he is supposed to avoid. I tried this first with math random to use as an x coordinate and than move across the screen, but the icicles had the same x-coordinates sometimes. I tried does not equal(!=) but that doesn't work. I made an array and each number that came out of the array I assigned a different variable. This works fine. I put this variable into the x-coordinate such as mc.x=((n)*60)+480. I did this for five different icicles. All their differnt variables have a different value, and I put them into the same function for each individual video clip, but they still don't go to the right coordinate. Here is the test code just for the initial coordinate of each icicle before it moves...////////////////////////////Quote:

var temp:Array = new Array()
for (var i:int=0;i<8;i++) {
temp.push(i);

[code]......

View 1 Replies

ActionScript 3.0 :: Create Several Variables To Aasign Each One Of Those Variables One Number?

Apr 9, 2011

i am trying to do a loop to create several variables to aasign each one of those variables one number.when i write

[Code]...

View 4 Replies

ActionScript 2.0 :: Check Variables In MyPictures.onLoad, The Variables Are Always The Same?

Aug 5, 2004

I have 2 loadVars - myVars, myPictures

basically i have defined their onLoad functions

so in myVars, i call for

Code:
myPictures.load("http://www.fakedevil.com/lurgee/pictures2.php?id="+this._parent.link2.text+"&time=" add getTimer(), "");

pictures2.php is working cos I just check so by rite the variables loaded should change.. but somehow each time I check those variables in myPictures.onLoad, the variables are always the same.

View 5 Replies

ActionScript 2.0 :: How To Use Shared Library

Mar 22, 2011

In my child swf I am using the sound from library with "attachSound". I also use the play/pause button controls of this sound alongwith the other animation.Now when I load this into my main swf file with "loadMovie", It plays fine but no sound. I found that this is due to no sound linkage in my main file library.Now the issue is that I want to share my child swf's library with main file's library.

View 2 Replies

ActionScript 2.0 :: How To Use Shared Objects

Feb 28, 2006

I had been wondering how to use shared objects for a long time and thanks a million to this mini-tut:url...I know how. The only thing is it says that to clear a shared object, you must type (used in his example) [code]but what if i wanted to delete a certain block of data on it, for example I have the shared object user.And i don't want to delete all of it, but just one block of data (specifically user.data.doc)[code]

View 5 Replies

ActionScript 2.0 :: Shared Buttons

Dec 20, 2006

I have created a shared library for one of my project.its running well.But the only thing is I am not able to add buttons from this shared library.How can I share buttons?

View 1 Replies

ActionScript 2.0 :: Using The Shared Library?

May 27, 2007

I love this tutorialsBut I have one question:How can i Pre-load my external shared library file before loading my flash???

View 1 Replies

ActionScript 2.0 :: Use More Than One Shared Object?

May 20, 2008

Just wondering if you can use more than one shared object, as my AS code doesn't act as i would think

Code:
---this one works
var submenu_so:SharedObject;
submenu_so = SharedObject.getLocal("menu");

[Code].....

View 1 Replies

IDE :: How To Flash Shared Object

Jun 24, 2009

Can I use Flash Shared Object to pass information between two different SWF files on two different pages within the same website?I know it can if the SWF files are the same. But what if they are different Flash object with different SWF files?

View 7 Replies

IDE :: Local Shared Object (LSO) On A CD-ROM?

Jan 28, 2010

Does anyone know if it's possible to save and access a LSO from an EXE projector on a CD?

Obviously the LSO couldn't be saved on the CD itself - would it be able to save the LSO somewhere on the users hard drive?

View 4 Replies

ActionScript 3.0 :: How To Clear Shared Object

May 28, 2009

I made a shared object whiteboard but I have a stupid problem with removing objects. This is function to clear shared object :

public function clearShape (so:SharedObject):void {
trace('clear:', this.name);
delete so.data[this.name];

[code].....

View 2 Replies

Using Same Shared Objects Across Multiple FLAs?

May 4, 2010

I am creating a small game for a project im doing it is only ten levels long but I wish to include feature such as saving etc. I have one some research on Shared Objects and it seems to be the best method. The idea I wish to execute is to have at the end of a level after reaching the levels goal have a piece of code that runs and saves that the next level has been unlocked. This seems relatively simple. However i have done things awkwardly i think, instead of creating the whole game within a single fla. each level is a seperate file, eg. level1.fla, level2.fla etc. Is it possible to use the same shared object across multiple .fla's?

View 3 Replies

ActionScript 2.0 :: Removing The Shared Object Pop-up?

Aug 7, 2011

I was thinking if there was a way to remove the shared object pop up from popping up lol?Its because Im making a game where when the player saves the pop up comes up over a 100 times and it's really frustrating, so I was thinking if you could remove the pop up entirely by using actionscript?I've found a script that shows the popup:System.showSettings(1);So is there a way to reverse this script? like System.hideSettings(1); ?

View 1 Replies

Flash :: How To Setup A Shared Library

Mar 3, 2009

Apparently, there is a way to have one library, update a symbol in that library, and have the one update be reflected in 10 different documents that share that library. However, I cannot find any (coherent) documentation on how to do that.

View 1 Replies

ActionScript 3.0 :: Shared Object Not Writing

Jun 9, 2009

I have a client who has a video that is to only play once when a user visits. So I created a shared object to create a param that the video has been played. It works perfect locally and on my live test site. However when the client posts it on his ning website in the header it doesn't work. The strange thing is that live and locally on my server you can see the shared object and it's size through the advanced tab in Flash's privacy settings.

View 7 Replies

ActionScript 1/2 :: Flash Log In From With Shared Objects?

Jul 10, 2009

So i want to create a flash log in and registration form for my flash game. THis game is played on your local PC not in the internet and i am using AS 2.0. So on the registration from i want to have two input text fileds: username and password. When you click on register the data from those fields to be saved as Shared Object and then on the log in when you type something in the log in fields (again two fields : username and password) the data that you wrote in those fields to pass trough the saved data as shared objects and if those two are the same then the log in is successfull if i want the movie to go on a certain frame whare it says access denied.

View 5 Replies

Shared Object In Flash For Stats?

Aug 23, 2009

I have a gane that uses shared object and keeps note of highscores and users names. So - if that is possible then I can set up teaching courses on standalone pcs can't I? ie: Databses I have in access can go in XML and the recording of position in course and results of tests can also be recorded using Shared object.Is that a good way of going about things OR should the whole thing go over to AIR and its sqlite system?

View 3 Replies

ActionScript 1/2 :: 1 Shared Object For Multiple SWF?

Sep 21, 2009

I have 2 ways of accessing info in my course files (SWFs): text-only and audio playback. I'd like to use shared object to store the user preference so it remembers the setting when navigating between screens. It stores info file but each file creates its own shared object.
 
for example:
<path to the swf>page1.swfcoursename.sol
<path to the swf>page2.swfcoursename.sol
<path to the swf>page3.swfcoursename.sol
 
Since it writes and reads the SOL file of its own folder, the user setting isn't remembered when switching pages.

View 3 Replies

ActionScript 3.0 :: Shared Objects: Trying To Get A Grip?

Dec 1, 2009

I am reading the official Adobe PDF, Flash_as3_programming and am trying to get a grasp ofthe creation and use of Shared Objects. While the text does explain a lot, I am not understandingshared object store. When a .swf file is embedded in a web page, the shared object store wouldbe on the web site that hosts the .swf file? Is this a directory that contains files? How would an.swf file loaded into a client browser access these if they are on the remote host of the web site?

View 5 Replies







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