Using the PrintJob class
Hi all
I am new to AS3 and was never as competent to AS2. I'm working on a simple drag and drop coin and I want to be able to print the contents of the operation drag / move.
I try to use the PrintJob class that comes with CS4, but his does not work.
Here's what I have...
THE BUTTON MANAGER
print_btn.addEventListener(MouseEvent.CLICK,printContent);
function printContent(evt:MouseEvent) {
var printJob:PrintJob = new PrintJob();
if (printJob.start()) {
if (content_MC.width>printJob.pageWidth) {
content_MC.width=printJob.pageWidth;
content_MC.scaleY=content_MC.scaleX;
}
printJob.addPage(content_MC);
printJob.send();
}
}
THE PrintJob CLASS INCLUDED IN CS4
//****************************************************************************
// ActionScript Standard Library
// PrintJob object
//****************************************************************************
intrinsic class PrintJob
{
var orientation:String;
var pageHeight:Number;
var pageWidth:Number;
var paperHeight:Number;
var paperWidth:Number;
function PrintJob();
function addPage(target:Object, printArea:Object, options:Object, frameNum:Number):Boolean;
function send():Void;
function start():Boolean;
}
I get all sorts of errors, prompting me to change the PrintJob class. But as soon as I make an edit he comes up with an error after another one will not work.
What I'm missing here? The PrintJob CS4 class should not just be straight out of the box? Sorry if this is such a newbie question. But I'm a newbie!
Any help would be greatly appreciated.
Thanks in advance!
You are welcome.
p.s. Please mark this thread as answered, if you can.
Tags: Adobe Animate
Similar Questions
-
Using the file class - muse. by default on my computer and not the last used folder.
Using the file class - muse by default to my computer and not to the last used folder.
Hello Perri,
I tested on my end, and it seems that the issue is ongoing because of Air Version 3.8 was last updated. If restore you the version of Air to 3.7 this problem would be fixed.
Here is the link to the page for the available versions of Adobe Air: http://helpx.adobe.com/air/kb/archived-air-sdk-version.html and you can use this link to download Adobe Air version 3.7:
http://download.Macromedia.com/air/Win/Download/3.7/AdobeAIRInstaller.exe (Windows)http://download.Macromedia.com/air/Mac/download/3.7/AdobeAIR.dmg (Mac)
Hope this information helps.
Kind regards
Fox
-
by using the DCDataRow class instead of the oracle.jbo.Row interface
Hello
The API documentation says that class oracle.adf.model.bean.DCDataRow extends oracle.jbo.server.ViewRowImpl and implements oracle.jbo.Row.
-In the case of a reply in another forum thread, :
""Btw.: you can cast DCDataRow, which is the super class for data models that do not work with oracle.jbo.Row, ".
-Also in oct2010-otn-harvest - 183714.pdf it says:
"As I mentioned earlier, the business can be anything, casting, in which case the line type for the type of business ADF oracle.jbo.Row component may not be a generic solution to use. In this case, the type of line to DCDataRow cast
DCDataRow vRow = (DCDataRow) vDCIteratorBinding.getCurrentRow (); "
This sample application uses the DCDataRow class instead of the oracle.jbo.Row interface
at http://www.consideringred.com/files/oracle/2010/Thread1665841AttributeValuesApp-v0.03.zip
questionpublic String getMyNameFromIterator() { BindingContainer vBindingContainer = BindingContext.getCurrent().getCurrentBindingsEntry(); DCBindingContainer vDCBindingContainer = (DCBindingContainer)vBindingContainer; DCIteratorBinding vDCIteratorBinding = vDCBindingContainer.findIteratorBinding("findSomeMyRowsIterator"); DCDataRow vDCDataRow = (DCDataRow)vDCIteratorBinding.getCurrentRow(); return (String)vDCDataRow.getAttribute("myName"); }
-(q1), which would be the more detailed explanation about when and why to make a cast of the class oracle.adf.model.bean.DCDataRow instead of the oracle.jbo.Row of the interface in managed bean code?
Thank you very much
Jan VerveckenHello
the answer to that is that I was wrong. DCDataRow is not the super class, but one of the classes of implementation. I'll fix the entrance of the harvest with the next update. Indeed line runs through implementations
Frank
-
Preview an image before loading it using the FileReference class in flex 3
Preview an image before loading it using the FileReference class in flex 3?
Hello
The following code uses the filereference class to load the local images, it feeds each image into an arraycollection of bytearray collection. Its a filereference differenct aspects to load and display images.
http://gumbo.flashhub.NET/pagedrop/ source included
David.
-
Get and set data using the ActionScript class
Hello
I use the ActionScript class to store the user name and password when the user logs
com package
{
public class Login
{
public function Greeter (initialName:String = "")
{
}
public var uname:String;
password public var: String;
}
}Inside the Componet Login form, I am creating the object of this class of connection and affecting the data as shown in it
var logincomp:Login = new login());
logincomp.uname = UnameTI.text;
logincomp. Password = PassTI.text;
I need these data within an another CustomComponent, is it possiblke to access these data within an another componnet.Can I do this?
var logincomp:Login = new login());var str:String = new String();
Str = logincomp.uname;
Please me tips
I know it's possible with recording and Dispatching Evenets
However, I'm not interested to use DEMONSTRATIONS. I'm using FLEX 3Please advise me if this is possible.
THnaks in advance.
Thanks for helping me learn Flex quickly.
Hello
You use a Singleton class as (class ModelLocator) If Yes, then you can put a single instance of your connection class in this class so that you can access this instance in the world in any component (infact with the app).
Declare an instance of the connection object in the Singleton class like below
var logincomp:Login = new login());
Set the values in a single component, and you can access the values in the other component.
The sample class Singleton as shown below...
package com.model
{[Bindable]
public class ModelLocator
{
private static var instance: ModelLocator;
public var logincomp:Login = new login());
public void ModelLocator()
{
If (instance! = null)
{
throw (new Error ("cannot only one instance of ModelLocator"));
}
}
Public Shared function getInstance (): ModelLocator
{
if(instance == null)
{
instance = new ModelLocator();
}
return instance;
}
}
}If this post answers your question or assistance, please mark it as such.
Thank you
Jean Claude Chari
-
can I use the generic class instead of delegates
can I use a generic class instead of delegates?
public void Sort (CompareDelegate,, cMethod) / / why we creat this "cMethod?
{
for (int i = 0; i)< data.length;="">
{
for (int j = i + 1; j)< data.length;="">
{
If (cMethod(data[i],data[j]) > 0)
{
T temp = data [j];
data = data [i] [j];
data [i] = temp;
}
}
}
}class delegate
public delegate int CompareDelegate
(T v1, T v2);
main function
numbers. ((v1, v2)-online v1 - v2 sort);This is the code works perfectly, but I have confusion about class generic and delegates... can we use this generic class instead of delegates by that logic...
Hello
The question you posted would be better suited to the MSDN Community. Please visit the link below to find a community that will provide the support you want.
http://social.msdn.Microsoft.com/forums/en-us/categories
Hope this information is useful.
-
By using the impl class for functions on a table
I'm looking for a bit of advice on best practices.
I have an app with 35 paintings. I need to have a button "reset comes out" on each table.
Each resetSort method should specify the table and the specific iterator.
I tried to not having all the functions of 35 in the bean to support (1 for each table).
Can I bind each table has associated feature class impl and each resetSort button call a method in this class?
I use jdev 11.1.1.6.
Any advice would be appreciated.
Ray
Then your real mission is to find the table for which the use wants to put sorting by pressing a button?
This should be doable with the bean and a function that you bind to each of the reset buttons that you use for your tables.
If your presentation is for the tables and the button to reset sorting, you can use an actionListener to the button. In the event of action, with the knowledge of the layout, it is easy to get to the table and once you have the table that you get the iterator from the table.
Assuming that your tables are always surrounded by a panelCollection, who owns a toolbar now your reset button
emptyText = "#{bindings." EmployeesView.viewable? "{'No data to display.': 'Access Denied.'}".
fetchSize = "#{bindings." EmployeesView.rangeSize}' rowBandingInterval = '0 '.
selectedRowKeys = ' #{bindings. " EmployeesView.collectionModel.selectedRow}.
selectionListener = "#{bindings." RowSelection EmployeesView.collectionModel.makeCurrent}"="single"id ="t1">
You can use this code actionListener
{} public void resetSort (ActionEvent actionEvent)
get the link container
BindingContainer links is BindingContext.getCurrent () .getCurrentBindingsEntry ();.
DCBindingContainer dcBindings = (DCBindingContainer) links;
UIComponent toolbar (UIComponent) = actionEvent.getSource ();
Try to get the source of the event table
assuming that the button is in a toolbar of a panelCollection we get using parent.parent.children
List of children of
= toolbar.getParent () .getParent () .getChildren (); Table richeTableau = null;
for (UIComponent uic: children) {}
If (uic instanceof richeTableau) {}
table = uic (richeTableau);
break;
}
}
If (table! = null) {}
the model in the Collection is the object that provides the
structured data
for the table to render
CollectionModel tableModel = (CollectionModel) table.getValue ();
the purpose of the ADF that implements the CollectionModel is
JUCtrlHierBinding. It is surrounded by the CollectionModel API
JUCtrlHierBinding adfTableBinding = (JUCtrlHierBinding) tableModel.getWrappedData ();
Acess the ADF, which is used with iterator
ADF table binding
DCIteratorBinding iterBind = adfTableBinding.getDCIteratorBinding ();
table.queueEvent (new SortEvent (table, new ArrayList
())); CurrentRow key = null;
Line = iterBind.getCurrentRow ();
If (line! = null)
currentRow = row.getKey ();
SC SortCriteria [] = new SortCriteria [0];
iterBind.applySortCriteria (sc); iterBind is that the table iterator use
iterBind.executeQuery ();
If (currentRow! = null)
iterBind.setCurrentRowWithKey (currentRow.toStringFormat (true));
}
}
This code looks for the table of the source of the action, which is the button in the toolbar, get the tabel. Once you have the table you get the iterator from the table and reset the sort. This works as long as we find the source of the action table. If you always use the same layout for tables (for example. panelCollection > table), which is a practice of good uix, you have need of a bean to reset all tables. Simply link the toolbar button actionListner to the listener in the bean.
Timo
-
insertion of values using the impl class
Hi am values inserting data by using the class impl, my problem is when I insert values, it shows that the values must be unique so it cannot be inserted, but when I check in the database, the values are inserted, it seems my loop trying to reinsert the same values twise, am in jdeveloper 11.1.1.6.0
Published by: adf0994 on 01/15/2013 13:11public Number addOrginisation(OrgDetails orgDetails){ Number orgid =null; try{ UAMAppModuleImpl am = (UAMAppModuleImpl)ADFUtils.getApplicationModuleForDataControl("UAMAppModuleDataControl1"); CreateUserBean cu = new CreateUserBean(); String n = (String)orgDetails.getDpayment().getValue(); System.out.println(" n :"+n ); String newIdAssigned = cu.createAcc(n,orgDetails.getCadastreAccountBean() ); System.out.println(" newIdAssigned :"+ newIdAssigned ); this.addmemebres(orgDetails.getAddmember(), orgDetails.getName()); String otype = null; String osubtype = null; DCIteratorBinding it0 = ADFUtils.findIterator("UamOrganisationsView1Iterator"); if(it0 != null && it0.size() > 0){ for(Row r : it0.getAllRowsInRange() ){ EntityDefImpl accDef1 =UamOrganisationsImpl.getDefinitionObject(); UamOrganisationsImpl org1 = (UamOrganisationsImpl)accDef1.createInstance2(am.getDBTransaction(),null); otype = (String)r.getAttribute("Organisationtypecode"); osubtype = (String)r.getAttribute("Orgsubtypecode"); org1.setOrganisationtypecode(otype); System.out.println("onsertorgtype " + otype); org1.setOrgsubtypecode(osubtype); System.out.println("insertedsubtype " + osubtype); org1.setCadastreaccount(newIdAssigned); System.out.println("Addedcardaccount " + newIdAssigned); org1.setOrganisationname(orgDetails.getName()); System.out.println("AddedOrganisation " + orgDetails.getName()); org1.setCadastreaccount(newIdAssigned); System.out.println("Addedcardaccount " + newIdAssigned); org1.setOrganisationemail(orgDetails.getEmail()); System.out.println("Addedemail " + orgDetails.getEmail()); org1.setRegistrationnumber(orgDetails.getRegNumber()); System.out.println("Registrationnumber " +orgDetails.getRegNumber()); org1.setRegistrationstatus("Y"); org1.setStatus("Y"); orgid = org1.getOrganisationid(); System.out.println("returnorgid " +orgid); am.getDBTransaction().commit(); System.out.println("after "+ orgid); orgid = org.getOrganisationid(); } } String name = null; String surname = null; String identitynumber = null; String emailaddress = null; String contactnumber = null; String ownership = null; String accountofficer = null; Number officeid = null; DCIteratorBinding it = ADFUtils.findIterator("ocompanyofficerdetailsIterator"); if(it != null && it.size() >0){ for(Row r : it.getAllRowsInRange() ) { EntityDefImpl accDef2 =UamCompanyofficerdetailsImpl.getDefinitionObject(); UamCompanyofficerdetailsImpl comp = (UamCompanyofficerdetailsImpl)accDef2.createInstance2(am.getDBTransaction(),null); name = (String)r.getAttribute("name"); System.out.println("offname" +name); surname = (String)r.getAttribute("surname"); System.out.println("surnametest " +surname); identitynumber = (String)r.getAttribute("dentitynumber"); System.out.println("idtest " +identitynumber); emailaddress = (String)r.getAttribute("emailaddress"); System.out.println("emailtest" + emailaddress); contactnumber = (String)r.getAttribute("contactnumber"); System.out.println("contatc" + contactnumber); ownership = (String)r.getAttribute("ownership"); System.out.println("ownership " + ownership); accountofficer = (String)r.getAttribute("accountingofficer"); System.out.println("accountoffice " + accountofficer); comp.setName(name); System.out.println("offname " + name); comp.setSurname(surname); System.out.println("surnameoff " +surname); comp.setIdentitynumber(identitynumber); System.out.println("identitynumber " +identitynumber); comp.setEmailaddress(emailaddress); System.out.println("emailaddresscomp " +emailaddress); comp.setContactnumber(contactnumber); System.out.println("contactnumbercomp " + contactnumber); comp.setOwnership(ownership); System.out.println("ownershipcomp " + ownership); comp.setAccountingofficer(accountofficer); System.out.println("accountofficer " +accountofficer); officeid = comp.getOfficerid(); System.out.println("afterofficeid " + officeid); comp.setOrganisationid(orgid); am.getDBTransaction().commit(); System.out.println("***insetead companyofficials****" + officeid ) ; } } }catch(Exception e){ System.out.println("after "+e.getMessage()); e.printStackTrace(); } return orgid; } my log error is n :CRC *****createAcc Entity [oracle.jbo.Key[10891 ]] *****createAcc UamCadastreaccounts @@@@@@@@@@@@CRC @@@@@@@@@@@@10892 newIdAssigned :10892 onsertorgtype PRIV insertedsubtype LA Addedcardaccount 10892 AddedOrganisation testnow Addedcardaccount 10892 Addedemail [email protected] Registrationnumber 2332434 returnorgid 2233 after 2233 onsertorgtype PRIV insertedsubtype DEA Addedcardaccount 10892 after JBO-ecadastre.gov.za.uam.model.entities.UamOrganisations_Rule_0: Organisation Name Must Be Unique oracle.jbo.AttrSetValException: JBO-ecadastre.gov.za.uam.model.entities.UamOrganisations_Rule_0: Organisation Name Must Be Unique at oracle.jbo.rules.RulesBeanUtils.createException(RulesBeanUtils.java:381) at oracle.jbo.rules.AbstractValidator.createException(AbstractValidator.java:1065) at oracle.jbo.rules.AbstractValidator.doRaiseException(AbstractValidator.java:1120) at oracle.jbo.rules.AbstractValidator.raiseException(AbstractValidator.java:1109) at oracle.jbo.rules.JboAbstractValidator.raiseException(JboAbstractValidator.java:409) at oracle.jbo.rules.AbstractValidator.raiseException(AbstractValidator.java:1096) at oracle.jbo.server.JboUniqueKeyValidator.validateValue(JboUniqueKeyValidator.java:369) at oracle.jbo.server.JboUniqueKeyValidator.validateValueWithContext(JboUniqueKeyValidator.java:84) at oracle.jbo.rules.JboAbstractValidator.callValidateValueWithContext(JboAbstractValidator.java:235) at oracle.jbo.rules.JboAbstractValidator.validate(JboAbstractValidator.java:386) at oracle.jbo.rules.RulesBeanUtils.validateObject(RulesBeanUtils.java:725) at oracle.jbo.rules.RulesBeanUtils.validate(RulesBeanUtils.java:696) at oracle.jbo.server.AttributeDefImpl.validate(AttributeDefImpl.java:3349) at oracle.jbo.server.AttributeDefImpl.set(AttributeDefImpl.java:3294) at oracle.jbo.server.EntityImpl.setAttributeInternal(EntityImpl.java:2012) at ecadastre.gov.za.uam.model.entities.UamOrganisationsImpl.setOrganisationname(UamOrganisationsImpl.java:336) at uam.cadastre.gov.za.CreateOrganisationBean.addOrginisation(CreateOrganisationBean.java:213) at uam.cadastre.gov.za.OrgDetails.getNextStopPayment(OrgDetails.java:689) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.el.parser.AstValue.invoke(Unknown Source) at com.sun.el.MethodExpressionImpl.invoke(Unknown Source) at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46) at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96) at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96) at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96) at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1018) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:386) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446) at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177) at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119) at java.security.AccessController.doPrivileged(Native Method) at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315) at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442) at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103) at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171) at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178) oracle.jbo.server.ViewRowSetImpl@8f2102 null null null null null null BDP CRA CRC DRO EFT OTC ************endpayment ********* but am able to insert the organisation values in database but it show me that Organisation Name Must Be Unique the for loop is re-entering the values again
Published by: adf0994 on 01/15/2013 13:12Hello
a rule in the ADF is still working through the link layer (and that's what you start by before you can join the impl classes). When you have access to a DCIteratorBinding, you have access to the lines it holds. Of the DCIteratorBinding, you can get access to the RowSetIterator (getRowSetIterator()). Here you can now create new lines programmatically by calling
-Row rw = rowSetIterator.createRow ();
-fill in the attribute for line
-rowSetIterator.insertRow (rw);You can also use this to simply update the existing lines. With the next commit, these changes will be persistent in the database.
Frank
-
How to use the PrintJob.addPage method print movieclips on frame?
Hello
I am using Flash CS3, AS2.
I try to print the movieclips placed on different images in the main timeline.
First of all, I have to print the movieclip placed on the 172 chassis, and then print a movieclip on the 179 chassis and so on...
I applied the code below to the event (release) on a button named btnPrint:
var my_pj:PrintJob = new PrintJob();
If (my_pj.start ()) {}
var pageAdded:Boolean = false;
pageAdded = my_pj.addPage (0, {xMin:394, xMax:1033, yMin:46, yMax:953}, null, 172);
If {(pageAdded)
my_pj. Send();
}
}I have 2 problems with the above code.
First of all, when I click on btnPrint in my flash animation in the web browser, and then press the "print" button in the printer dialog, it can print the movieclip placed on the 172 but frame flash animation in my web browser goes to the framework 172 and stops there. I don't want my flash movie to actually go to the 172 section where the movieclip is placed, but I want to keep it at the current frame.
The second problem is the flash movieclip placed on frame 172 a actionscript code in this document, which sets the text in the text box inside the movieclip to the value of the variable that was recovered using the loadVariablesNum() method. However, print them page shows the movieclip with no actionscript code executed - the text boxes are empty. I'm sure that codes in the movieclip actionscript is correct because movieclip exactly same spot on the current frame displays the text correctly area.
Can someone explain to me how sove such problems?
Thank you.
do you see a problem in http://www.kglad.com/Files/forums/test4.html?
-
using the Sound class? (OOP)
Hey,.
I had all of my public variables to the sound class, but im having trouble on how I would perform them because I normal use event listener but its OOP lol so how do you get this feature :/
-code into a file star.as:
package
{import flash.display.MovieClip;
public class star extends MovieClip
{public var my_sound:MySong = new MySong();
public var my_channel:SoundChannel = new SoundChannel();
public void star()
{
}
}}
Thank you all
Search in the online help for the sound. You will find an example of class for the import and playback of an audio file. Just follow this class.
-
By using the same class for movieclips duplicate
Hi all
I created an external a particular movieclip class and I would like to bind a version duplicated this MovieClip in the same class file.
Problem is that I can't seem to do. Even if I declare the class as a BASE of the new movieclip class and create another name of the random class for it.
Is there a way I can get around this so I can give my clip duplicated the same class name?
Thanks in advance
Martin
use:
package {}
import flash.display.MovieClip;
SerializableAttribute public class Animal1 extends Animal {}
public void Animal1 (): void {}
Super (frameNumber, level);
}
}
}you will then get errors telling you of frameNumber and level are not defined. fix this.
-
find the files using the item class
Hello
Is it possible that I can find files that have elements with a specific element class?
Thank you.
LeahHi LEA
The following script will display a list of all the items in a business district prompted who use only one, you are prompted for LOV. If you leave off the prompt for the business district, you will find all the elements and all records that use the LOV. Change it further, you can view only folders.SELECT
DOM. Name 'LOV name. "
OBJ. OBJ_NAME "Folder Name"
Exp. EXP_NAME "name of the element.
Of
EUL5_BA_OBJ_LINKS BOWL,
EUL5_BAS BA,
EUL5_OBJS OBJ,
EUL5_EXPRESSIONS EXP,
EUL5_DOMAINS DOM
WHERE
BOWL. BOL_BA_ID = BA.BA_ID
AND THE BOWL. BOL_OBJ_ID = OBJ. OBJ_ID
AND EXP.IT_OBJ_ID = OBJ. OBJ_ID
AND EXP.IT_DOM_ID = DOM. DOM_ID
AND BA_NAME =: BA_NAME
AND NAME =: LOV_NAME
ORDER BY 2, 3;Best wishes
Michael -
[as2] Make a Tween without using the tween class, take 2
Hello. The previous topic was allowed to use with settings that made a square only.
If you try to make a clip trip along a diagonal rectangle within 90 seconds, the video made a few curves.
Any help?
Thank you
the code I gave before induces no curve. but because flash rounds the positions of the object to the pixel the most proche.05 you can see an accumulation of rounding errors if you use some settings and you are very picky about the position of the object. If this is the case, use the following in order to avoid the accumulation of rounding errors:
function initTweenF(mc:MovieClip,_x1:Number,_y1:Number,_x2:Number,_y2:Number,_sec:Number):Void {}
var freq:Number = 70;
clearInterval (mc.tweenI);
MC.x = x 1;
MC.y = y1
Mc.x = MC._x;
Mc.y = MC._y;
mc.tweenI = setInterval (tweenF, freq, mc, (x 2 - x 1) * freq /(1000*sec), (y2 - y1) * freq /(1000*sec), x 2, y2);
}
function tweenF(mc:MovieClip,_xInc:Number,_yInc:Number,_x2:Number,_y2:Number):Void {}
MC.x += xInc;
MC.y += yInc.
Mc.x = MC._x;
Mc.y = MC._y;
If (Math.abs (mc._x - x 2)
MC._x = x 2;
MC._y = y2;
clearInterval (mc.tweenI);
}
} -
Error when trying to use the CSSFormatResolver class in Flash CS4
Hello
While he was trying to work with a version revised class CSSFormatResolver (created by timoisalive and posted on thread), the compiler threw the following error:
1061: call to a getChildAtIndex method maybe not defined through a reference with static type flashx.textLayout.elements:FlowGroupElement.
The method originated in the CSSFormatResolver class invalidate() method.
public function invalidate(target:Object):void {
delete _textLayoutFormatCache[target];
var blockElem:FlowGroupElement = target as FlowGroupElement;
if(blockElem) {
for(var idx:int = 0; idx < blockElem.numChildren; idx++) invalidate(blockElem.getChildAtIndex(idx));
}
}
If I comment the loop for, can I get the sample runs, but which seems to seriously affect the way in which the styles are interpreted...
The example files are listed below.
Any suggestions?
Thank you in advance.
There is no FlowGroupElement.getChildAtIndex method.
There are these two:
Returns the child of the FlowElement element at the specified index.FlowGroupElement Searches in children for the specified element FlowElement object and returns its index location.FlowGroupElement I think you meant getChildAt.
Hope that helps,
Rich
-
How to use the getter class set extends thread?
package mypackage; import java.io.ByteArrayInputStream; import java.io.InputStream; import javax.microedition.io.HttpConnection; import javax.microedition.xml.rpc.Element; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import net.rim.device.api.io.messaging.UsernamePasswordCredentials; import net.rim.device.api.io.transport.ConnectionFactory; import net.rim.device.api.ui.UiApplication; import net.rim.device.api.ui.component.Dialog; import net.rim.device.api.ui.component.RichTextField; import net.rim.device.api.ui.container.MainScreen; import net.rim.device.api.xml.parsers.DocumentBuilder; import net.rim.device.api.xml.parsers.DocumentBuilderFactory; public class search extends Thread{ private MainScreen scren; String nul = ""; MyScreen a = new MyScreen(); public void run() {// define variables later used for parsing System.out.println("MASUK SEARCH!!!"); String url = "http://localhost/ms/password.xml"; Document doc = null; HttpConnection conn = null; try{ //providing the location of the XML file, //your address might be different conn=(HttpConnection) new ConnectionFactory().getConnection(url).getConnection(); System.out.println(conn.toString()); conn.setRequestProperty("User-Agent", "Profile/MIDP-1.0 Confirguration/CLDC-1.0"); conn.setRequestMethod(HttpConnection.GET); //next few lines creates variables to open a //stream, parse it, collect XML data and //extract the data which is required. //In this case they are elements, //node and the values of an element if(conn.getResponseCode()== HttpConnection.HTTP_OK){ DocumentBuilderFactory docBuilderFactory= DocumentBuilderFactory. newInstance(); System.out.println("masuk Sini"); InputStream inputStream = conn.openInputStream(); byte[] data = new byte[256]; int len = 0; int size =0; StringBuffer raw = new StringBuffer(); while(-1 !=(len =inputStream.read(data))){ raw.append(new String(data,0,len)); size +=len; } String content = raw.toString(); InputStream input = new ByteArrayInputStream(content.getBytes()); DocumentBuilder docBuilder= docBuilderFactory.newDocumentBuilder(); docBuilder.isValidating(); System.out.println("dan sini"); docBuilderFactory.setIgnoringElementContentWhitespace(true); // Element root= doc.getDocumentElement(); // System.out.println(root.toString()); // // Element operation = (Element) root.getOwnerDocument(); // System.out.println(operation.toString()); // String layer = operation.getAttribute("Category"); // System.out.println(layer); // root.normalize(); System.out.println("terakhir"); // System.out.println("Category:"+layer); doc = docBuilder.parse(input); doc.getDocumentElement().normalize(); NodeList list=doc.getElementsByTagName("password"); System.out.println("Atleast!"); String _node=new String(); String _element = new String(); //this "for" loop is used to parse through the //XML document and extract all elements and their //value, so they can be displayed on the device for (int i=0;i
Sorry for my bad English
This is my code
I want to pass the string, which is _Node I get it to XML parsing, to another class.
can I get the string? Thank you
already fact-_-
user OOP
Maybe you are looking for
-
Why firefox blocks websites that I go to every day
yesterday when I tried to go to the website of the library of the County of Richland, it says that firefox has blocked it - I want to know why and how I can unlock it - I searched for the answer and have not – this is the address that I tried to go h
-
So, I recently took an IOGEAR 2 port USB KVM switch. I needed to swap between my work on the VPN and my regular home machine laptop. (Leaning over the desk to type on it really sucks.) I already had if this synergy would do the trick, but I can't use
-
Can't find my wireless network
I recently bought 2 identical laptops, eMachines E525 Acer. Two of them are under Vista Home Premium. When I put in place the first laptop computer, he finds and allowed me to connect to my router wirelessly with no problems whatsoever. When I pulle
-
Color Laserjet M252dw: Cannot reset the printer
I'm unable to access the configuration screen to reset my printer because I keep getting prompted for a password that I unfortunately forgot the setting. How can I reset my printer in this situation? Thank you.
-
The unique sharing of all tabs navigation pane.
Hi all I have a tab pane in my app, now I have 4 components of navigation for 4 tabs. is it possible that all my 4 tabs share the same navigation pane? Answer please! Thank you.