Actionscript 3.0 :: API - Make GMap Be An External Class

Sep 25, 2009

I'm trying to use GMap API in Flash CS4. When I code in the main timeline, it works. However, I wanna to make this GMap be an external class, but it doesn't work, also I didn't get any error either so can't really tell where is wrong:

[Code]...

View 1 Replies


Similar Posts:


ActionScript 2.0 :: GMap AF Component Is Definitely Broken?

Sep 27, 2009

it seems GMap AF Component is definitely broken and the google maps flash interface at google code, is broken too. looks like there are only two options here:

- move to AS3 (in what spare time shall i learn it?)

- open a shadowbox with the map (rather than pop-up or new window)

View 4 Replies

ActionScript 3.0 :: Play Gmap Api In Flash?

Oct 30, 2009

I'm wondering is there anyone playing gmap api in flash?

I coded a GMap class, it works good in basically. However, I wanna make it more functional, with the buttons for changing differernt maptypes and scroll bar.... so i looked through the doc from gmap google code group. However, i get the error said:"1061: [url]...[code]...

View 2 Replies

ActionScript 3.0 :: Gmap In Flash - Add Maptype And Zoom Controller?

Nov 8, 2009

how to add maptype and zoom controller. next step, it's adding a maker on the map. I think it should be easy but I keep getting error said:"1180: Call to a possibly undefined method Maker." weird~ i have import all class into my as, and maker is belonged to com.google.maps.overlay.*; so I assume it should work well.

[Code]...

View 1 Replies

ActionScript 2.0 :: Make A Class That Loads In Some External Data?

Mar 28, 2005

Im trying to make a class that loads in some external data, and then creates some arrays in the class, which names and content are based on the data that are loaded.What i have now, is something like like this:

[Code]...

I guess my problem is, that i dont know how the reference the "root" of the class.What i want to be able to do with this class is this:

[Code]...

View 7 Replies

ActionScript 2.0 :: Make A Class File That Loads In Some External Data

Mar 28, 2005

Im trying to make a class that loads in some external data, and then creates some arrays in the class, which names and content are based on the data that are loaded. What i have now, is something like like this:

[Code]...

View 4 Replies

ActionScript 2.0 :: Make A Player(i Call It Professor) Class Held In An External .as File?

Oct 6, 2003

I'm building a game in which I have different player objects which will behave differently. I want to make a player(i call it professor) class held in an external .as file. I need to be able to assign onEnterFrame attributes in for this class in the external .as file and I'm encountering some difficulties. here is my .as file

//professor constructor
_global.Professor = function ( skin, thrust, decay, maxSpeed )
{
this.skin = skin;

[code]...

The constructor is working fine, along witht he getSkin function, but I can't get the onEnterFrame function to work. It is my understanding that once I instantiate an instance of the Professor class that the onEnterFrame function should kick over and start sending my trace statement to the debugger at the current frame rate.

ps. here is the code in my .fla

#include "Professor.as"
playerOne = new Professor("mathews");
playerOne.getSkin();

View 1 Replies

ActionScript 3.0 :: TypeError: #1009 - Make A Popup Alert Modal Window Thing With An External Class

Apr 15, 2011

I'm trying to make a popup alert modal window thing with an external class. I have a simple swf set up with just some random sample text, a rectangle, and a button. What I want to happen is for the "alert" class to initialize upon startup of the swf and then when I click the button (instance: btn), the alert will show up. If I get rid of all AS in the swf and set alert as the document class, it shows up just fine, so I think it should be working, but for some reason I get this instead when I try the button function:

[Code]...

View 9 Replies

ActionScript 3.0 :: Using An External Class To Reference Functions From Another External Class?

Mar 25, 2010

I have a Main.fla which loads Main.as as its document class. In Main.as I have a public function named "Main" which runs a trace. I also have another .as file called Preloader.as, which also has a public function in it, this one named "Preloader" with simple trace in it. I just cannot figure out how to use Preloader() from the Preloader class in Main() from the Main class. Main.as loads up fine when the SWF loads and traces.

View 10 Replies

ActionScript 3.0 :: Creating A New Instance Fails When Base Class Is Assigned To An External Class File?

Jul 22, 2009

I'm trying to create a new instance of a MovieClip when the original one has been used. Would sound easy enough. Just use: var

instanceName:ClassName = new ClassName();

the class name/mc in the library im trying to duplicate is MCg1 so

var instanceName:MCg1 = new MCg1(); right?

However, the particular object in the library i'm trying to duplicate has a base class that is an external class file (just to control it's drag drop functionality)... i.e baseclass is not set to the standard flash.display.MovieClip, or whatever the case maybe. So i end out with a: TypeError: Error #1009: Cannot access a property or method of a null object reference.

View 6 Replies

Actionscript 3 :: Access Function In External Class Located In External Swf

Oct 22, 2011

I am trying to access a function in a loaded swf that has external class.. I would like to avoid having to put the function on my "Main" Doc class in the external swf and instead access the function directly from the class

This is what ive tried so far and it's a no dice:

private function startLoad(){
var loader:Loader = new Loader();
var req:URLRequest = new URLRequest("one.swf");

[Code]....

View 1 Replies

ActionScript 2.0 :: Make Class Instances Into Listeners And Broadcasters From Inside Each Class?

Jul 8, 2007

I want to know how to make class instances into listeners and broadcasters, from inside each class. Here is what I am trying specifically... part of the Proj class... (projectiles, as a matter of fact)

Code:
private function listen():Void {
u.register(this);
onUpdate = function(){
step(); // a function I have which makes the projectile move (not shown)
}
}

where "u" is another class, the Updater class with this code...

Code:
class Updater {
// const. --- make this a broadcaster
public function Updater(){

[code]....

PS: What is the syntax for using AS2 code tags instead of just "[CODE|"?

View 2 Replies

ActionScript 3.0 :: Loading External Swf Which Attached With Its Own External Class?

Jun 27, 2009

Lets say I have Main.swf and sub.swf, and I wanna load sub when I press a button from Main, but sub.swf has its own external class file attached, so here is the problem, when I load sub using loader class and I would get this message from the output panel:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at subScript()

seems loader class can not access sub.swf's external class when sub is being loaded.

View 1 Replies

Actionscript 3 :: Use The Class Datatype To Make A Class A Property?

Jan 9, 2011

can I use the Class datatype to make a class a property, then create new objects from that class? Like so:

class Foo{
private var ExampleClass:Class;
public function Foo(exampleClass:Class){

[Code]....

View 1 Replies

Actionscript 3 :: Make A Preloader Class Instead Of Having It In The Document Class?

Nov 1, 2011

I have built a basic preloader that runs in my document class. I'm having trouble with it.I'm guessing its due to what a class can and can not access from the stage?theres 2 problems. the first is that I cant change the keyframe the stage is on from the class. the second is im getting an error 1009 if I comment that out.

package
{
import flash.display.MovieClip

[code]........

View 1 Replies

ActionScript 3.0 :: Can't Make An Instance Of A Class In One Class?

Mar 31, 2011

I'm having a problem where I can't make an instance of a class in one class like I can in other classes all in the same package. When I call the update function from another class it doesn't work. I traced the xPos of the instance of the class I was talking about and I get zero, but that is incorrect so I'm thinking it's the above problem. If anyone knows what the problem is please tell. Here's my code:

[Code]...

View 1 Replies

ActionScript 3.0 :: Inheritance / Interface - Override A Function That Return An Object Of Class A And Make It Return An Object Of Class B Which Extends A?

Aug 4, 2009

I'm having some troubles with the use of interface and inheritance in AS3. I've done lots of OOP in the past and what I'm trying to do seems obvious to me, but doesn't work in AS3. The question is : Is it possible to override a function that return an Object of class A, and make it return an Object of Class B which extends A ? It seems not to be possible, since I'm getting a signature error in Flash, when compiling. For example, the following set of class do not compile (the code in function definition doesn't matter):

[Code].....

View 3 Replies

Actionscript 3.0 :: Get Xml From External Class?

Feb 15, 2011

I'm trying to call an external API which returns XML, and i have no problem doing that.

Afterwards I wanted to refactor my code, and I moved my API call to an external API.as class, but how do i return the XML to my main class?[code]...

View 4 Replies

ActionScript 3.0 :: Accessing Class From External Swf?

Sep 29, 2010

I have created an SWFloader class that creates a container on the stage and loads an external swf into it. How can I click a hotspot in the external swf and make it instruct the loader class to load a new external swf? Basically, how can I access the SWFloader class from the timeline of the external swf?

View 1 Replies

ActionScript 3.0 :: Cannot Load External Class?

Mar 31, 2009

I'm using the tweener class in this file just fine. But whenI try to use the sound manager class I cannot get it to load why?I keep getting type was not found ....

import com.richardsongraphics.soundmanager;
var manager:SoundManager = new SoundManager();
=======================================

[code].....

View 2 Replies

ActionScript 3.0 :: Using DataProvider In External Class?

Oct 26, 2009

I am creating a Flash form which will include a drop-down selection menu from which a user may choose their state. I originally accomplished this by adding a ComboBox to the stage and then populated the ComboBox's DataProvider object with an XML listing of all the state names and the corresponding values. Everything works as expected.I have decided, however, that it would make the most sense to create an external class to accomplish the same thing. I have attempted to create such a class using the following code:
 
package {
import fl.data.DataProvider;
import fl.controls.ComboBox;[code]....

I am new to creating external class files so I am not sure why the new object is not populated with any data.

View 3 Replies

Professional :: Loading Class From External Swf?

Jun 14, 2010

I found some code that let's you load variables from an external swf. I'm trying to adapt it so that I can use the symbols from external swf library in my main swf. I get an error telling me 'call to an undefined method...' and then the name of the symbol I am trying to import to the main swf (testMe123_MC). Here's the code of my external swf as:

[Code]...

View 1 Replies

ActionScript 3.0 :: Run An External TimeDate Class?

Jul 31, 2011

package
{
public class TimeDate

[code]........

View 16 Replies

ActionScript 3.0 :: Regards To External Class Scripting

Mar 12, 2012

For my Flash class, my professor is making us create a four room "adventure game" created entirely in an external class with ActionScript. I know how to get things set up,

View 1 Replies

AS3 :: Flash - Instantiate Class From External SWF

Oct 28, 2009

I was chatting with my buddy about this, he is convinced you can do this and says he has done it, but I cannot get this to work.

I am wondering if it is even possible at all. I tried typing a var as a Class that is within the externally downloaded SWF and then making an instance but no can do.

some code

private static function onCompleteHandler(e:Event)
{
dashboardObject = e.target.content;
// registerClassAlias("Dashboard", ); doesnt work

[Code]....

So it seems you cannot make an instance of a class unless it is complied within the project SWF. Which if true is what I want it to do. I do not want people trying to make instances of my classes just from downloading the SWF file for what I am building here.

View 5 Replies

Actionscript 3 :: How To Call And Use An External Class

Mar 19, 2012

I have this cool As3 MP3pitch package, which I got from here:

package components
{
import flash.events.Event;

[code].....

View 2 Replies

ActionScript 3.0 :: Reference External Class Using It?

Feb 11, 2009

How do we create a class file and use it in seperate flash file

View 0 Replies

ActionScript 3.0 :: HitTestObject From External Class?

Dec 3, 2009

I am having trouble having an external Class detect when it collides with an object that I have added to main stage. I have physically placed a MovieClip to the stage and given it the instance name of "hitZone_left". When I publish the files I get the error: "Access of undefined property hitZone_left".

Code:
package flash
{
import com.caurina.transitions.*;

[code]....

View 1 Replies

ActionScript 3.0 :: Loading External SWF With Class

Dec 18, 2010

I have encountered a problem loading an external swf in my application. The external swf file is using a class and when I load it in my other flash it didnt load I think the class have a problem!!. I use the flash.system.ApplicationDomain and LoaderContext. It didn't have no effect in the my flash program.

View 0 Replies

Actionscript 3.0 :: Use External Class Without Import?

Nov 10, 2009

Am new to classes and as3, just starting to ge the hang of it, but i not fully, so here is some Q's.Fist of i have a Document class, from it i want to call a function in a separate as file. the only way i know of is to, do an import and then instantiate or go static on it's tookus?

But now i got my hands of some pice of code, that uses separate class files without any trace of import, how do they do this?Also if i want to be able to use all the functions from a separate as file in my document class, just like i do if i extends it, but without extending int, how do we do this? do i always need to go ClassName.function() ? or can we do it like in C++

"using ClassName"
//ClassName.function();
function();?

View 1 Replies







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