Professional :: Calling External As Classes?

Apr 2, 2010

If I have an external .as file that contains a function within a public class, how do I call it?I have succesfully used examples, but don't understand the way they are addressed, and get errors when I try to create my own.So if my .as file named external.as contains a public class named exampleClass, which contains a function named doThis(), is it called in CS4 using..

exampleClass.doThis();
or external.doThis();
If it's just exampleClass.doThis(); - how does Flash know where to look for it without

[code].....

View 1 Replies


Similar Posts:


Professional :: Calling Swf File From External Server?

Mar 11, 2010

I am working on a Vignette platform that doesn't support XML, so was told to place my swf file on an external server andcall it from that server in the html code. I have never done this before and need detailed instructions on how to get this executed

View 6 Replies

Professional :: What Classes To Import For This External As Code

Mar 21, 2010

Just wondering what classes I need to import into my external as fiule to make the following code work:
 
public static var loader:Loader = newLoader();        loader.contentLoaderInfo.addEventListener(Event.INIT, fontLoaded);        loader.load(new URLRequest("font.swf"));

View 3 Replies

Professional :: Loading External Swfs Extending From Classes In The Same Shared Codebase?

Jul 25, 2011

I'm currently developing a game in flash and want to be able to divide up my .fla assets in a way that means artists can work on a game menu .fla in isolation from the game.fla and rest of the game code.If I could briefly explain how I've approached this so far, I would be extremelyMy project is setup like this:HighScoreMenu.fla -> document class HighScoreMenu extending GameMenu class.game.fla ->document class game.asgame.as class loads the published HighScoreMenu.swf and manipulates the menu i.e. animates on and off screen via inherited functions in the GameMenu class.

Now this seemed to work to begin with, until my code evolved and upon going to publish my HighScoreMenu.fla flash started complaining about symbols being used in Game.as that were in Game.fla... If I'm only publishing the HighScoreMenu which extends from GameMenu then why is it even looking to compile Game.as

View 4 Replies

ActionScript 3.0 :: Calling Function Across Classes?

Aug 3, 2009

How do I call a function across classes? I have a primary class ("ChordLib.as") that contains a function that manages options for TileList component, that includes prescribing a custom Cell Rendering class, "MyRenderer".  I want to be able to call a function in the primary "ChordLib.as" class from the "MyRenderer.as" class.  Here is the function in "ChordLib" that refers to the "MyRenderer" class. Perhaps there is a way here to pass reference of the primary class into "MyRenderer"?

[Code]...

View 3 Replies

ActionScript 2.0 :: Calling MX Prototype Classes And Instances?

Jun 3, 2004

i'm rockin' with creating prototype classes, however, i've run into something i can't explain when i am trying to call my prototype classes--in this case, i have a prototype class called interfaceClass, which contains several class functions--i've also created an instance of the class, called 'ui':

interfaceClass.startGame=function(){
trace("startGame");
ui.resetGame();

[code].....

View 2 Replies

Actionscript 3 :: Calling A Classes' Method From Another Class In Flash

Sep 4, 2011

If I have a document class:

package {
import flash.display.MovieClip;
public class Main extends MovieClip {

[Code]....

View 1 Replies

ActionScript 3.0 :: Nesting Classes Then Calling Them On The Main Stage?

Jul 9, 2011

I having trouble nesting classes then calling them on the main stage.I have one AS file that contains all the functionality to create a simple button with a text field that can be customized from the FLA file. I want to use this AS file to create another AS file for a form.I have called the simple button from the AS file into my other AS using import RoundRectButton.

View 2 Replies

ActionScript 3.0 :: Calling The External XML?

Mar 16, 2009

I have a xml file placed in server, i want to call in my flash file using varXml.Load("\servernamefolderfilename") i tried this way but it doesn't understand UNC path.

View 1 Replies

ActionScript 3.0 :: Calling From An External Swf?

Jul 22, 2009

Im loading in a swf file - which works fine. However, I cant seem to call a mc from the external swf to the swf that calls in the external.

I tired pointing to a mc from the external swf using: root.inv_1.x=345; However, this doesn't work...

Heres how i'm calling in the swf:

ActionScript Code:
var Xpos:Number = 0;
var Ypos:Number = 200;

[Code].....

View 2 Replies

ActionScript 2.0 :: Calling External SWF - XML Does Not Appear

Jan 22, 2005

I am with a problem, I have my main file that has the normal menu that he would be principal.swf, I is using this to call the other .swf that he would be noticias.swf, that would have a project of the news in xml.
Code:
// AS do button menu 2 chamar noticias.swf.
menu2_mc.onPress = function (){
loadMovie("noticias.swf", 1);
};

What I am using in xml is this
Code:
// noticias xml
stop ();
// System.useCodepage=true
// call xml e css
var estilo = new TextField.StyleSheet ();
[URL]

My problem is following, when I compels my file noticias.swf it appears normal with the news, but when I am in the file principal.swf and click in button 2 menu it brings me the file noticias.swf but without xml, xml does not appear no way.

View 2 Replies

Xml :: Creating And Using External Classes?

Jan 5, 2012

I'm new to flash, as3 and this forum so any help would be great!I've made an xml gallery, all the movieclips and everything have been created dynamically and the images are being loaded through an xml file. Except two buttons which are in the library and have the linkage names next_btn and prev_btn.

Now what I want to do is, I have 3 categories of galleries, so I want to convert my script into a class which I can use for every type of gallery. (I hope I'm being clear)When the user clicks on gallery, a the function startGallery() is called.

I need to know how to go about it I'm pretty much clueless, I've read a WHOLE LOT of tutorials about classes but I really can't understand how to do this.

[Code]...

View 1 Replies

ActionScript 3.0 :: Calling An External Function?

Jun 30, 2009

Here's a coding question for the guru's I've written a simple function that will clear a form.  I want to call this function from another function (4 of them to be exact).  I could copy and paste code multiple times and everything will work.  But where's the fun in that?  There's something to be said about clean code.
 
For sake of explanation, the tween are working 4 layers that are on top of each other (don't ask )
 
Code:

[Code]...

View 2 Replies

ActionScript 3.0 :: Calling Swf From External Server

Mar 8, 2010

I need to call an XML file from an external server and don't know how to place within the source html code.

View 9 Replies

ActionScript 3.0 :: Calling GotoAndPlay From External AS

Apr 26, 2011

I have two files, the regular .fla file and an external .as file.Basicly at one point in the .as file I get information of what tag to send the timeline and play and have to use the function gotoAndPlay from the timeline in the .fla file.This is the .as file:

import flash.display.Sprite;
import flash.events.Event;
import flash.events.IOErrorEvent;

[Code].....

I don't know how to redirect to wherever I want in the timeline from the .as file.

View 7 Replies

ActionScript 2.0 :: Calling An External Swf Duplicates The Swf

Jan 22, 2009

[URL]

go to media>> aikido pictures then click some other menu option, then click media>> aikido pictures again, you will see that the main menu of the pictures is not the same, it is repeating itself adding itself? how to prevent to do it, click on select view at the bottom and you will see two select gallery and two view images

View 0 Replies

ActionScript 3.0 :: Calling External XML File?

Jul 9, 2009

I'm trying to drop in a quick mp3 player into a site that creates a playlist from an XML (to the folks at ClickPopMedia for the basics of the code). It works fine in the Flash testing environment, but when I put it online, or even on my local testing server, the playlist doesn't load ,just an empty space where the List component should be. I get this error in the debugger in the Flash environment even thought it works (C:htdocs is my localhost):Quote:Error #2044: Unhandled ioError:. text=Error #2032: Stream Error.URL:file:///music.xmlat Mp3Main()[C:htdocsTrafficEntertainmentTE_sitephpsitemus icPlayerMp3Main.as:26]I'm assuming it's some sort of pathname or URLRequest issue but Every file involved is in the same folder for now. Do I need to do something different because it streams?The AS (only a portion):

ActionScript Code:
package {
import flash.events.*;

[code].....

View 1 Replies

Beginner Calling External File

Apr 13, 2009

I am struggling with what seems to be a simple problem. Searched and can't find the answer, it seems. I have an FLA I said I'd edit for a friend... just a few simple text edits. However, when I go to publish the movie, it makes a call to an external "State Manager" that it can't find, so the movie loops endlessly. Here is the actionscript: Code: Select allimport com.exanimo.managers.StateManager;

So I'm guessing it's looking find that at that domain. I guess that's the doing of the original programmer. However, I have noticed that there is a StateManager.js file on the webserver in the same directory where the SWF resides. Have I received an old FLA that pointed externally instead of to the local js manager? How can I change the syntax so that it finds the state manager locally?

View 1 Replies

ActionScript 2.0 :: Calling External Video?

Jun 24, 2005

is it possible to load a video (quicktime, mpeg, etc) into an empty movie clip in flash or do you have to import the video into the library?what i would want to do is call a video file, that would change or be overwritten on a regular basis, to play in an empty clip. i would want to be able to do this without having to REimport the video everytime

View 3 Replies

ActionScript 2.0 :: Calling Functions From External SWF'S?

Aug 19, 2007

its a site about interior design. my job is to add some code to do something. i checked the code and his approach is not so good.. he's coding inside objects and frames at the same time. (ive read many actionscript books and this is a really bad practice). Here's the problem... he wants this to be implemented in the site...1.) in the gallery there is a scrolling thumbnails, he wants this to pause about 4 seconds then it will start to scroll..(ive already fixed this by creating a function interval.

Here is where my problem is...2.) When you click the thumbnail, the enlarged view will pop up.. the enalarged view are external swfs... the client wants that when you click on the thumbnail, the scrolling will stop and the external popup enlarged image will come out...this external swf has an exit button to go back to the main gallery window which is another swf... so the client wants that when you hit exit from the external swf popup window, the scrolling will resume.... im having a hard time figuring this out because i dont know how to call a function from an external swf to the main movie (the gallery page) Ill post the fla of main movie, gallery and a single external swf link of the thumbnail. just click on the first picture that will appear on the gallery

View 1 Replies

ActionScript 3.0 :: Importing The External Classes?

Feb 8, 2009

I'm having some problems with importing classes in AS3. I'm kinda new to flash and programming in general. I searched on these forums and couldn't find anything in regards to importing an external class. I'm trying to import the tweener class and I used the code: import caurina.transitions.Tweener; on the first frame of the symbol I'm trying to load the class in. But I get a syntax error and an error that says "statement must appear within on/onclipevent handler".

View 2 Replies

ActionScript 3.0 :: Runtime External SWF Classes

Jun 26, 2009

I usually lurk, but on and off over the past 2-3 months...I've been trying to solve a problem and I can't seem to find a good solution for it. Here is my problem: - I have a SWF that acts as a Shell. This shell will contain the Design Template, the functions/class calls to make it run, and a call to the external SWF that contains all the core code classes.

- My main goal for this setup is to separate the front end Design part (which can be edited and modified relatively easily) from the core code. Now the core code is something the person making the Design Template should not have to mess with. They call it and they are done; they can now use the classes for most of the functionality they will need.

- The problem is, when I change the external SWF with the core code and distribute it... the Design Template needs to be recompiled to get any updates the external SWf core code has made. I want this to be done at runtime so that the user will not have to recompile their Design Template when the core code is updated. - Now, I've seen some people talk about a runtime library... but you have to go into the IDE and set things up a certain way or something something... I don't want that. Is there a way to make all this work in actionscript?

[Code]...

View 6 Replies

ActionScript 3.0 :: Can't Communicate Between Mc's External Classes

Feb 15, 2011

if one can't communicate between mc's external classes how can you create stuff?I have a timer inside each instance form a bomber_mc via a external class:this timer places bom_mc's on the stage from the location of bomber_mc (there are several). But I want to do a do a collisiondetection test with each bom and yet another kanon_mc.can you give me a hint in the right direction?

View 14 Replies

ActionScript 3.0 :: External Swf Classes Loaded?

Mar 5, 2012

I have external swf (ext.swf) that is loaded in my FlashDevelop as3 project.When I make check (objectsList[0] is Class1) I am getting false even though the objectsList[0] element is Class1. The Class1 is in the ext.swfBut when I write command like (objectListInExternalSwf[0] is Class1) in external swf and then use that swf in my project and make check (objectsList[0] is Class1)My question is: do I have to use all the classes in my external swf so the compile

View 1 Replies

Actionscript 3 :: Import Classes From External SWF?

Jun 23, 2010

I have a bunch of classes in an SWF file. I'd like to use them in my Flash project.[code]...

View 1 Replies

Actionscript 3 :: External Swf Classes Loaded?

Mar 5, 2012

I have external swf (ext.swf) that is loaded in my FlashDevelop as3 project.When I make check (objectsList[0] is Class1) I am getting false even thoughthe objectsList[0] element is Class1. The Class1 is in the ext.swfBut when I write command like (objectListInExternalSwf[0] is Class1) in externalswf and then use that swf in my project and make check (objectsList[0] is Class1)I get true. My question is: do I have to use all the classes in my external swf so the compilerhave to put them in the swf so they can be used in other projects where the swf is loaded as external?

View 1 Replies

ActionScript 3.0 :: Runtime External SWF Classes?

Jun 25, 2009

Here is my problem:

- I have a SWF that acts as a Shell. This shell will contain the Design Template, the functions/class calls to make it run, and a call to the external SWF that contains all the core code classes.

- My main goal for this setup is to separate the front end Design part (which can be edited and modified relatively easily) from the core code. Now the core code is something the person making the Design Template should not have to mess with. They call it and they are done; they can now use the classes for most of the functionality they will need.

- The problem is, when I change the external SWF with the core code and distribute it... the Design Template needs to be recompiled to get any updates the external SWf core code has made. I want this to be done at runtime so that the user will not have to recompile their Design Template when the core code is updated.

- Now, I've seen some people talk about a runtime library... but you have to go into the IDE and set things up a certain way or something something... I don't want that. Is there a way to make all this work in actionscript?

Additional Notes:

- Yes, it must be an external SWF. My requirements are adamant about not using an .as file.

- From my tests (though a bit fuzzy and may be flawed) an include statement will work in runtime. Correct me if I'm wrong.

- I've seen some PNG encryption method for games suggested somewhere. I haven't tried this (because encryption isn't the main goal...), but in theory, would this make the code from an updated core code external SWF refresh in realtime without recompiling the Design Template SWF file?

View 0 Replies

ActionScript 3.0 :: Merging External Classes?

Feb 21, 2012

I was doing some search and it seems like it's not possible to use 2 external classes. So I was wonderinge them into one. I tried it in many different ways but it still doesn't work.I'm new to as3.This is the code I would like to merge into the next one:

Code:
public class main extends TopLevel {
var accord:accordion;

[code].....

View 3 Replies

ActionScript 2.0 :: Running External Classes To Fla?

Feb 16, 2007

let say i have this external class

Code:
class Test extends MovieClip
{

[code]....

View 2 Replies

ActionScript 3.0 :: External .as Files Without Classes?

Mar 14, 2009

Let's say you have a ton of code in your timeline but none of it is classes. Is it possible to put these into several external .as files? If so, how do you include them?

View 6 Replies







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