Creating Objects Class
Hey,
I need some help with this code it makes and error when i put it into my project but when its in a blank project it works fine?
code:
package
import flash.display.MovieClip;
public class newchars extends MovieClip
public function newchars()
for (var i:int = 0; i < 1; i++)
var newchar1:MovieClip = new mychar();
addChild(newchar1);
newchar1.x = Math.random() * 500;
newchar1.x = Math.random()*(stage.stageWidth - newchar1.width);
newchar1.y = Math.random()*(stage.stageHeight - newchar1.height);
error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at newchars()
at IceMountain_fla::MainTimeline/frame2()
at flash.display::MovieClip/gotoAndPlay()
at IceMountain_fla::MainTimeline/fl_MouseClickHandler_2()
as soon as i click my play button on the start menu it interfieres with my class!
but in a blank project it works fine :S
Class's can make some unusual errors lol
Thanks.
I have been doing your code now this is all the code now please tell me my error it is weird and i cannot work it out
Frame 1:
stop();
Play_1.addEventListener(Event.ENTER_FRAME, fl_MouseClickHandler_2);
function fl_MouseClickHandler_2(event:Event):void
gotoAndPlay(2);
Frame 2:
stop();
var enemy1:newchars = new newchars();
addEventListener(Event.ENTER_FRAME, fl_EnterFrameHandler);
function fl_EnterFrameHandler(event:Event):void
Bird_1.x = mouseX;
newchars class:
package
import flash.display.MovieClip;
import flash.events.Event;
public class newchars extends MovieClip
public function newchars()
this.addEventListener(Event.ADDED_TO_STAGE, addtostage);
private function addtostage(e:Event):void
for (var i:int = 0; i < 10; i++)
var newchar1:MovieClip = new mychar();
addChild(newchar1);
newchar1.x = Math.random()*(stage.stageWidth - newchar1.width);
newchar1.y = 28.35;
This doesn't have a document class used in settings because i am using add to stage event as you said
Now please look over all the code in my .fla and tell me why i get this error:
Error: Error #2136: The SWF file file:///C|/Users/Brendon%20Battye/Desktop/Ice%20Mountain/Ice%20Mountain.swf contains invalid data.
at newchars/frame2()
at flash.display::MovieClip/gotoAndPlay()
at newchars/fl_MouseClickHandler_2()
Similar Messages
-
How to create object class for a z table
Hi All,
I have a z table and I want to register the changes of fields should be logged to CDHDR and CDPOS table.
Is this possible?
If yes how can I creat an object class for a z table. I have already checked the change document option in z data element.
Please help.
Regards,
Jeetu
Moderator message: standard functionality, please search for available information/documentation before asking.
locked by: Thomas Zloch on Oct 6, 2010 6:16 PMTcode SCDO. You'll need to create a change document for you Z table and then use the FM created to record the changed data.
-
Creating object class dynamically
Hi ,
I need to create object dynamically for a class.eg when i loop thru internal table i need to create an object per pass of the loop and no of entries in itab can be known at runtime only
Any clues
Regards
SwatantraCheck this sample program, where it is creating a number of objects and appending them to a object list.
report zrich_0001.
types: begin of telements,
element(30) type c,
value(30) type c,
end of telements.
* CLASS lcl_element DEFINITION
class lcl_element definition.
public section.
data: ielements type table of telements,
xelements type telements.
methods: constructor importing im_elements type telements,
write_out.
endclass.
* CLASS lcl_element IMPLEMENTATION
class lcl_element implementation.
method constructor.
append im_elements to ielements.
endmethod.
method write_out.
loop at ielements into xelements.
write:/ xelements-element, xelements-value.
endloop.
endmethod.
endclass.
data: itab type table of telements with header line.
data: r_element type ref to lcl_element.
data: r_elementlist type table of ref to lcl_element.
start-of-selection.
* Create the initial list of elements.
itab-element = 'ELEMENTA'.
itab-value = 'Val_A'.
append itab.
itab-element = 'ELEMENTB'.
itab-value = 'Val_B'.
append itab.
itab-element = 'ELEMENTC'.
itab-value = 'Val_C'.
append itab.
* Create instances of the element object
* and add to the list
loop at itab .
create object r_element
exporting
im_elements = itab.
append r_element to r_elementlist.
endloop.
* loop at the list and write out the element objects.
* Notice that the r_elementlist is an internal table
* which contains 3 objects. Those three objects each
* contain 1 internal table with one record each.
loop at r_elementlist into r_element.
call method r_element->write_out.
endloop.
Regards,
Rich Heilman -
Unable to map/get Attributes with import of LDIF Object Class
Hi All,
We are trying to take import of Customized Object Class and Attributes into OID through LDIF.
LDIF import command is:
./ldapadd -p 3060 -h myhost -D "cn=orcladmin" -w Ac123456 -f xyzObjClass.ldif
LDIF contents are:
dn: cn=subSchemaSubentry
changetype: modify
add: objectclasses
objectclasses: ( 1.3.6.1.4.1.1436.2.46 NAME 'ProviderObjClass' SUP ( organizationalPerson $ person $ top ) STRUCTURAL MAY ( attr1 $ attr2 ) )
Note: attr1 and attr2 are already imported into OID.
Result: We are able to create Object Class and also able to inherit Super Class. But we are not able to map the attributes to our Object Class.
Can anybody help me in importing ?
Thanks & Regards,
NewbieAgain, I don't work with Java and you should ask Java-related question in Flex (or Java) forum.
Java or not - you need to package your server side language specific object into something that AS understands (text, XML, AMF object) and load this data into AS via, perhaps, URLLoader. Or you can open socket. Then you parse this data with AS3 code in SWF. -
How to create custom attributes & object classes through ldif files in OID
Hi,
I have to create 4 attributes and one object class(custom) in OID. I want to creae these attributes and object class through LDIF file.
I tried creating an attribute through this command
ldapadd -p 389 -h localhost -D cn=orcladmin -w password -f D:/newattr.ldif
this ldif file contains inf. for creating a new attributes:
dn: cn=subschemasubentry
changetype: add
add: attributetypes
attributetypes: ( 1.2.3.4.5.6.10 NAME "xsUserType_new" DESC "User Type Definition" EQUALITY caseIgnoreMatch
SYNTAX "1.3.6.1.4.1.1466.115.121.1.15" )
I am getting error: Object class violation
Failed to find add in mandatory or optional attribute list.
Please help to find where I am going wrong...
Thanks.Hi Ajay,
Thank you for the help. Now i am able to create both attributes and object classes in OID through Ldif files.
I was getting constraint violation error because (I think) I was not giving proper naming convection for attributes and object classes. For OID, there are certain Ldap naming conventions. They are as follows:
# X below is the enterprise number assigned by IANA
1.3.6.1.4.1.X.1 - assign to SNMP objects
1.3.6.1.4.1.X.2 - assign to LDAP objects
1.3.6.1.4.1.X.2.1 - assign to LDAP syntaxes
1.3.6.1.4.1.X.2.2 - assign to LDAP matchingrules
1.3.6.1.4.1.X.2.3 - assign to LDAP attributes
1.3.6.1.4.1.X.2.4 - assign to LDAP objectclasses
1.3.6.1.4.1.X.2.5 - assign to LDAP supported features
1.3.6.1.4.1.X.2.9 - assign to LDAP protocol mechanisms
1.3.6.1.4.1.X.2.10 - assign to LDAP controls
1.3.6.1.4.1.X.2.11 - assign to LDAP extended operations
By using these conventions for attributes and object class, I did got any error and they were created in OID.
Thanks a zillion.
Kalpana. -
How do i create objects of ordinary Classes from a javabean
I want to create a class Person below that I want to create an object from in my javabeans.
Look below Person class definition for continuation.
package data;
public class Person
private String name;
public Person()
name = "No name yet.";
public Person(String initialName)
name = initialName;
public void setName(String newName)
name = newName;
public String getName()
return name;
public void writeOutput()
System.out.println("Name: " + name);
public boolean sameName(Person otherPerson)
return (this.name.equalsIgnoreCase(otherPerson.name));
I run this bean class in the WEB-INF/classes/data folder creating a Person object in the deal() method below
When I compile the class it seems to fail. It does not recognise the Person class. Can you help me with a description of what to do to call
ordinary class objects from javabean class definitions.
What directories should the simple classes be put and what should I include in the javabean to be able to access them?
package data;
import java.sql.*;
import data.*;
public class Bean
{ private Connection databaseConnection ;
// private Person p;
public Bean()
super();
public boolean connect() throws ClassNotFoundException, SQLException
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String sourceURL = "jdbc:odbc:robjsp";
databaseConnection = DriverManager.getConnection(sourceURL);
return true;
public ResultSet execquery(String restrict) throws SQLException
Statement statement = databaseConnection.createStatement();
String full = "SELECT customerid,CITY,Address from customers " + restrict;
ResultSet authorNames = statement.executeQuery(full);
return (authorNames ==null ) ? null : authorNames;
public String deal() throws SQLException
{ Person p = new Person();
p.setName("Roberto");
return p.getName();
}There is no "Copy File" function in Lightroom.
Lightroom was designed to eliminate the need to make duplicate copies of files. The organizational tools in Lightroom allow you to have one file categorized in many ways, you can assign multiple keywords to the photos (for example: Winery, Finger Lakes, Fall Foliage, Jessica). Similarly, you can have a file categorized in multiple Lightroom collections at the same time, all without making a copy of the photo. The benefit of this is that you don't need to make multiple copies of each photo, one copy suffices, and thus disk space is saved; and furthermore if you should edit a photo or add metadata, you only need to do this once, and the photo's appearance, or the photo's metadata is changed, and visible to you no matter how you choose to access the photo (pick any keyword or any collection and you will see the change) -
Create object for a class in jar file
Hi
I am using Oracle JDeveloper 10g. I have created a main application using Swing/JClient technologies. I am facing a problem for the past one week. I let u all people know my problem and I kindly request you to send a solution if known possibly confirmed.
Problem: I have created a main application using swing that class extends JFrame. This main application consists of two parts. One left side panel and one right side panel. Left side panel contains JTree component. Each item in that tree refers to a class file located in a separate jar file.i.e that acts as a separate application. If we are executing separately that jar file class, I am able to see that small application running. If I am selecting an item in JTree during runtime, I should place that small application from the respective jar file in the right side panel of the main application. I can locate the jar file and even I can create object to that particular class file. But I cannot execute the application even separately and also not able to place in the right side panel of the main application.
Note: The small application from the jar file contains one class file containing main method. That class file extends JPanel and implements JUPanel. i.e., with data binding. I am trying to create an object for this class file with data binding from my main application. Navigation bar is used in the main class file.
If possible can any provide me solution at the earliest. Waiting eagerly for the positive reply.
Regards,
s.senthilkumarCan you sure that there is only a A class in the classpath of Tomcat, I advise you to add
some statements into the A class so that you can be sure which classloader is used
to load the A class. -
Can I create a Class object without the VM?
Using byte-code engineering, is it possible to create a class object?
What about if I serialize a Class object to a file, can I byte-code engineer that and then reinstantiate it?Thanks I'll check it out. Basically I want to try it
for fixing a problem of running two apps in the same
VM.There's a world of problems when you try to run two programs within the same JVM. I wouldn't suggest even trying it unless it's a last resort. Why do you want to do that? -
How to create an object class programmatically?
Guys,
I need your help. If possible with a simple example of how to do it.
I need to create an aplication that read an specification of a repository type from a file and then creates it inside my BEA Repository. The problem are few:
1 - How to Create an Object Class programmaticaly?
I looked at documentation of ObjectClassOps but havent figured out how to do it.
2 - How to Create a Property Definition programmaticaly?Sorry, ITypeManager only exists in 9.2. If you are working on 8.1, then the previous example becomes:
RepositoryManager repositoryMgr = RepositoryManagerFactory.create();
//connect to the repository
repositoryMgr.connect();
//get ObjectClassOps
ObjectClassOps ocops = repositoryMgr.getObjectClassOps();
ID repId = new ID();
repId.setRepositoryName(repositoryName);
PropertyDefinition[] pds = new PropertyDefinition[1];
pds[0] = new PropertyDefinition(repId, "stringProp", null, Property.STRING, false, false, false, false, false, null);
ObjectClass oc = new ObjectClass(repId, "myType", null, pds);
oc = ocops.createObjectClass(oc); -
How to create object by getting class name as input
hi
i need to create object for the existing classes by getting class name as input from the user at run time.
how can i do it.
for exapmle ExpnEvaluation is a class, i will get this class name as input and store it in a string
String classname = "ExpnEvaluation";
now how can i create object for the class ExpnEvaluation by using the string classname in which the class name is storted
Thanks in advancei think we have to cast it, can u help me how to cast
the obj to the classname that i get as inputThat's exactly the point why you shouldn't be doing this. You can't have a dynamic cast at compile time already. It doesn't make sense. Which is also the reason why class.forName().newInstance() is a very nice but also often very useless tool, unless the classes loaded all share a mutual interface. -
Are there any shortcuts for creating Value Object Classes?
Hi,
I'm using a Remote Object to connect to my server
(pyAMF/Django). I'm getting stuck with the creation of Value Object
Classes. It doesn't seem very DRY to have a class on my server
representing the data model and then have to recreate that class
and all its properties in my Flex app.
Are there any shortcuts for creating client side VOs from
server side data?
I was thinking about declaring an empty VO class in Flex, and
then dynamically assigning/casting my Proxy object to that class.
It seems like that approach may cause problems for the Flex
compiler though.
Any hints?
Thanks!quote:
Originally posted by:
tptackab
Oh man, do I feel your pain. I'm not sure what middle-tier
technology you're using, but I'm using Java (w/Spring) and I
absolutely hate having to create and maintain two sets of VO (aka
data transfer - DTO) object for Java and Flex.
One thing that has helped me in that area is a free tool from
Farata Systems called
DTO2Fx. If you're using Java and Eclipse, it's a great time saver.
You simply install a (very lightweight) Eclipse plugin, add a
single annotation to your Java VO classes, and it automatically
generates your Flex VOs. It even creates a base and extended
version of each VO on the AS3 side so you can add code to the
extended VO without fear of having your changes overwritten when it
regenerates your Flex VOs.
Here's a like to thier
PDF that
gives instructions and a download link. I had it up and running in
my application in less than 30 minutes!
I'm using Python/Django serverside (PYAMF is my AMF
serializer). -
Tool to create Java Object classes using the Database Tables
Hi,
Is their any tools or utility available to create the Java Object Classes using the Database Tables as input.
Lets Say I am having the Employee, Employee_Salary tables in the Database.The utility has to create the Java Object classes with the relation.
Please Help...
Thx..Hm, for generating regular Java classes I wouldn't know one from memory. But I suggest you start searching in for example the Eclipse marketspace for a third party plugin that can do it. If all fail, you could always use Hibernate Tools from the Jboss Tools Eclipse plugin set to generate Hibernate/JPA entities and then strip the annotations from them to turn them into regular POJO classes.
How many tables are we talking about anyway? It might be less effort to just create the classes with properties and then use an IDE to generate getters and setters for them. -
Add user validation in create user form during Configure User Object Classe
Hi friends,
I like to add a user validation code (javaScript or PL/SQL) into create user form during Configure User Object Classes.
Is any way to pick user information and role assignment for validation in Portal side?
or pre event in OID provisioning befor loading LDAP?
We like to make a rols assignment validation. But portal does not have this function.
TOM, Any suggestion?
Thanks!!after study, portal form --LOVGroupSearch take a role search and display user name for select role.
Who know we are can find system object LOVGroupSearch in portal or OID?
the source SCR as /oiddas/ui/oracle/ldap/das/search/LOVGroupSearch?title=Role%3Fredirect=/oiddas/ui/oracle/ldap/das/search/LOVGroupSearch%3Ftitle=Role
When we search a role and added it. selected role appears in form Search and Select:.
When click role name in Search and Select form. system will display Group Members and group owner.
Who can find behind codes for this form or samilar pl/sql codes?
Thanks!! -
Adding object classes when creating ldap user in workflow
I'm creating ldap users in a workflow and when I assign the object classes in the workflow I get an object class violation. It seems that when I call check in view and when my break point stops in Update User the default object classes on the resource have been removed from the user.accounts[LDAP].objectClass attribute which I just set. Not sure what's going on here. Is there another way to assign more than just the default object classes to a new ldap user through the workflow? Thanks in advance.
Multiple things I can think of
1) put all the object classes you may be expecting with the user account in the resource configuration panel. LDAP is smart enough to assign the related object classes to the object based on the attributes assigned to the user.
2) Check if you have the object class in the schema of LDAP. -
Create Object of "ObjectName" Class by giving only Domain Name.
Hie,
I want to create Object of "ObjectName" class without specifying its key value properties, but i want to only specify the domain name.
For eg:
ObjectName on=new ObjectName("jboss.ws4ee:*"); here jboss.ws4ee is the domain name and after colon(:) will come the key value properties.. i dont want to specify that because i want the list of all mbeans coming under this domain i.e. jboss.ws4ee
So anyone can plzzz help me..
Regards.Hi,
What were you trying to do with that name?
ObjectName on=new ObjectName("jboss.ws4ee:*");
You cannot create an MBean with such an ObjectName. You can only
use it as first argument to queryNames() and queryMBeans();
If you want to get the attributes of all jboss MBeans then you will need to
do something like that:
final ObjectName pattern=new ObjectName("jboss.ws4ee:*");
for (ObjectName o : server.queryNames(pattern,null)) {
System.out.println("MBean: " + o);
for (MBeanAttributeInfo info : server.getMBeanInfo(o).getAttributes()) {
final String attrname = info.getName();
System.out.println("\t"+attrname+"="+server.getAttribute(o,attrname));
}(disclaimer: this code was eyed-compiled)
hope this helps,
-- daniel
JMX, SNMP, Java, etc...
http://blogs.sun.com/jmxetc
Maybe you are looking for
-
Invisible Address Book in Communications Express
In an otherwise complete installation of Communications Express 6.3 , the Address Book tab is completely blank below the standard Communications Express bar . Changing the address book location references in personalstore.properties seems to make lit
-
For all entries.... urgent Please respond !
I have to select data from one view and 2 tables viz. VF_KRED, ADRC, ADR6. I have written following code for select statement. but it is not working. Please tell the correct code. Select stceg stcd2 name1 ort01 pstlz land1 telf1 telfx brsch sperr lif
-
I am trying to update my ipad 2 but it keeps telling me that it isn't eligible for the requested build how can i fix this problem
-
Cisco 3640 cant configure voice-ports
I've an cisco 3640 with a VWIC-2MFT-E1 network module. Can anybody tell me why i cant configure any voice-port? without able to configure voice-port, i cant assign any port for my "dial-peer voice xx pots". Anybody has any solution? what im trying to
-
Hi, we have a database which has above 600 tables(all are same schema).Everyday DML statements happen Nearly 400 tables.How to find the row migration & chaining by A SINGLE QUERY. I would like to find everyday.Is it possible without analyze? I know a