Actionscript 3 :: Concept Similiar To Pointers In As3?

Jan 24, 2012

Is there a concept of pointers or anything similiar to that in as3?

I have used a concept of

var mc1:MovieClip;
var mc2:MovieClip();
var mcCommon:MovieClip = new MovieClip();
mcCommon["myptr"] = mc1;
mcCommon["myptr"] = mc2;

Where would I get to read and learn more about this concept. I'd like to get simple answers, as I am not an expert in as3. I'm still learning.

View 3 Replies


Similar Posts:


IDE :: Looking To Get Some Pointers On A Game?

Jun 17, 2009

Mainly looking for pointers to the tutorials I am sure exist (but which I can't find). But I am also very open to any general or specific advice you may have to spell out for me in the thread. I am looking to build a PBBG (Persistent Browser Based Game) which, while single player, has some few multiplayer elements. Indirect interaction. One example of this is a commodities market - yes, the good old space trading, fly to one planet and buy, fly to another and sell scenario. I want every player to impact the inventory of each planet, and to have that inventory affect the buy/sell margins, etc. Other Indirect interaction would be bars et al, where players can chat, maybe (a BIG maybe) trade inventory and such. It seems direct, but it is not fighting one another or fighting at each other's side, etc.; so to me it is 'indirect' to the game. But that isn't why I'm here (feel free to impart any wisdom you have anyway, if you so desire); just an aside to explain a bit about the game.

[Code]...

View 1 Replies

Make A Clock With Hand Pointers?

Oct 20, 2011

I'm thinking of making a simple clock design and adding hand pointers that tell the time.
 
a)how hard is it to add action script to the hand pointers?

b)can i use the clock on my desktop to show time?

View 3 Replies

ActionScript 2.0 :: Pointers With Calculator-like Interface?

Jul 27, 2009

Need pointers from the good folks here. I need to create an interface illustrated in the link below:

Calculator-like interface (GIF)Scenario 1) When the user clicks either the button 30 or 60, it will update dynamic textfield (value1) with the corresponding value 2) When the user clicks either the button 45 or 73, it will update dynamic textfield (value2) with the corresponding value

3) Dynamic textfield (output) will dynamically add the values of 'value1' and 'value2' and generate the total.

How do I go about scripting the interface?

View 1 Replies

Pointers For Designing Simple Interactive Game?

May 13, 2009

I'm looking to build a very simple (hopefully!) interactive game.

- A number of balls are situated at the bottom of the stage.

- There are several dropzones which the balls can be placed in.

-Once a dropzone is occupied with a ball, its not possible to populate that the dropzone with another ball until the present one has been removed. -Depending on which balls are present in the dropzones, the balls animate differently. the red ball is placed in a dropzone.  There are currently no other dropzones populated with a ball.

[Code]...

View 5 Replies

Flash :: Creating A Function Within A Loop (pointers?)

May 27, 2010

Im trying to create a simple loop that creates 50 buttons, adds them to screen and then when a button is pressed, it traces out that number. I can get it to work by doing stuff I consider hacky (such as using the buttons X/Y location to determine its value), but I'd rather just be able to hold a single value in the function.

The code itself is:
for (var a:int = 0; a < 5; a++) {
for (var b:int = 0; b < 10; b++) {

[code]........

View 3 Replies

ActionScript 3.0 :: Loading Queue / Function Pointers?

Jul 10, 2010

I am trying to implement a queue for loading external assets. Is there a way to make what I am trying to do work?Basically, each time a loading handler function is called, it gets the loaded data and then it calls loadComplete(), which triggers the next function in the loadQueue array.I am able to successfully place a function into a variable of type Function and then call it, but the part where I am adding the variable to an array is failing.

Code:
package
{
import flash.display.MovieClip;
import flash.events.Event;

[code]....

View 3 Replies

ActionScript 3.0 :: Annoying Handling Of Function Pointers

Oct 31, 2010

I'm not sure if you've noticed this, probably not, but function pointers in AS3 run much, much slower than calling the function directly. It's a recent finding, and an annoying one. I use function pointers a lot. An obvious example would be to easily change the behaviour of a certain object. Say I have a class that controls movement, it has a class level function variable called UPDATE (ie public var UPDATE:Function), and 3 or 4 actual functions it can point to.

This always me to quickly/easily change the behaviour of an object. Say for example I want an object to run on different movement code once it's collided with something, I can just do UPDATE = movement2; etc. However, a pointer for a function runs about 15 times slower than running the function directly, therefore I need a replacement. And I really have no idea why there is this absurd disparity in speed between the 2. With some variables, accessing a reference is faster than accessing the variable directly, obviously not with functions. What would you advise as a nice, simple replacement solution for the above example?

View 14 Replies

ActionScript 3.0 :: Website Architecture Using MVC Concept

Jan 2, 2010

I'm developing a library + workflow for easy (hierarchical) navigation management inside website or application. From popular - can be somehow compared with Gaia Framework and PageManager from Soma Framework (I do personally don't like these implementations because they quite limit development even if they say they don't). I used to develop website so that each section(sub-section, sub-sub-section...) is an instance of a custom class (that extends DisplayObject: Sprite, MovieClip or whatever Flex container even), that contains logic and data in "single layer" manner... and all the view coponents aswell (texts, thumbnails, whatever).

Each of those sections is implementing INavigableObject interface and has navigationHelper (way of composition pattern), which helps with all navigation stuff. So. This approach was OK. But with my last project I felt need to use MVC design pattern, so I decided to refine my navigation stuff. And so therefore I have a question: how does hierarchy looks like when using MVC (any implementation.. custom one or any popular framework like PureMVC..) for website development?

View 2 Replies

ActionScript 2.0 :: Understanding The Currentframe Concept

May 19, 2005

so I'm still learning the basic concepts. Attached to a movieclip used as a button I have this actionscript:

[Code]...

Which basically causes the movieclips 'leaf1' to shrink, 'vinefade' to go to its first frame, 'artween_mc' to unload, and for all other commands on this button to be disabled. I also want it to check another movieclip called 'leaf9', and see if it's current frame is at less than a particular frame number (73), because if so I want it to start playing forward. Once it reaches this frame number (73), I want to cause linkstween_mc to become visible and hit9button (also a movieclip) to become enabled. My current script does absolutely nothing to leaf9

View 6 Replies

ActionScript 3.0 :: Understanding A Basic Scripting Concept

Jan 16, 2010

I'm currently reading the book Learning ActionScript 3.0 and have dificulties understanding some programing basics due to my total lack of prior programing knowledge.For example now I'm looking at this script from the book that traces a list of all display objects on the stage and their children:[code]I understand everything except one thing. When there is an object with children (DisplayObjectContainer), the function traces the object but doesn't proceed and calls itself starting all over again this time analyzing the first child of the object. And if the child also have children itself the list will branch out until there is an object without children.What I don't understand is how the function at this point knows how to return to the last parent object and continue to analyzes  its other children if any.For example when the function analyzes the stage of a scene with the following content how does the function know to continue analyzing child0. To me, looking at the code, I would expect the function to exit after listing [object StaticText]. I have hard time understanding what makes the function go back to largeContainer and continues with its child0 and so on.[code]This all what the book says regarding this which is not enough for me to understand this process:the function calls itself again. passing in the object currentlybeing inspected. This concept is called recursion. A function calling itself mayseem redundant, but it can be very useful. In this case, each time the functionis called, it receives a new display object to analyze, so the function reportsthe contents of that specific display object. The result is a complete walkthroughof all display objects, no matter how many children each may have.

View 5 Replies

ActionScript 3.0 :: Dirty Loader Unload Concept?

Dec 22, 2010

I have load external swf file with loader. The external swf file have animation with embeded mp3 file . when i click the btn unload the external swf file .external swf file is unload ok. But Problam is after few seconds sound is hearing. I think  animation still running in  backend when reach the first frame sound is hearing.
  
var ldr:Loader=new Loader()ldr.load(new URLRequest("test.swf")) addChild(ldr) btn.addEventListener(MouseEvent.CLICK,unloadmovie) 
function unloadmovie(e:MouseEvent){    ldr.unload()    SoundMixer.stopAll()        }

View 5 Replies

ActionScript 3.0 :: Does Polymorphism Concept Allowed In Classes?

Feb 25, 2011

Is polymorphism is allowed in class? I mean without using get and set accessor.

View 1 Replies

Flash :: IDE - Create With A Flip Book Concept

May 15, 2009

i want to make a e-magazines,and i want to create with a flip book concept with flash... can i learn about this? where can i find the tutorial about this?

View 1 Replies

ActionScript 2.0 :: Scope Concept: How To Call User-defined Function

Jul 15, 2009

i am quite newbie towards to actionscript 2.0 cos i am now learning on actionscript 2.0
here is the file attachment for you to check.Greetings.zipOutput cannot be worked.I am hoping to see the exact output:Greeting = Hello!Salutation = undefinedSubject: Brick Oven

View 2 Replies

ActionScript 3.0 :: OOP Concept - Including Exits = New Array - Structure Level Class?

May 20, 2009

I'm dabbling in OOP, but I'm nowhere near proficient yet. I have two classes, house() and town(). In house's constructor, I want to define an exit from the house to town. I've set up a Doors and Exits array in the base class, and in house, I add town to it:

Doors = new Array(new trigger());
Exits = new Array(new town());

This way, I can check if the player is colliding with the trigger, and if so, I can set level to Exits[i] or wherever it is. My problem is, including Exits = new Array(new town()); in house's constructor calls town's constructor, and town has an array Exits, which leads back to house and so on. So my question is: How would I get around this problem or structure my level class? Is it possible to use "town" to get to new town(); without manually checking if("town"){ new town(); } etc. Basically, I want to tell flash to create a new town() WHEN I need it, not necessarily during the initial construction, but I don't want to have to manually call "new town();"

View 3 Replies

ActionScript 3.0 :: Rotating Billboard Concept Discussion - National Geographic Design?

May 25, 2010

I have been charged with creating a rotating billboard for our new company website and I am in the conceptual phase of design.Everyone in the office likes the functionality of the National Geographic home billboard... with its automatic rotating images, pause functionality, and content launching frames.So far I have correctly mirrored the functionality of the National Geographic billboard by physically embedding images into a flash movie and creating mouse click events for buttons and the images themselves.

Design Question:Can Flash emulate the National Geographic presentation? Their images are called upon request, rather than being embedded into a large single movie file like mine. This would allow a non programmer to design a new image billboard and update the website remotely...

View 2 Replies

ActionScript 2.0 :: Tree Structures - Replace Pointers To Nodes With Nodes Themselves

Jan 26, 2006

For those unfamiliar with tree structures, tree structures are usually dynamic lists where every node has a pointer to two other nodes. They are arranged so it makes for faster searching and stuff and are very useful in programming languages that offer direct access to heap memory. Although I don't know if there would be benefits of making tree structures in AS would be of any help but I decided to have a go at it anyway. Since there are no pointers in flash I tried to just replace pointers to nodes with nodes themselves. Such things usually work in java I think because the language just automatically makes pointers for variables.

[Code]...

View 3 Replies

ActionScript 2.0 :: Create A Game That Has A Similar Concept As Dance Dance Revolution?

Apr 2, 2004

i'm trying to create a game that has a similar concept as Dance Dance Revolution - if shown is a down arrow then press down, if up arrow is shown then press up ...i'm having problems with the "if shown is a ... arrow" part - i managed to get pressed key check working, so if you press the correct key you'll progress but if you press the wrong one the appropriate action will execute.

in frame 1 i have the movieclip that contains the arrow display with the following code:

onClipEvent(keyDown){
if (_global.x = "up") {
if (Key.isDown(Key.UP)){
gotoAndStop("down");

[code]....

looks ok to me, but when i tested by changing the if condition for the mc action to if (_global.x = "down") the thing still executed as if _global.x = "up" .

View 2 Replies

ActionScript 2.0 :: Can't Seem To Grasp The Concept Of Arithmetic In Actionscript

Feb 5, 2009

I can't seem to grasp the concept of arithmetic in actionscript.

View 8 Replies







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