ActionScript 3.0 :: Flash Importing Class From Different Directories

Apr 26, 2011

The easy version of my question is this. I have a main.swf that calls and loads smaller swfs. There is a text field in the main clip that holds descriptions (descriptionText). What I am trying to do is to be able to change that text with a string (feedback) from the loaded clips. So in other words, pass a string value from the loaded clip to the main clip and set the descriptionText.text = feedback.

I have worked out (unless there is another way I am not aware of) that I need to use an external class to do this. The issue is that the smaller clips have to live in a folder called "images" to function on our LMS and I can't figure out how to import the classes into my large clip and smaller clips because they are in different directories. I can post some code if needed.

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Access A Class In A Package A Few Directories Up?

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

ActionScript 2.0 :: Importing Class - The Class Being Compiled - 'ImageLoader' Does Not Match The Class

Jun 25, 2007

I'm having some problems importing a class, the message that Flash gives me is this; The class being compiled, 'ImageLoader', does not match the class that was imported, '[URL]'. The only line of code in my flash movie is this: import com.martijndevisser.*; And yes, the class is in that folder The class is from here: [URL] I've used the class before and it works fine, I just dont know what to do?

View 4 Replies

Flash :: AS3 Importing A Class To Main Timeline

Nov 20, 2011

I have a air for android project going and I am wanting to import a actionscript class for use in the main timeline. I wrote the class and imported it, but I get the following errors: Line 1 5001: The name of package 'com' does not reflect the location of this file. change the package definition's name inside this file, or move the file. Here is from the timeline

[Code]....

View 2 Replies

Saving A Swf To Two Different Directories In Flash?

Aug 12, 2010

I want to compile an FLA that I want to use as resources for two slightly different application in two different folders.

something like this

library.FLA

-> bin1/lib.swf

AND

-> bin2/lib.swf

I could just copy them manually, but with multiple files there's always room to forget one file.

View 2 Replies

Professional :: Copying Directories Of MovieClips Between Flash Files

Oct 6, 2010

I am having problems copying directories of movieclips from one flash file to another. They appear to be fine until I save it, then when they are reloaded they are missing a parent movie clip, and all of the children are blank.

View 2 Replies

Actionscript 3 :: Parse The Virtual Directories That Are Constructed In The Flash Library?

Jul 6, 2010

Is it possible to make code in actionscript-3 to parse the virtual directories that are constructed in the flash library? I mean that if i add a folder on the library of CS4 called 'graphics' can i write code that parse the elements of that folder in order to fill an array with folder's elements(which are BitmapData classes) ?

View 1 Replies

Flash :: Using Standard OS Dialog To Browse For Files And Directories In Action Script 3.0

Dec 22, 2009

I know very little about Flash so I apologize in advance for asking what is possibly a dumb question, although I did a fair bit of research before posting. Our current Flash app, written in AS3.0, is able to display a standard OS browse dialog for the purpose of allowing a user to select files. We are using [URL] to display this dialog.

The documentation for FileReferenceList states that only files could be selected. The new requirement is to allow the user to select directories as well as files. Afterward it would be very nice, but not required, to be able to get a recursive list of all the files in the selected directory. Is it possible to implement this in Flash running inside a browser? The closest I've seen so far is [URL] which does what I want but it only seems to work inside Adobe AIR and is not exposed to the browser.

View 1 Replies

ActionScript 2.0 :: Importing Class Into Custom Class?

Apr 4, 2007

I'm not allowed to import classes into other classes but I am not sure how to achieve what I want. I want 2 custom classes to pass data one from another directly. I have 2 custom classes I want to use: one extends the XMLSocket Class:

class Game extends XMLSocket {
import XMLParser //not allowed to do this I know!
var parser:XMLParser = new XMLParser();[code]....

As I say I realise I am not allowed to import the parsing class into my Game class (or any class for that matter) but I don't know how to pass data directly between these two classes without referencing them in the main FLA.

View 6 Replies

ActionScript 3.0 :: LoaderInfo - Importing A "FlashVarsParam.as" Class File In Main Class

Sep 12, 2009

I am facing a technical proble when I am importing a "FlashVarsParam.as" class file in my main class " VideoPlayer.as" and when I am using "FlashVarsParam.as" in my FLA doucument class "VideoPlayer.fla" then it is workining fine. "FlashVarsParam.as" file given below so I am accessing in my main class and then it gives me error

[Code]...

View 1 Replies

ActionScript 3.0 :: Importing A Swf Linked To A Class?

Dec 3, 2008

I have a scroll file, taken from a tutorial, which is linkedto a class. After having customized my file I did try it and itworks fine. The problem is starting when I try to import this fileto an empty MCL in my website. When I have imported all theelements they do not respond and act like single pieces (es. thescroll bar is detached from the scroller). What can I do?

View 2 Replies

Professional :: Importing A Custom Class?

May 7, 2010

I am having problem with importaing package/public customClass via a code snipit Scripting. Here are the details I created a customClass.as ActionScrip3.0 script saved it as customClass.as inside an unnamed package then I creeates a blank customClass.fla file (notice the the name customClass.fla and customClass.as must be identical for this to work)and in the properties section simply put customClass.as and then I run customClass.fla test movie and it works fine.. The problem is how do I call customcClass.as again in myFlash.fla that does not have the name customClass.fla file using a code snipet

View 19 Replies

Actionscript 3 :: Importing Class On Another Frame?

Apr 15, 2012

I am using external AS files for a new project of mine, which involved creating a place to draw so i used the following tutorial to get a basic idea of what is need. I got the hope application working and running smoothly until i decided i wanted to add in a preloading & Menu - putting the drawing part of the app on the third frame - which got me this error:

TypeError: Error #1009: Cannot access a property or method of a null
object reference.
- at Main/convertToBMD()
- at Main()

So I thought instead of adding the Main.as to the Class under properties i would import the file on the frame instead. Using:

var main:Main = new Main();
addChild(main);

This worked apart from it loses all connections to the instance names.

Line 64 1120: Access of undefined property pencil.
Line 65 1120: Access of undefined property eraser.
Line 65 1120: Access of undefined property txt.
Line 82 1120: Access of undefined property board.
Line 83 1120: Access of undefined property board.
Etc.....

So what i would like to know, is there a better way of doing this and getting it working on any frame?By changing something in the external script or another way of importing onto frame?

View 1 Replies

ActionScript 3.0 :: Importing An .as Class File?

Sep 17, 2009

I downloaded a sample flash that contains a class file.When try to run the file get the "1172: Definition be.nascom.flash.graphics:Rippler could not be found." error. Rippler is the name of the file and I think be.nascom.flash.graphics is the authors directory structure. I think the error is because the file is not in the right location that Flash is expecting it to be in to find it.

View 7 Replies

ActionScript 3.0 :: Custom Class Importing?

Sep 3, 2011

A very weird problem is happening in my AS3 code.I made a custom class called test, and in the main document class I imported it using "import test". Also, I set the class path correctly so it should work fine. Now, the problem is, when I instantiate this class to an object, it works fine as long as it is outside the document class constructor, it i try to use it inside the constructor method, it doesnt work!

[Code]...

View 1 Replies

ActionScript 2.0 :: Importing Of Outer Class - Errors

Jun 11, 2009

I have a problem with importing of outer class. Here is the scenario: This picture shows the directories structure: I have a *.fla file located in "main/" directory and I'm trying to import outer class XModel located in "main/org/XLEFF". Here is the code:

[Code]...

View 8 Replies

ActionScript 3.0 :: Importing Custom Cursor Class?

Jul 31, 2010

I have a Flash document containing several subclasses. I want to access a custom cursor class I wrote from another subclass called 'mapmenu'. The thing is, it's not working properly. I can import it from my Main class, but not from any subclass. Some bells should be ringing..This is the custom cursor class (located at C:/Flashproject/com/own/Cursor/Cursor.as):

Actionscript Code:

package com.own.Cursor{ import flash.display.*;  import flash.events.*;  import flash.geom.Point; import flash.ui.Mouse; public class Cursor extends MovieClip private var stageRef:Stage;public function

[code]....

I let all the other script out, it's a bunch and it's not needed for the cursor to function.In the .FLA I have a MovieClip called Cursor containing a cursor. It's exported on frame 1.The problem is: the cursor class won't be called. No errors, no cursor, no trace (see cursor class).

EDIT:FYI: I would put this in the main class:

Actionscript Code:
cursor = new Cursor(stage);stage.addChild(cursor);

But I can't address stage from a subclass can I..?

View 2 Replies

ActionScript 3.0 :: Using Document Class Vs Importing .as File?

Apr 25, 2010

I'm just wondering about the difference between using an external .as file as a Document Class vs importing it via some timeline code like:

[Code]...

View 1 Replies

ActionScript 3.0 :: Importing Classes Without Using Document Class

Feb 2, 2011

I have 2 as3 files, which are the classes used . I have to use it with the main flash movie.. How will I include those as3 files without using document class..

View 4 Replies

ActionScript 3.0 :: Importing And Running Custom Class?

Jun 25, 2011

I'm trying to create an external file for mouse movement sensing so I don't have to rewrite it everytime I want to use it, which is what .as files are for, I understand.I think the package is working (kind of) but I'm not sure how to get it to run as every tutorial I have come accross applies to graphic use.This is my package (I don't know why the coding is unalligned):

ActionScript Code:
package {[code]....

I've tried 2 ways to get it to work: 1.) Assign a class to the stage in the properties panel. When I did this I had no errors but the ENTER_FRAME function did not work, which entirely defeated the purpose of the coding.

2.)

ActionScript Code:
var test:mouseVisibility = new mouseVisibility();
addChild(test)[code].....

View 9 Replies

Actionscript 3.0 :: Importing Or Is It Exporting The Document Class

Nov 14, 2009

I have a main.swf with a loader that loads an external.swf file. That file is an xml photogallery. The gallery has two other folders lets call them folder1 (contains xml file, image files) folder2 (which has sub folders that contain.as files for the tweens) I need to import these files to the main.swf or is it export these files from the gallery to the main.swf?

View 1 Replies

ActionScript 3.0 :: Importing And Including Class And Functions

Jul 12, 2009

am new to flash and am trying to create simple program, I kinda know how to code the program but its really difficult to interpret everything into action script. For example I created class file in file node.as

[Code]...

View 2 Replies

ActionScript 3.0 :: Importing Mouse Event Class?

Jan 8, 2010

I'm new to AS3 and I'm working on a game that I've run into a problem with.I converted a movie on my main timeline to a movie clip and suddenly my event listeners weren't working right. I kinda figured I needed to import the mouse event class to make it work, but it dp.I have 5 AS keyframes that act on a single button (submit_btn) along the mc timeline. This is the code assigned to each keyframe

import flash.events.MouseEvent;
swing_btn.addEventListener(MouseEvent.CLICK,press1 );
function press1(evt:MouseEvent):void { MovieClip(root).gotoAndStop(1,"HitsBrianMFSEmerald

[code]....

View 5 Replies

ActionScript 3.0 :: Difference Between Importing As Files & Class Definition?

Apr 1, 2009

I'm trying to get the as3corelib to work as when I run my file at the moment it tells me: 5001: The name of package 'com.adobe.images' does not reflect the location of this file. Please change the package definition's name inside this file, or move the file. /Users/markbunyan/Websites/craftmagic.co.uk/JPG_encoder/JPGEncoder.as I thought I had imported the as3corelib fine but can't get this to work. Can I simply import the code from JPGEncoder.as???

View 3 Replies

ActionScript 3.0 :: Document Class On Stage - Importing Buttons?

Jun 13, 2009

I have drawn buttons on my stage. They all set to export for as3. I then made a class for buttons

package{
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.system.fscommand;
public class Buttons extends MovieClip{
public function Buttons(){
[Code] .....

And then I put in my document class ; import Buttons; nothing happens and no errors...

View 14 Replies

As3 :: Professional : Importing Externally Stored Class Code From XML?

Apr 23, 2010

I have the following code string stored in an XML file:
 
MovieClip(parent).gotoAndStop(15);
  
I've imported this to the global var...
 
globals.data.navtest
 
...using...
 
globals.data.navtest = test.toString();
  
It works fine - if I trace(globals.data.navtest); it outputs MovieClip(parent).gotoAndStop(15); What I want to do now is actually use globals.data.navtest in my Flash project to execute MovieClip(parent).gotoAndStop(15); How do I do that?  Do I have to import it as something other than a string, or do I have to code something that tells flash "execute the code that is in globals.data.navtest" ?I want to keep all of the code in the XML tag, so I can change any of it without opening Flash CS4.

View 5 Replies

ActionScript 3.0 :: Importing - File Linked Via The Document Class?

Feb 23, 2011

I have a FLA file that has a AS file linked via the document class.
 
How do I remove the link from the documnet class and the place an import on the timeline to do the same thing ?

View 4 Replies

ActionScript 3.0 :: Using Packages - Importing Class And Dynamic MovieClip

Jul 9, 2009

I have a package (XMLThumbLoader) that loads thumbnails and is supposed to import a scroller class(DSIScroller). The thumbloader works fine, but when I try to scroll the thumbsContainer movie clip, I get "Error #1009 Cannot acces a property or method of a null object reference". Notice that I instantiated the DSIScroller class near the end of the main package instead of underneath the import DSIScroller command. By doing this, my thumbnails show up. If I place the instantiation right under the import command, no thumbs show. I believe the issue is with the dynamically created movie clip: thumbsContainer.

Here is the main package (XMLThumbLoader)
Code:
package {
import flash.xml.*;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.geom.Rectangle;
import flash.events.Event;
[Code] .....

View 0 Replies

ActionScript 3.0 :: Way Of Importing Class Using Actions Panel On Frame 1.

Sep 16, 2009

Is there a way of importing my class using the Actions Panel on frame 1.[code]No errors but the constructor function does not run, how do I get this working? (Everything is fine when I use the Document Class box and typ in the name of my class - but I want to do this on the first frame of the main timeline).

View 5 Replies

ActionScript 3.0 :: Importing Tween Class - Easing Could Not Be Found

Mar 21, 2012

I have an issue I've tried to import these tween classes. I get the errors below
ActionScript Code:
Scene 1, Layer 'Layer 2', Frame 1, Line 1 1172: Definition com.greensock could not be found.
Scene 1, Layer 'Layer 2', Frame 1, Line 2 1172: Definition com.greensock.easing could not be found.
Scene 1, Layer 'Layer 2', Frame 1, Line 1 1172: Definition com.greensock could not be found.
Scene 1, Layer 'Layer 2', Frame 1, Line 2 1172: Definition com.greensock.easing could not be found.

View 1 Replies







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