How to import class?
Hi,
I have one colourfullfirework is a FLA file and Documnet is a AS file,
I want to import document class in FLA,
How can i do this??
Plz help me
Thanks,
JaxNa
in Documnet class follwoing this script
package
import flash.events.MouseEvent;
import flash.system.ApplicationDomain;
import flash.events.Event;
import flash.display.MovieClip;
import com.shinedraw.effects.ColorfulFireworks;
public class Document extends MovieClip{
private var _colorfulFireworks : ColorfulFireworks;
public function Document(){
this.addEventListener(Event.ADDED_TO_STAGE, on_added_to_stage);
private function on_added_to_stage(e : Event):void{
_colorfulFireworks = new ColorfulFireworks();
addChild(_colorfulFireworks);
var coverClass : Class = ApplicationDomain.currentDomain.getDefinition("Cover") as Class;
var cover : MovieClip = new coverClass();
addChild(cover);
cover.addEventListener(MouseEvent.MOUSE_OVER, on_cover_click);
private function on_cover_click(e:MouseEvent):void{
var cover:MovieClip = e.target as MovieClip;
removeChild(cover);
_colorfulFireworks.start();
when i import this Document in fla file then its not working,
and when i creat in Document class
package {
public class Document {
public function Document(){
trace("called");
then its trace as called.
so what can i do?
Thanks
JaxNa
Similar Messages
-
How to import classes into labview project?
Hi everyone
I start objected oriented program with labview, I have two sample project and I want to import their classes into my new project? is it possible to do that ? how can I import them ?
thanksYou can simply add them like you would any other VI or library. I would recommend creating a virtual folder for your classes so you can keep your project organized.
Mark Yedinak
"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot -
How to import classes from an external actionscript file
This is driving me crazy, I've been trying to resolve this on my own for ages, and I've reviewed a lot of different materials, but I still can't seem to just import some external actionscript classes correctly.
I'm using Flash Builder 4 with the Flex 4 SDK on mac osx 10.6
the class I'm trying to import (I'll call it DesiredClass) is in a folder like this
/libraries/com/foreignproject/com/foreignproject/DesiredClass.as
within the class itself, the package declaration looks like this (I left all the guts out for clarity):
package com.foreignproject
import flash.display.Sprite;
public class DesiredClass extends Sprite
public function DesiredClass()
I'm working on a totally different actionscript file at
/Users/username/Documents/Adobe Flash Builder 4/TestProject/src/TestProject.as
in this file I try to import the DesiredClass:
package
import com.foreignproject.DesiredClass;
import flash.display.Sprite;
public class TestProject extends Sprite
public function TestProject()
var neatClass:DesiredClass = new DesiredClass();
And then I try to add the class I want to the source path.
I've tried adding each folder to the source path separately:
/libraries/com/foreignproject/com/foreignproject/DesiredClass.as
/libraries/com/foreignproject/com/foreignproject/DesiredClass.as
/libraries/com/foreignproject/com/foreignproject/DesiredClass.as
/libraries/com/foreignproject/com/foreignproject/DesiredClass.as
/libraries/com/foreignproject/com/foreignproject/DesiredClass.as
If I choose the libraries folder or either of the com folders then an error shows up in theTestProject.as file, saying:
Definition com.foreignproject:DesiredClass could not be found.
But f I choose either of the foreignproject folders then an error shows up in theDesiredClass.as file saying:
a file found in a source-path must have the same package structure 'com.foreignproject', as the definition's package, ".
What am I doing wrong? Please help. I bought a book on actionscript, started doing the flex-in-a-week series, read numerous online discussion boards, and I still can't import these classes.
Thanks in advance.I don't know if this method is supported anymore but you can give it a try.
If you backed up bookmarks in IE using the following directions, you should be good!
*In IE, "File -> Import and Export -> Export Cookies".
*Open newly exported "cookies.txt" in a text editor and put a period before every line that starts with a domain. So a line starting with <b>altavista.com TRUE / FALSE 1388491200 AV_ALL 1</b> will become <b>.altavista.com TRUE / FALSE 1388491200 AV_ALL 1</b>
*Then, move the "cookies.txt" file to your profile folder.
You can get to the Profile folder two ways
*Help > Troubleshooting Information > Profile Directory > Show Folder
or
*Go to '''about:support''' and click Show Folder next to Profile Directory. -
How to import classes in a package?
I am importing all the classes in a package like:
import packagename.*;
when i am trying to create an object of the class in that package it was showing error...
example.java:8: cannot access address
bad class file: .\address.java
file does not contain class address
Please remove or make sure it appears in the correct subdirectory of the classpa
th.
address add = new address();
^
1 error
Below is my code....
import java.util.*;
import org.demo.*;
public class example
public static void main(String[] args)
address add = new address();
System.out.println("Address object created...");
}class name address.class
I am creating object as
address add = new address()
but it was showing the error -
How to import class in JAVA ?????
from the website
http://java.sun.com/j2se/1.4/compatibility.html
SAYS :
To summarize, the syntax
import SimpleName;
is no longer legal.
which would import a nested class from the unnamed namespace. To fix such problems in your code, move all of the classes from the unnamed namespace into a named namespace.
But i don't know what is the meaning of move all of the classes from the unnamed namespace into a named namespace.
Would anyone give me a help ?But i don't know what is the meaning of move all of
the classes from the unnamed namespace into a named
namespace. You need to put the classes in a package: <http://java.sun.com/docs/books/tutorial/java/interpack/packages.html>
Basically creating a directory, placing all the classes in there, and adding a package statement at the start of the source files.
Bhav -
How to import class files in Rhino shell
Hi,
i want to test some methods of ScriptEngineContext class in
Microsoft_Active-Directory-and-Windows_2011.1r3 collector, so i import
some class files in Rhino shell, but some errors apeared, detail steps
are following:
1. steve_zeng@suse01:~/sentinel/doc/Plug-ins/Collectors> cd
Microsoft_Active-Directory-and-Windows_2011.1r3, it will apear some
important jar packages(red fonts)
accountImpl.js commons-codec-1.3.jar dataobject.js
event.js joda-time-2.1.jar protoEvt.map sha1.lic
trust.js
account.js commons-io-2.4.jar date.js
eventsource.js js.jar Rec2Evt.map sqlquery.js
trusttype.js
agent.nfo commons-logging-1.1.jar docs
eventsourceserver.js LegacyEvtNames.map record.js sysEvents.map
utils.js
asset.js commons-logging-adapters-1.1.jar error_codes.map
Evt2EvtData.map logon_types.map release.js
syslog_facility.map vuln.js
bsf-240.jar commons-logging-api-1.1.jar EULAs
file.js main.js session.js taxonomy.map
window-field.map
collector.js connector.js
eventcode_parsing.js identityImpl.js master.jar
severity.map tenant.js xdas_out.map
collectorutil.jar data event_codes.map
identity.js package.xml sha1.js trustImpl.js
xdas_tax.map
2.
steve_zeng@suse01:~/sentinel/doc/Plug-ins/Collectors/Microsoft_Active-Directory-and-Windows_2011.1r3>
java -classpath ./js.jar org.mozilla.javascript.tools.shell.Main
Rhino 1.7 release 3 2011 05 09
js>
3. js> JavaPackage
esecurity.ccs.comp.evtsrcmgt.collector.util.Script EngineContext
js: "<stdin>", line 3: missing ; before statement
js: JavaPackage
esecurity.ccs.comp.evtsrcmgt.collector.util.Script EngineContext
js: .....................^
4. js> loadClass(JavaPackage
esecurity.ccs.comp.evtsrcmgt.collector.util.Script EngineContext);
js: "<stdin>", line 4: missing ) after argument list
js: loadClass(JavaPackage
esecurity.ccs.comp.evtsrcmgt.collector.util.Script EngineContext);
js: ...............................^
js>
when i run JavaPackage or loadClass shell, js: "<stdin>" error apears,
why? does anyone can help me? thanks!
BR
Steve zeng
steve_zeng
steve_zeng's Profile: https://forums.netiq.com/member.php?userid=3875
View this thread: https://forums.netiq.com/showthread.php?t=49805steve_zeng;239719 Wrote:
> Hi,
> i want to test some methods of ScriptEngineContext class in
> Microsoft_Active-Directory-and-Windows_2011.1r3 collector, so i import
> some class files in Rhino shell, but some errors apeared, detail steps
> are following:
>
> 1. steve_zeng@suse01:~/sentinel/doc/Plug-ins/Collectors> cd
> Microsoft_Active-Directory-and-Windows_2011.1r3, it will apear some
> important jar packages(red fonts)
>
> accountImpl.js commons-codec-1.3.jar dataobject.js
> event.js joda-time-2.1.jar protoEvt.map sha1.lic
> trust.js
> account.js commons-io-2.4.jar date.js
> eventsource.js js.jar Rec2Evt.map sqlquery.js
> trusttype.js
> agent.nfo commons-logging-1.1.jar docs
> eventsourceserver.js LegacyEvtNames.map record.js sysEvents.map
> utils.js
> asset.js commons-logging-adapters-1.1.jar error_codes.map
> Evt2EvtData.map logon_types.map release.js
> syslog_facility.map vuln.js
> bsf-240.jar commons-logging-api-1.1.jar EULAs
> file.js main.js session.js taxonomy.map
> window-field.map
> collector.js connector.js
> eventcode_parsing.js identityImpl.js master.jar
> severity.map tenant.js xdas_out.map
> collectorutil.jar data event_codes.map
> identity.js package.xml sha1.js trustImpl.js
> xdas_tax.map
>
>
> 2.
> steve_zeng@suse01:~/sentinel/doc/Plug-ins/Collectors/Microsoft_Active-Directory-and-Windows_2011.1r3>
> java -classpath ./js.jar org.mozilla.javascript.tools.shell.Main
> Rhino 1.7 release 3 2011 05 09
> js>
>
> 3. js> JavaPackage
> esecurity.ccs.comp.evtsrcmgt.collector.util.Script EngineContext
> js: "<stdin>", line 3: missing ; before statement
> js: JavaPackage
> esecurity.ccs.comp.evtsrcmgt.collector.util.Script EngineContext
> js: .....................^
>
> 4. js> loadClass(JavaPackage
> esecurity.ccs.comp.evtsrcmgt.collector.util.Script EngineContext);
> js: "<stdin>", line 4: missing ) after argument list
> js: loadClass(JavaPackage
> esecurity.ccs.comp.evtsrcmgt.collector.util.Script EngineContext);
> js: ...............................^
> js>
>
>
> when i run JavaPackage or loadClass shell, js: "<stdin>" error apears,
> why? does anyone can help me? thanks!
>
>
> BR
> Steve zeng
Can you explain a little more about what you're trying to accomplish by
this? The script engine is not really designed around facilitating
shell-based access right now,I'd be interested to know what you can't do
in the Debugger that you are trying to accomplish in the shell.
brandon.langley
brandon.langley's Profile: https://forums.netiq.com/member.php?userid=350
View this thread: https://forums.netiq.com/showthread.php?t=49805 -
How to import a class not in the package from a package
how to import a class not in the package from a package?
http://java.sun.com/docs/books/tutorial/java/interpack/usepkgs.html
-
How to import user defined class in UIX page?
Does anyone know how to import user defined class in UIX page so that the class can be called in the javascript in the UIX ?
Thks & Rgds,
Bennywhat you are referring to is not javascript.
it is JSP scriptlets. These are very different.
In order to keep a strict separation between View and Controller, it is not possible to run arbitrary java code from within your UIX code.
However, you can run java code from within a UIX event handler; see:
http://otn.oracle.com/jdeveloper/help/topic?inOHW=true&linkHelp=false&file=jar%3Afile%3A/u01/app/oracle/product/IAS904/j2ee/OC4J_ohw/applications/jdeveloper904/jdeveloper/helpsets/jdeveloper/uixhelp.jar!/uixdevguide/introducingbaja.html
event handler code is run before the page is rendered. -
How to import custom java jar/class into oracle to be used in java proc ?
Hi
I would like to know how to import custom java jar/class files into oracle to be used in java stored procedure.
I am developing a oracle pl/sql procedure to call java program. The java program will be created as procedure and will be published.
But, my question is that I do have a other external jar/class file that need to be imported into this java program.
example
raise_sal.java
import java.util.*;
import oracle.sql.*;
<<reference other java programs >>
import cmpmsgsvc.xxxx.* ;
import cmpmsgsvc.yyyy.* ;
import cmpmsgsvc.zzzz.* ;
how do I import the cmpmsgsvc jar/class file into oracle so that I don't have any
compilation errros on raise_sal.java program ??
what are the steps to import/compile and validate to do this?
thanks for your help in advance.
Thanks
rrb.Kuassi
Problem is that, I have 6 jar files that are needed to be included in the main java program. And, there are more than 50+ classes, propertiers in those 6 jar files.
It might be not good idea to have all those 50+ classes in the production database.
Is there anyway that I keep all those 6 jar files in unix box (our's is oracle erp installation with oracle being installed on unix box) and just refer them in the main java program. I mean database will be loaded with main java program and it should able to refer other 6 jar files from unix.
if we create a directory and keep all jar files in there and include that directory in classpath variable, does this works? or what is other method?
Please let me know.
Thanks -
How to import java Classes in report Builder 10g
How to import java Classes in report Builder 10g .....
ArshadHello,
To import the Java classes:
Add your jar in the REPORTS_CLASSPATH
Launch Reports Builder.
Note:
You must launch Reports Builder now so that the new REPORTS_CLASSPATH is used.
Choose Program > Import Java Classes to display the Import Java Classes dialog box.
Regards -
I have a jar file and wanted to import the class into pl/sql
I have saved the jar file in c:\ora10g\forms\java and have this path to my classpath in default.env file when i tried to import the class . I got an error
Importing Class C:\ora10g\forms\java\XXX.jar...
Exception occurred: java.lang.ClassNotFoundException: C:\ora10g\forms\java\XXX/jar
Can anyone help me how to set the classpath correctly.The path to the jar file (including the jar file name and extension) must be added to the FORMS_BUILDER_CLASSPATH registry variable for the import step. For runtime you need to have it in the default.env.
-
How to import the classes?
Hai to all,
May I know how to import the packages in j2me that are not in the midpapi classes.
If I had some new package and I want to import that to my application
For example .
The javax.mail package is with me but I don't know how can I import it to my application.How to set a classpath to it.
(I set a classpath so that the j2me is not accepting the package but j2se is accepting is ther a special way to set a classpath to those package and where to keep those packages i.e in which folder ...)
Awaiting for the answers ..
Thanks to youfor sms check i.e. http://www.simplewire.com/. i know that there were some more companies but can't recall their names now :(
for encryption: i'd use midp 2.0 and rms, let user write their message, store it encrypted on rms and then send using some sms api. but that's just me ;)
hth -
Urgent: how to import or transport abap class from dev to q
How to import/transport custom abap class from dev to q.
Any suggestions points will be awarded.
Thanks in advance.
MKhi M K,
try SE24, your class, and go to menu 'Go to' -> object directory entry,
click pencil icon and give your package name, will raise request.
SE10 to release and STMS from prod to import.
hope this helps. -
How to import other class in Flex Builder2?
I use Flex Builder2,I want to import the other class,such as
ascb,like follows:
package {
import flash.display.Sprite;
import ascb.units.Converter;
import ascb.units.Unit;
import flash.events.Event;
public class ApplicationExample extends Sprite {
private var _square:Sprite;
private var _angle:uint;
public function ApplicationExample() {
_square=new Sprite();
_square.graphics.lineStyle(0);
_square.graphics.drawCircle(0,0,2);
addChild(_square);
_angle=0;
addEventListener(Event.ENTER_FRAME,move);
private function move(event:Event):void{
var
converter:Converter=Unit.DEGREE.getConverterTo(Unit.DADIAN);
var angleRadians:Number=converter.convert(_angle);
_square.x=Math.cos(angleRadians)*100+200;
_square.y=Math.sin(angleRadians)*100+200;
_angle++;
ApplicationExample.as is locate in direcotry C:\workspace,and
I put package ascb into directory C:\workspace too,then I run
ApplicationExample.as ,it raise following error:
Description:A file found in a source-path must have an
externally visible definition. If a definition in the file is meant
to be externally visible, please put the definition in a package.
Resource:Converter.as
In Folder:ApplicationExample/ascb/units
Location:line -1
By the way,when I write import ascb.,it should show units,but
it only show util, I guess I may put package ascb into wrong
director,or the ascb don't put the route of Flex Builder2. I don't
know how to do it!
Please give me detail steps to solve above error!
Thanks in advance!when I put as
import a;
while compiling, it prompt : '.' expected
how to resolve it?
thanksIn J2SDK 1.4, you can only import a class that is in a named package. The compiler is expecting a package_name.class_name;
You do not need to import classes that are in the same package and all classes that do not specify a package name are in the same unnamed package. However you must import classes that are in different packages. -
Surprise! How to import my class?
I used java1.2.2 to compile my files before. No problem. But I want to use StringBuffer class, indexOf method, which supported by 1.4. So I update my java then compile my files. It is said that '.' not found, import xxxx, what is mean?
Thanks, just I am not familiar with 1.4 version. JDK1.4 didnt specify any new ways to import classes, they have always been the same.
How
can I do to avoid the error? It is the only way to
package all my files? Do you have any way to import a
single class? For example:
import java.lang.String;
import MyBean; //this is a class named MyBean.
declare in MyBean.java
//And it have been compiled
ave been compiled successfully.
SiriusIf the class MyBean lies in the same folder u dont need to import it as classes in the same package are visible to each other. Else u will have to import it using the package import format, there is no other way.
Always,
Leo.
Maybe you are looking for
-
Solaris Download link not working
Hi ! The download lnk for oracle 10g solaris x86 is not wirking can sombody get me a link where i can download this packages Solaris 8 x86 is not available for download in sun's official site where can i get it . Thanks and regare
-
JCo - asynchronous calling RFC
As far as I know, there is possibility make asynchronous RFC call via JCo. How can I get return values from such calling? Is there some code example, please? Thanks.
-
How to delete standard project definition
now in the product system. As for some problem, there are some false standard project definition. how to delete standard project definition. Please explain me all the steps to be required. Thanks in advance!
-
How to see genarated AS files in Flex Builder ?.
Hi , We will compile mxml file and then compiler genaretes corrosoponding action script file in the flex builder. Some where I have seen that we need to chage some settings for the compiler and see in the src dir. Pleasem let me know th
-
LR simply cannot be used by me now, I constantly get the error message, and I cannot open LR. I have downloaded the LPP files and installed to .exe. I have uninstalled LR and then reinstalled LR. Still the same issue. PLEASE HELP. Thanks.