ActionScript 3.0 :: Make Classes Talk To Each Other And Am Using Folders?

Feb 3, 2012

I haven't scripted in AS3 is a while and can't remember having these issues. Perhaps it's because I've been using less strict languages like lua, ruby/php, and java that has made this difficult to get back into.

I am trying to make classes talk to each other and am using folders in an attempt to make things a bit easier for me to track.I have a document class in the base folder known as Main and right now one other class located in com/Game/ known as NewGame.as

Now the issues I am having is basically the Main.as sets up the stage. Puts on the starting buttons, interface, etc. The NewGame.as is called from the Main when the NEWGAME button is clicked. I have gotten that working properly, a few hang ups on error 1061.

[Code]...

View 6 Replies


Similar Posts:


ActionScript 3.0 :: Sub Classes & Folders - Make Folders Inside Of My Main Folder But It's Not Working?

Jul 11, 2010

I've worked wioth sub classes so I know how they work but I always work with everything all in one folder which can get messsy when there are a lot of classes to work through. So i started to make folders inside of my main folder but it's not working. Thought it may be to do with package names but as far as i know, for the whole "classes in separate folders" things that's how they are supposed to be.

View 2 Replies

ActionScript 3.0 :: NetStream Choppy - Make A Character Start To Talk When The Sound Starts And Stop Talk When The Sound Stops

Aug 5, 2010

Need to make a character start to talk when the sound starts and stop talk when the sound stops so I'm using this:

[Code]...

View 2 Replies

ActionScript 3.0 :: Classes/External - Get Two .as Files To Talk To Each Other?

May 20, 2011

I'm an animator by trade and don't have a ton of experience with classes or any advanced programming. Here is what I'm dealing with:

I isolated the code that I'm trying to work with so I don't have to post all the code on here because there is a ton of it. It's in two separate .as files in the same folder, BaseClass.as and Nav.as

::BaseClass.as::
package classes {[code]...........

Basically I need to put an external interface call where I'm currently tracing "THIS IS WHERE THE CODE NEEDS TO GO" that tells the external interface a new page is being loaded. I was wondering if anyone had any advice trying to get these two .as files to talk to each other.

View 1 Replies

ActionScript 2.0 :: Reconnect To Classes Files Or Folders?

Jul 23, 2010

I am in cs3, publishing as version 7, using actionscript 2. It is asking to be linked to my classes because of the error messages I am receiving.

what to link to in classes. Is it the file, the folder or folders with sub folders?

View 0 Replies

ActionScript 3.0 :: Packages And Directories - Reorganize Classes Into Folders?

Jul 8, 2011

I'm trying to re-organize my classes into folders, currently they're all just in the same directory and it's very messy, so I've tested this out in one feature, being the bullets. So bullet.as is in the directory: [main source]/Classes/Turrets/Ammo

I so in the bullet.as file I have coded as follows:
Code:
package Classes.Turrets.Ammo {
import flash.display.MovieClip;
import flash.events.*
public class Bullet extends MovieClip {

Now this works, the bullet is fired on to the stage, however it behaves profoundly. For some reason it does not move at all or behave how it does when it is fired from the turret object, the bullets behave perfectly though when I just simply put them in the same directory as the source .fla. What can I do to easily re-organize my classes into folders without turning my objects into malfunctioning pieces of junk?

View 2 Replies

ActionScript 2.0 :: How To Make Child1.swf Talk To Child2.swf

Jan 9, 2009

I have a Parent.swf that has 3 Child.swfs. Child1.swf, Child2.swf and Child3.swf loaded onto Loader1, Loader2 and Loader3, respectively. How can I click a button on the Child2.swf and have it affect Child3.swf? I have alread searched a bit on these forums and found some code. I can put

[Code]....

View 2 Replies

ActionScript 2.0 :: Flash - Make A Swf Talk To Another Swf On A Webpage

Aug 31, 2006

I am trying to make a swf talk to another swf on a web page, i.e. to separate flash pieces would be able to pass information back and forth to each other on a page. I have some thoughts on how this might work, but I am curious if anyone has done this before, and or what you would think the best way off achieving this would be. Haven't found much about this topic on the web...

my initial thought would be to have flash update something like an xml file via a webservice, then have the other piece constantly look for a change in information, but that seems forced.

View 4 Replies

ActionScript 3.0 :: Embed 2 Separated Swf Files In A Html - Make Them Talk With Each Other?

Dec 4, 2009

if i embed 2 separated swf files in a html, how can i make them talk with each other? does it use javascript?

View 3 Replies

ActionScript 3.0 :: Make Folders Inside Of Main Folder But It's Not Working?

Jul 11, 2010

i've worked wioth sub classes so I know how they work but I always work with everything all in one folder which can get messsy when there are a lot of classes to work through. So i started to make folders inside of my main folder but it's not working. Thought it may be to do with package names but as far as i know, for the whole "classes in separate folders" things that's how they are supposed to be.

View 1 Replies

ActionScript 3.0 :: Make It So When You Click On A Back Folder, It Slides Off The Screen And Come Back In Front Of All The Folders?

Jan 13, 2009

I have a project (see attached) where I need to have the folders seem like they are floating in space, and I need the best way to make it so when you click on a back folder, it slides off the screen and come back in front of all the folders.

View 2 Replies

ActionScript 2.0 :: Can Several SWF's Talk To Each Other

May 12, 2011

I would like movie C, to be the "bully"and order movie B to load itself into the highest layer of movie A.can one movie control the fate of an another movie, and tell it what to do ?I've tried many variations loadmovie and targetting...no luck !

View 5 Replies

ActionScript 3.0 :: Talk To A Swf Inside A Swf?

Dec 7, 2009

I have a preloader.swf that loads index.swf I want to be able to have some actionscript inside preloader.swf that tells index.swf to gotoAndPlay(2);Is there a way to do this. Basically I don't know how to talk to the swf inside the swf, meaning I don't know what the path would be like.This is what my actionscript looks like right now:

Code:
var req:URLRequest = new URLRequest("index.swf");
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, fileLoaded);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, preload);

[code]....

View 1 Replies

ActionScript 3.0 :: Talk To Class On Loaded SWF

Feb 17, 2009

I have my main swf that loads another swf:

PHP Code:
private function initPreview(e:MouseEvent):void{
v.stop();
var req:URLRequest = new URLRequest("Presenter.swf");
var ldr:Loader = new Loader();
ldr.load(req);
presenterHolder.addChild(ldr);
[Code] .....

Where I am loading I need to talk to that playlist object. In my PlaylistLoader class I have a function called setPlaylistID(). I need to somehow pass a number to that function of the loaded swf.

View 1 Replies

ActionScript 3.0 :: Movie Clips Talk To Each Other?

Jun 4, 2009

Basic scenario:Two movie clips with instance names- words_mc and examples_mc on the stage.When words_mc gets to Frame 35, I want to it to tell examples_mc to move to a particular named frame within examples_mc.The frame in examples_mc is named strawberry.On Frame 35 in word_mc, I've placed:examples_mc.gotoAndPlay("strawberry");I'm getting an error:1120: Access of undefined property examples_mc.

I've tried:
this.parent.examples_mc.gotoAndPlay("strawberry");
I've tried:

[code].....

View 2 Replies

Flash :: Why Can't Get Javascript To Talk To ActionScript

Feb 9, 2010

I have a very simple flash program that plays music. It consists of a play pause button and a timer that shows the current position of the song. I'm trying to make it possible to pause or play the song using a regular form button.

[Code]...

When I click the button, Firefox's error console says "Flash is null" What am I doing wrong?

View 4 Replies

Asp.net Mvc :: Use A Flash Front End To Talk To ASP.NET MVC Controllers?

Feb 2, 2011

I guess flash can talk to web services, but can one use Flash/Flex in web pages to post back to MVC Controllers (other than via javascript)?

View 1 Replies

Javascript :: Use Flash To Talk To The Socketserver?

Feb 4, 2011

I am working on a chatting app that makes use of flash sockets. I don't want to code the entire interface in flash, so I was hoping to just use flash to talk to the socketserver and call js to modify the dom.

View 2 Replies

ActionScript 3.0 :: Talk Between Client And Server

Feb 5, 2009

I'm trying to be able to see all the connected users to my swf. I know how to trace it out server side but how do I send it back to my swf so I can see it? I get a success responder but my value is null.[code]

View 0 Replies

ActionScript 3.0 :: Talk To A Parent From A Child SWF?

Oct 20, 2009

I have an swf that is loaded in when a button is CLICKed, anyway inside the SWF file I want to access a function from the parent, how do I do this?

also can I access instance names from the parent file?

View 1 Replies

ActionScript 3.0 :: Talk To A Class On A Loaded Swf?

Feb 17, 2009

I have my main swf that loads another swf:

Code:
private function initPreview(e:MouseEvent):void
{
v.stop();

[Code].....

Where I am loading I need to talk to that playlist object. In my PlaylistLoader class I have a function called setPlaylistID(). I need to somehow pass a number to that function of the loaded swf. I cant figure this out for the life of me.

View 1 Replies

ActionScript 3.0 :: How To Make Reusable Rocket Classes

Jul 11, 2010

The sequence basically involves rockets being fired when an appropriate timer event is triggered. Each instance of a rocket has a code which looks for a mouse click event, and then tells it's parent (I've called it "gameplayzone") to remove it from the scene.I've got a problem where:I'd also like to be able to update a score variable held in the gameplay zone (add 50 to it's current value for example)I also want it to modify a "lastcolour" variable in the parent, which is a string. The lastcolour variable is used to see if the play is clicking rockets of the same colour, which is used to calculate a combo points bonus.

The biggest issue however is that I'd like the gameplay container to simply be able to add a new instance of a rocket when I want to, but also define that specific instances values (x position, y position - but also xVel, yVel and yAcc which are properties inside the rocket class)This is a blunt question, but... What's the best way to do this?

View 5 Replies

Flash Talk To Html To Initiate Button?

Oct 29, 2009

I was wondering how to accomplish this. I have a .swf embedded into an html file with html links on the top. Within the .swf file I have a continue button that takes the user through all the frames. Is it possible to include some kind of code so that when they reach the end of the .swf the "next" link will become initiated and take the user to the next .html page. I am working with captivate is this feature in captivate? If anyone could point me in the right direction or share some wisdom it would really make my day

View 1 Replies

ActionScript 3.0 :: Talk To External Swf Mcs From Main Fla File

Sep 8, 2011

I have a main fla file that loads an external swf into a holder mc, let's call it 'swfloaderholder', when a menu item clicked. Inside the external swf's fla I have a holder mc, let's call it, 'jpgloaderholder' that loads different jpegs. Is there a way to 'talk' to the 'jpgloaderholder' from witin the main fla file?

View 5 Replies

ActionScript 2.0 :: Flash Menus Talk To One Another Via ExternalInterface?

May 8, 2009

I'm trying to have two flash menus talk to one another via ExternalInterface, but for whatever reason the javascript function isn't being called.

I have two menus, topMenu and tabMenu. The idea is for clicking on one to, among other things, send a message to the other.

[Code]...

Obviously I haven't put the code in for two-way communication, but I want to get this working. As of now, clicking the button on topBit does absolutely nothing. No errors from Firebug, and the alert doesn't come up, so goBetween() isn't being called.

View 2 Replies

ActionScript 2.0 :: Getting Flash To Talk To A Visual Basic Or C++ App

May 5, 2004

I was just wondering if anyone out there has had any luck trying to get a flash app to talk to either a visual basic or c++ application? I need to build a player [flash embeded into the vb or c++ application] that when the user say, pushes a button, calls a function or action from within the app. Any Idea How would I go about this?

View 1 Replies

ActionScript 3.0 :: How Protected Can Make Code - Inside The Swf Vs Classes

Jan 17, 2010

I am going to sell the swf and I was wondering if my code was protectd from the decompilers -- and is their away to protect your classes

View 2 Replies

ActionScript 2.0 :: 2 Classes - Make Them To Comunicate With Custom Event.?

Nov 13, 2008

You have some examples of how works custom events in as2? If I have 2 classes that extends movie clip, how can I make them to comunicate with custom event.?

View 1 Replies

ActionScript 3.0 :: Button Talk To Follow Mouse Object?

Nov 6, 2010

I'm making a flash page with a basket movie clip that follows my mouse. The basket has a stop action on frame one so it stays there unless directed otherwise. Then I have a movie clip of a green berry that I made into a button (titled gb1). I need to make it so that when that is clicked it makes the basket go to the next frame (numbers change to show how many berries were collected). Here is my (unsuccessful) code as of now.

//1.
stage.addEventListener(Event.ENTER_FRAME,followBas ket);
//2.
function followBasket(event:Event):void {
var dx:int = basket.x - mouseX;

[Code]....

View 1 Replies

Actionscript 3 :: Extending Any Class From MovieClip Make Both The Classes Fixed

May 8, 2011

I have a library symbol, exported for Action-Script and to Frame1. Now in the document Class, i write

public class Test
{
public function Test():void
{

[Code]....

Now the code works fine but when i write my own (sealed/fixed) Box Class that surely Extends MOVIE-CLIP, statement-2 gives error , i know the Box Class is not dynamic but the Movie-Clip is Dynamic. Now what i understand that Movie-Clip Class being dynamic becomes fixed/sealed when it is extended by any Fixed/sealed Class???

View 1 Replies







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