ActionScript 2.0 :: Where Is The Drawback To Just Making _global Standard Practice

Mar 4, 2004

I recently read an article about prefacing your variable w/ _global. And I think it rocks!hy is this practice taboo?Why do so many tutorials insist you remember the scope of every movie clip?It seems to me that memory space is memory space

View 2 Replies


Similar Posts:


Actionscript 3 :: Practice Making A Simple Video Phone?

Apr 29, 2011

I'm trying to practice making a simple video phone app so I'm trying to make a program to send a video and recieve a video using Cirrus from Adobe. I'm having trouble recieving the stream though. Here is the cod that I'm using:

[code]...

Inside of the getVideoReveiver() function I'm getting the flag to go off from writeText("flag") then I get and output in the text box of:

NetStream.Play.Reset
NetStream.Play.Start

from the netStreamHandler, but the video never shows up in the receiving video element.I'm running this is two different videos of the same computer and taking the nearID from one stream and pasting it into the textInput theirID. I'm not sure what to try next?

View 1 Replies

ActionScript 2.0 :: _global SetInterval - Change To A "local" Function Instead Of "_global"

Sep 2, 2003

I have my setInterval that is set this way:

[Code]...

I was wondering how I might change this to a "local" function instead of "_global". I've been trying, but my syntax is either screwed up or just just plain doesn't work.

View 13 Replies

Actionscript 3 :: Best Practice About Xml Deserialization In It?

Mar 31, 2012

What is the best practice about xml deserialization in ActionScript 3?

I'm developing a real time multiplayer Facebook game. I prefered writing client side with Flash. Beside, server-side is written with Java. Communication between server and client is provided with "socket".Server and client sends xml to each other. As might be expected those Xmls contains "objects" which are derived from classes located in both side.[code]...

View 1 Replies

ActionScript 3.0 :: Displaying Movieclips Best Practice?

Dec 11, 2009

I am working on a new project involving displaying and playing different movie clips depending on choices made by the user. What is the best aproach for this sort of thing, ie addChild/removeChild or visibility or whatever?

View 1 Replies

ActionScript 3.0 :: Best Practice For Multiplying Swf In Flash Page?

Oct 16, 2010

In my page i use animated swf for button. And at the moment page knows how many buttons there needs to be via category nodes in xml so i made a loop to load in the right number of same swf-s. Is there a bettery way to do that like load swf only once and than duplicate it via script?

View 4 Replies

Silverlight :: Which Is The Best Design Practice For Edit Data In RIA

Feb 26, 2011

First of all it is a UI design question Which is the best design practice for edit data in RIA, for example in Flex or Silverlight? I would like to show customer's details, but there will be an edit window, than the datas of customer will be editable. I would like to show a new form where the data can be edited. What is the simplest way to show this form. I can make my ui tabbed, so I can open the form in a new tab, or I can open the form in a popup/modal dialog (Save-cancel). Maybe I can use in line editing. What is the most user friendly solution in a Silverlight or Flex GUI? What is your opinion?

View 3 Replies

ActionScript 3.0 :: Db In Flash Or Best Practice Data Store

Nov 9, 2009

I have a particular problem where I normally would use a db and php for back end but in this case I cant. its a small app that would consist of 4 tables category, price, product, and product_association. the product_association would store which category and type the products are associated with. so as an example if you have cars. you might have off road as the category the cost would be 20-25k could be suv. now a product can belong to more then one category but only one price. trying to figure what the best way to simulate a relational database with in flash. thinking objects, arrays, how to do the relationships.

View 0 Replies

ActionScript 3.0 :: Best Practice For Multiplying Swf In Flash Page

Oct 16, 2010

In my page i use animated swf for button. And at the moment page knows how many buttons there needs to be via category nodes in xml so i made a loop to load in the right number of same swf-s. Is there a bettery way to do that like load swf only once and than duplicate it via script?

View 2 Replies

ActionScript 3.0 :: Is It Good Practice To Use Static Variables?

Feb 5, 2010

I've always used this way to refer to variables on my document class
Code:
MovieClip(root).variablename
But that complicates things because I would need to extend my class as a displayObject and then add it to the displaylist to be able to use "MovieClip(root)" to access the variables in my document class.. as long as variables in my document class are set out as public variables..

I didn't realise you could refer to variables on the document class by just using something like:
Code:
documentclassname.variablename
With the the variable on the document class as "public static var". This solves a lot of problems.. as now I do not need to keep adding objects to the displaylist to get access to the document class variables..

Now.. My question is..Since I want to access most of my variables on my document class.. I would need to set them all to "public static var".. Would setting 100 or so variables to "public static var".. have any disadvantages? Like performance issues... Or anything else which may make it not be as efficent if I were to keep them simply as "public var" and use "MovieClip(root).variable" to access them?

View 10 Replies

Web Development :: Using Flash On A Website Homepage Considered Bad Practice?

Jan 6, 2010

We are revising our company website and I wondered if it considered bad practise to use flash on the home page.This would cause issues for those users who dont have flash installed (and maybe dont want flash)

View 3 Replies

ActionScript 3.0 :: Best Practice : Keep Track Of Multiple Dynamic Buttons?

Feb 13, 2009

Using the for loop i create many buttons and add events to them;

[AS]
for (var j:Number = 0; j < all_objects.length; j++) {
var dump = new Sprite ;
dump.graphics.beginFill (0x41C5D2,.5);// flash button color default=0x41C5D2[code]....

I need to know which button is pressed, so i use the (tricky) unprofessional methode: event.target.name.the question is; how can I know which button is pressed, using a custom event, this custom event should pass some vars to the called function, including the j var (from the loop)actually I tried setting a custom event using the example at the noponies accordion menue class, but it's so complicated to get working.

View 5 Replies

Professional :: Best Practice For Speeding Up Animation - - Increase The Frame Rate

Mar 5, 2010

What would be best practice for speeding up an animation? - Increase the frame rate, or is that considered cheating (already set to 25)? The alternative would be to manually adjust the length of the tweens on each layer.

View 2 Replies

Media Server :: Live Stream Reconnect / Disconnect Best Practice

Apr 19, 2010

When streaming a live event through FMS 3.5, is there a list of guidelines or best practices to handle the situation when the stream disconnects and should reconnect.Basically, what I do now is wait 20 seconds after the initial disconnect, then close the stream and ask the user to ty to reconnect to the stream again.

View 3 Replies

ActionScript 3.0 :: Toggling Video Fullscreen And Positioning Videoplayer UI - Best Practice?

Oct 12, 2011

I've landed a project which is centered around building a custom video player with some special functionality (so I can't just use the default Flash video player, unfortunately). I have two small 'problems' in the sense that I could probably solve them myself, but I'd like some input on best practice for solving them: (The project is for Flash Player 10 and the video is intended to run inside a browser.)

Problem 1: Toggling between normal / fullscreen playback Ok, so my custom video player needs to be able to toggle between fullscreen and normal embedded-in-webpage player size. How does fullscreen toggling currently work in AS3 -is there a specific AS3 method for fullscreening a specified video object in the swf (without stretching the video player UI overlay), and if so, does it automatically black out the background if the screen format doesn't match the video format? - or do I need to download a class for this?

Problem 2: Positioning video player UI when going fullscreen As opposed to YouTube, I want the player UI to still show up when the video is toggled to fullscreen mode - but as mentioned above, I don't want to stretch its size along with the video. So is there a best practice for repositioning the video player UI to the vertical bottom and horizontal center of the screen when the user clicks full screen? I'm not entirely familiar with what happens to the Flash stage when it goes full screen, How to deal with not knowing the coordinates of the vertical bottom/horizontal center when screens have different ratios and resolutions?

View 3 Replies

ActionScript 3.0 :: Best Practice - Recommended Order In Which To Arrange The Imported Classes?

Apr 10, 2011

There are a few things regarding best practices in ActionScript that I would like to know about:1. When a class uses other classes located in the same package, I know that it is not necessary to import them.But what is the best practice ? Should they be imported, just for the sake of clarity and order or is it recommended not to import them ?2. Is there a recommended order in which to arrange the imported classes ? I am just interested if there is a general idea regarding the order.Maybe display object classes before event classes, maybe event classes before component classes, and so on.3. Is there a recommended order in which to arrange the class properties and methods Regarding the properties, private, public, protected, constants. Regarding the methods, private, public, protected, getters, setters.Again, I am simply looking for best practices and recommended practices regarding these issues, I am aware that they are not essential to the code and that each person can choose to do different things.

View 12 Replies

Professional :: Best Practice For Full Browser Video To Achieve Highest Quality?

Nov 2, 2011

I'd like to get your thoughts on the best way to deliver full-browser (scale to the size of the browser window) video. I'm skilled in the creation of the content but learning to make the most out of Flash CS5 and would love to hear what you would suggest.Most of the tutorials I can find on full browser/scalable video are for earlier versions of Flash; what is the best practice today? Best resolution/format for the video? If there is an Adobe guide to this I'm happy to eat humble pie if someone can redirect me to it; I'm using CS5 Production Premium.I like the full screen video effect they have on the "Sounds of pertussis" web-site;

View 1 Replies

ActionScript 2.0 :: Get A Value Of _global.id Var Outside The Function?

Jan 6, 2010

i want to get a value of _global.id var outside the function. Here is the code

var xml = new XML();
xml.ignoreWhite = true;
xml.onLoad = loadXML;[code]....

when i trace _global.id out of function it is undefined, and when i trace it in the function it gives 1, which is ok. How can i get that value out from function?

View 4 Replies

ActionScript 2.0 :: How To Return _global

Aug 5, 2004

orrect the syntax of my code:Code:firstOne = _root.content.content_group+_global.whichOne;I have 3 movieclips called content_group1, content_group2, etc. I have a button that calls this: _global.whichOne = "1";Now, how can I correct that code above so I get content_groupX?

View 3 Replies

ActionScript 2.0 :: Using _global For New Sound?

Feb 20, 2006

is that a bad thing? or does it not matter? sorry if i missed a post where this has already been cleared up eg..

[Code]....

View 3 Replies

ActionScript 2.0 :: Using _global With Functions?

Aug 28, 2008

I am using _global to declare my vars and funcs. On the whole it makes things easy for me. However, I have come up against something that I cant fix.

Code:
_global.swipeCount = function() {
if (c >= 3) {
text01_mc._visible = 0;
text02_mc._visible = 1;

[code]....

This function is called from some MCs that have a simple single-layer, timeline-tween with an action at the last frame calling this function. The problem is that _root.swipe_mc.stop(); never executes. The MC keeps playing. I can however make it _visible = false; So it is finding the correct path.

View 1 Replies

ActionScript 2.0 :: Different Between _root And _global?

Jun 4, 2009

difference between _root and _global when dealing with variables or point me in the direction of a good explaniation on the web? I feel like there is something basic I am missing. For example the other day I was working on making some scenarios. In a nut shell I was setting up dynamic text boxes where the text would changed based on what the student selected (via buttons).

When the varible was changed (by clicking the button) the text wouldn't refresh when it was a _global, but would refresh when it was _root. Everything is working fine but I've been trying to understand the "why" it works this way.

View 3 Replies

ActionScript 2.0 :: _global Good Or Bad?

Mar 4, 2004

I recently read an article about prefacing your variable w/ _global.

And I think it rocks!!!

Why is this practice taboo?

Why do so many tutorials insist you remember the scope of every movie clip?

It seems to me that memory space is memory space.

View 2 Replies

ActionScript 2.0 :: Inserts The FIRST _global Property?

Apr 9, 2010

I have a button with a list of _global settings:

_global.practiceName = pName.text;
_global.practiceStreet = pStreet.text;
_global.practiceCity = pCity.text;[code]....

Then I have a MC with a dynamic text box with some AS:

practiceInfo.text = practiceName+' - '+practiceStreet+", "+practiceCity+", "+practiceState+" "+practiceZip+" - "+practicePhone+" - "+practiceSite;

The problem I am having is it ONLY inserts the FIRST _global property! Only the pName.text goes in. Am I missing something here?The practiceInfo.text works great if I manually state:

practiceName = "AbC";
practiceStreet = "1235 Way";

View 1 Replies

ActionScript 1/2 :: Declare _global Variable In Swf

Mar 22, 2012

I have a swf page where the external swf will load, there is any way to declare variables who work in all swf. What I am trying to do is: like a switch, with several options in which all these are listed in the main swf

View 9 Replies

ActionScript 2.0 :: Simple _global Not Working

Aug 27, 2003

This is plain and simple, why is it not working? BUTTON

[Code]...

View 7 Replies

ActionScript 2.0 :: Change The Value Of _global.valA In The Different Frames In B?

Jul 23, 2010

I have this code in an mc.

//////
function musikstil(a,b){
a.onRollOver = function(){

[code]......

View 3 Replies

ActionScript 3.0 :: Alternatives To _global Variable Path?

Jun 8, 2009

through out a very old complicated fla there are buttons which set variables using _global paths
 
such as:
 
function menu1_2(Event:MouseEvent) {
global.mode = "hide_hotbox";
MovieClip(this).gotoAndStop("stage_1_b");
}
 
How can I make the variable "hide_hotbox" and others like it accessible and changeable from any movie clip -- whether they be nested in other movie clips or on the main timeline, etc?

View 6 Replies

ActionScript 2.0 :: Detect Change In _global Variable?

Nov 18, 2010

how do you detect change in a _global variable?

This following is the code I am using which watches for change. (only the local variable)

ActionScript Code:
// Declaring the variable
myVar = "AtoF";
// Callback that will be triggered every time there is a change

[Code]....

I use _global to declare the global variable and its not working with this code.

View 0 Replies

ActionScript 2.0 :: _global Variable Doesn't Work?

Jun 17, 2005

I'm getting frustrating Why in Gods name this example doesn work???kirupa2 loads kirupa1 in which is _gloal variable setup (_global._myVariable = "XYZ")After clicking on PLAY button trace outcome is undefined

View 6 Replies







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