Home Tutorials Forums Articles Blogs Movies Library Employment Press
Home » Actionscripts library »  Shared Objects

Add Trailer Circle (Random) v3.0

//startDrag("nt_mc", true);
//startDrag("main_mc", true);
Mouse.hide();
main_mc._alpha = a;
a = Math.random()*101;
n = random(222);
m = random(h++);
x = random(601);
y = random(300);
g_mc = random(19);
rot = random(4);
//.show
g_mc++;
main_mc.duplicateMovieClip("main_mc2", g_mc, i, i);
n++;
//nt_mc.duplicateMovieClip("nt_mc2", n, i);
xmov = 3;
main_mc._x += xmov;
main_mc._rotation = rot
main_mc._x= x;
main_mc._y= y;

Posted by: Muhammad Junaid Attari | website http://media.3lo.net/media/flash/add_trialer_circle.html
anti-refresh valuation
// if the SWF in implementet in an HTML page
// so you can check if -for example- the startanimation should start..
obj_ft = SharedObject.getLocal("runfirstime");
function setFirst() {
        obj_ft.data.firstime = "run";
        obj_ft.flush();
}
if (obj_ft.data.firstime != "run") {
        trace("that' s the firtstime we meet!");
        // this will be shown in the first time
} else {
        // this will be shown after refesh
        trace("hey - i know ya");
}
setFirst();

Posted by: andi haas | website http://www.flash.andihaas.de
SysConfig Class
/****************************************************************************************************************************

Author: Eric Feminella
Copyright: (c)2005 http://www.ericfeminella.com
Issued: August 28, 2005
Class: SysConfig


------------------------------------------------------------------------------------------------------------------------------


Implementation: SysConfig
- Intended for writing and retrieving user-specific settings on the client


constructor:
var varname:SysConfig = new SysConfig();
- Arguments: none


Methods:
1.) writeConfig();
- Arguments: none
- Returns: nothing

2.) readConfig();
- Arguments: none
- Returns: String



Example:
1.) For returning specific configuration settings
var varname:SysConfig = new SysConfig();// instantiates new instance of SysConfig class, initializes user configuration settings
trace(varname.os);// returns users Operating System


2.) For writing and returning all settings from local disc
var varname:SysConfig = new SysConfig();// instantiates new instance of SysConfig class, initializes user configuration settings
varname.writeConfig();// calls method writeConfig(); which writes user configuration settings to local shared object(LSO)
trace(varname.readConfig());// reads and returns user configuration settings from local shared object



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



class SysConfig

{
        
        
        
        public var os:String;
        public var version:String;
        public var printing:Boolean;
        public var language:String;
        public var audio:Boolean;
        public var video:Boolean;
        public var res_x:Number;
        public var res_y:Number;
        public var accessability:Boolean;
        public var flashcomm:Boolean;
        private var config:String;
        
        
        
        
        
        
        
        
        public function SysConfig() {
                this.os = System.capabilities.os;
                this.version = System.capabilities.version;
                this.printing = System.capabilities.hasPrinting;
                this.language = System.capabilities.language;
                this.audio = System.capabilities.hasStreamingAudio;
                this.video = System.capabilities.hasStreamingVideo;
                this.res_x = System.capabilities.screenResolutionX;
                this.res_y = System.capabilities.screenResolutionY;
                this.accessability = System.capabilities.hasAccessibility;
                this.flashcomm = System.capabilities.hasScreenBroadcast;
                this.writeConfig();
        }
        
        
        
        
        
        
        
        public function writeConfig():Void{
                var SysConfig_lso:SharedObject = SharedObject.getLocal("user_sys_config");
                SysConfig_lso.data.os = this.os;
                SysConfig_lso.data.version = this.version;
                SysConfig_lso.data.printing = this.printing;
                SysConfig_lso.data.language = this.language;
                SysConfig_lso.data.audio = this.audio;
                SysConfig_lso.data.video = this.video;
                SysConfig_lso.data.res_x = this.res_x;
                SysConfig_lso.data.res_y = this.res_y;
                SysConfig_lso.data.accessability = this.accessability;
                SysConfig_lso.data.flashcomm = this.flashcomm;
                SysConfig_lso.data.
                SysConfig_lso.flush();
        }
        
        
        
        
        
        
        
        
        public function readConfig():String{
                var read_config_lso:SharedObject = SharedObject.getLocal("user_sys_config");
                this.config = "Operating System: " + read_config_lso.data.os + "\nLanguage: " + read_config_lso.data.language + "\nFlash Player Version: "+ read_config_lso.data.version + "\nAudio Enabled: " + read_config_lso.data.audio + "\nVideo Enabled: " + read_config_lso.data.video + "\nPrinting Enabled: " + read_config_lso.data.printing + "\nScreen Resolution: " + read_config_lso.data.res_x + " x " + read_config_lso.data.res_y + "\nAccessability: " + read_config_lso.data.accessability + "\nFlash Comm Available: " + read_config_lso.data.flashcomm;
                
                return this.config;
        }
        
        
}

Posted by: Eric Feminella | website http://www.ericfeminella.com

Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.