ActionScript 3.0 :: Applying Two Class Files From A Package
Oct 28, 2008
I have a photo gallery, with a thumbnail panel (a photo viewer page) that I made, coding the AS3 from the key frame. It just so happens that I saw some class files online that have some good stuff in the tutorial.I've never really worked with .as files and I am intimidated by them.Would it be easier to modify my photo gallery, with a thumbnail panel, from key frame to .as AS3 code or to go from .as to key frame code? I personally feel more comfortable with key frame AS3, but I am not scared to dabble.How can I practice adding a couple of class files to my key frame AS3 code- I'm using regular variables, but the interesting idea I saw uses private variables and public functions, and it imports some stuff?
View 1 Replies
Similar Posts:
Dec 14, 2004
I have classes witch resides in this package :com.network.interface_as. When I try to load one class from that package in another class in the same package like this:
[Code]...
View 2 Replies
Jun 18, 2010
So basically i have my root folder with my fla and my document class in it, then I have a folder called 'main' with another class in it (Control)
But I can't seem to import my main.Control into my document class... (I would like to create an instance)
Code:
package{
import flash.display.*
import main.Control//is this wrong?
[Code]....
View 3 Replies
Jun 4, 2010
I would like to create an application whereby users can load in a number of files (images), manipulate them (move them about, basically) and then save the results. Easypeasy.Now, my users typically aren't the most IT-literate people in the world (teachers, basically) and will struggle to understand that in order to use the results elsewhere, they will be required to move all the images and the data file (xml, probably) to whatever computer they need to use it on, re-install the app and then put the files in the appropriate directory to be loaded in.
So, to minimise how complicated this will be, I'd like to create a package (a .zip, perhaps - although I'd prefer a bespoke filetype) that contains the xml and the images, meaning that only one file needs to be moved, which can then be loaded in either via a load dialog, double-clicking it or even drag-drop onto the open app.
View 3 Replies
Jan 30, 2009
I've have an asp.net app that uses flash for its navigation bar...the flash app uses two class files wrapped in packages that create the functionality of the whole navigation bar.When I run the swf file alone, the flash app works fine...but when I try it in the webserver it fails. Whats more, the flash app in the web server will work fine if I type the full URL to the swf file....it will not work however as an embeded object...and what I mean by that is that the flash app will show up embedded into the .net app but the additional functionality created by the other two class files fails!!!
View 1 Replies
Sep 22, 2010
I'm getting close to finishing the application I'm working on, and the person I'm working for is going to be distributing it via DVD. to package my flash file in some format so that when the user opens the file, it will open the swf in an internet browser?
The reason I need to do this is because I have some xml data in it that is keeping it from being fully functional unless opened in an internet browser. I'm not entirely sure why this occurs, because the file works fine in Flash Player on my computer, but not when moved to anyone elses. So, the workaround is to open it in an internet browser.
Anyway, I figure that in order to have the file open in an internet browser, it'd have to be packaged as an exe or some other similar file type, but we want it to be cross-platform.
Maybe there's an easier way, but I need to find out how to package my swf file so that it automatically opens in a browser.
View 1 Replies
Nov 5, 2009
Is there a way in AS3 to apply a class to an instance on the stage? Or is the only way to do it through the linkage menu in the library? The reason I ask is, I have a button class that I'd like to apply to only the button instances on the stage that meet certain criteria
View 1 Replies
Sep 21, 2009
Applying class to an instance on the fly?
View 2 Replies
Aug 27, 2011
Using flash professional CS5.5 - creating an Air for Android app. It appears you can't deploy any additional files, other than the swf file, In Air debug launcher (mobile) the additional files deploy.But as soon as you deploy it for real on an android machine it fails to install the extra files. (it's a small sqllite file).I have looked in the final APK file using zip and they are there in the assets folder.
View 2 Replies
Jan 22, 2010
Is it possible to package all external files, such as images and videos, into the final .swf or equivalent file? I want to keep the external files separate because it is easier to change them out while developing, but I don't want them to be external when delivering the project.
View 2 Replies
Jan 14, 2009
I am currently having a mc in my library use a class. The mc is duplicated and put on the stage. Inside the class the mc gets a rollover state. Problem is that, although the rollover listener and function 'works', any action that is given is applied to all objects linked to that class.
Code:
Select allpublic class cities extends MovieClip {
private var theStage:*;
public function cities(cityid:int, cityname:String, mymc, ref:*) {
theStage=ref;
this.alpha=.85;
this.buttonMode=true;
[Code] .....
So pretty much on rollover on one of the mc's makes them all alpha = 1 and rollout makes them all alpha = .85 instead of the one being rolled over. It does make sense I guess because they are all calling that same function I think. I also tried referring to the specific mc (mymc) instead of the parent and this.
View 2 Replies
Aug 18, 2009
I am created a circle using the following script,
[CODE]...
Now what i want to know is that can I increase the radius of the circle by applying tween class?
View 5 Replies
Jan 9, 2011
I wanted to design a [relatively] all purpose class to load images and SWF's with a preloader MC and error handler. I made this BUT, when I load the MC I cannot control it. i.e. I load an SWF containing an animated GIF, but I cannot say mc.gotoAndStop();
[Code]...
View 1 Replies
Dec 22, 2009
I wrote a class that performs an asynchronous loop. It needs a package name. I already have a util package, but feel resistant to put half of my classes in that package. If it really belongs there, I'll put it there, but I'd feel much better if I can find a more appropriate/specific package.
View 3 Replies
Jun 27, 2010
I'm having a bit of trouble getting a class to import.[code]...
View 1 Replies
Dec 14, 2004
I have classes witch resides in this package :com.network.interface_as. When I try to load one class from that package in another class in the same package like this:
Code:
import com.network.interface_as.SomeClass_A
class com.network.interface_as.SomeClass_B{
private var class_A:SomeClass_A;
public function(){
class_A = new SomeClass_A();
}}
I get error message that "class com.network.interface_as.SomeClass_A could not be loaded".
View 2 Replies
May 27, 2010
I need to assign dynamically a path to a xml file through Flashvars. How I can make it work?
I was able to get Flashvar from html page into swf with actionscript code on timeline[code]...
View 21 Replies
Dec 23, 2010
I need to assign dynamically a path to a xml file through Flashvars. How I can make it work? I was able to get Flashvar from html page into swf with actionscript code on timeline:
1. HTML � assigning Flashvars with swfObject:
Code:
<script type="text/javascript">
var flashvars = {};
flashvars.xmlfile = "xml/data.xml";
[code]....
View 4 Replies
Dec 17, 2009
I am somewhat new to OOP and am attempting to learn how to design and execute custom classes. My goal is to create a package that extracts data from an XML document. Do any of you have links, books or other resources you would recommend? So far, I've got the following:
[Code]...
View 8 Replies
Nov 2, 2010
I inherited a project and this thing is a real Frankenstein. It is a combination of external classes, flex xmls and action script on timelines of objects in various swf files. I have a situation where I need to access a class in a package a few directories up. For example my direcoty structure is similar to the following:
[Code]...
View 1 Replies
Jan 28, 2010
I need to use DataProvider class and i cannot find the package that contains it. In all examples I saw they use fl.data, but I'm using flex builder sdk 3.4 beta and it doesn't have such a package.
View 1 Replies
May 20, 2010
I'm developing an AIR application, where i need to access WindowedApplication's function from the package class. This is the Main application (Partial code)
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="initApplication()">
<mx:Script>[code].............
View 2 Replies
May 20, 2010
Is there any way I can get a list of all the classes in a particular package?
I know getDefinitionByName, getQualifiedClassName, and getQualifiedSuperclassName in flash.utils can find me a class, but I can't find anyway to find all the classes in a package at runtime.
View 1 Replies
May 27, 2010
I need to assign dynamically a path to a xml file through Flashvars. How I can make it work?
I was able to get Flashvar from html page into swf with actionscript code on timeline:
1. HTML � assigning Flashvars with swfObject:
Code:
<script type="text/javascript">
var flashvars = {};
flashvars.xmlfile = "xml/data.xml";
var params = {};
[Code]....
View 0 Replies
Jun 30, 2011
When I export assests for actionscript the defaul package is empty it there change to change it? To each time I export library asset for actionscritp default value for class field will contain package?
ex.
Class: assets.MyClass
View 0 Replies
Jul 24, 2011
I'm having a small problem with packing my classes at the moment.Here's my problem
Code:
map[1][1].addUnit(new Infantry);
map is an array of MapTiles which are a part of the "Map" package I've created. addUnit is a
[code]......
View 9 Replies
Jul 28, 2011
This is my code
ActionScript Code:
package test{
class Main{
public function Main(){
}
}
}
View 6 Replies
Feb 16, 2011
I have a main package that adds the background image to the project, from here on im trying to have seperate classes that add objects to the background as a parent and control these objects.my code in the main package:
package
{
import Dinos_Control;
[code]....
View 3 Replies
Jul 11, 2009
How do I configure an ActionScript Project in Flex Builder 3 Pro so that I can compile an ActionScript class that is part of a package into a swf. For example, the class that I want to compile to swf is:
package utils {
import flash.display.Sprite;
public class Tool extends Sprite {[code]....
RootASProject is being produced by one developer, subASProject1 and subSubASProject1a by another developer, utils.Tool by yet another person.This directory structure enables each person to independently build modules and other resources, and quickly test the entire product.It is also important to note that these resources are loaded at runtime.So, class definitions must be fully qualified. For example, Tool.swf contains/defines "utils.Tool" not "Tool".
Developing with just the Flash IDE, this directory structure is not a problem. We create a Tool.fla and assign utils.Tool as it's Document Class then in the Flash IDE's Publish Setting, we set the class path to be NOT the current directory (.), but instead the RootASProject directory. If it were set to the current directory, the error would be: A file found in a source-path must have the same package structure '', as the definition's package, 'utils'. ToolTool.as. We're familiar with this error message and so I recognize that the Flex IDE is by default looking in the current directory for a subfolder, utils, to match the packaged class.
In the Flex IDE, I can add the utils parent, RootASProject, as an additional source path, but I do not know how to stop flex from looking in the current directory first.Using an ant build file, I can set the source path to RootASProject and the mxmlc is able to build utils/Tool.swf just fine. Apparently, it uses just the source paths passed to it, and does not automatically look for utils in the current directory.
View 2 Replies
Feb 9, 2010
public function addNewMc():void{
var newMC:MovieClip= new MovieClip();
this.addChild(newMC);
}
public function removeOldMc(newMC):void{
this.removeChild(newMC);
}
How can I create a new MovieClip within a method, which can be used throughout the class, without defining it at the top of the class? And for extra points, without using return. I can get it to work, if the first function addNewMc returns the value newMC, and passing that to any other methods.
View 1 Replies