Error in MovieClip.height Property
I've found that Flash inserts an extra area around objects
drawn in a MovieClip. This causes problems when trying to scale an
object to match a desired pixel size. To see the error, try this:
Create a new MovieClip symbol and export for ActionScript.
Create a new rectangle object inside the new MC symbol.
While editing the MC, select the entire rectangle and, in the
Properties panel, set the height to 50.0
In AS create a new instance of it and set scaleY = 10.0 and
turn on its opaqueBackground as shown in code snippet below:
var test_mc:MovieClip = new Symbol6();
trace(test_mc.height);
addChild(test_mc);
test_mc.opaqueBackground = 0xdd0000; // shows that the movie
clip actually extends beyond the visible portion and when scaling
more than 2x that adds up to a lot of pixels
test_mc.scaleY = 10.0;
You will see that the trace statement reports the height as
52, not 50 and you will also see a thick red border surrounding the
drawn rect. This spurious addition of two pixels introduces errors
when trying to calculate scaleX/Y properties in code to match some
desired dimension.
David Salahi
yes this is a known issue with flash and it is completely to
do with the width of the stroke surrounding your rectangle. you
will notice if you remove the stroke from your rectangle, or select
no stroke(the square with a red diagonal line), test_mc.height will
be traced as 50.
when the flash ide reports a symbol height, it ignores the
width of the stroke around the edges, while actionscript adds the
width of the stroke/2.
so the formula for determining the height of a rectangle for
example, would be:
rectangle height in AS=height returned by
IDE+(strokeWidth/2)*2
we multiply by 2 for the top and the bottom. or a simpler way
of putting this would be:
rectangle height in AS=height returned by IDE+strokeWidth
or in your case:
rectangle height in AS(52)=height returned by
IDE(50)+strokeWidth(i'm betting your rectangle has a strokeWidth of
2)
i went into this in more detail last year
in
my blog
i'm not sure exactly why you're seeing a thick red border.
the only thing i can think of is that you're rectangle's stroke is
transparent.
craig
Similar Messages
-
Error: Error #2078: The name property of a Timeline-placed object cannot be modified.
at flash.display::DisplayObject/set name()
at RonaldTest_fla::MainTimeline/frontWheelLoadComplete()
The code that triggers that bogus error is the following:
var frontWheelLoader:Loader = new Loader();
frontWheelLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, frontWheelLoadComplete);
frontWheelLoader.load(new URLRequest("FrontWheel.png"));
function frontWheelLoadComplete(event:Event):void
var loadedImg:Bitmap = new Bitmap();
loadedImg = event.target.content;
loadedImg.name = "My Loaded Image"; // bugging line
var kontainer:MovieClip = new MovieClip();
kontainer.addChild(loadedImg);
addChild(kontainer);
Any ideas?
Regards,
RonI swear to God, I don't. I have tried many different names, but to no avail ...
var loadMe:Loader = new Loader();
loadMe.contentLoaderInfo.addEventListener(Event.COMPLETE, loadIsNowcomplete);
loadMe.load(new URLRequest("Snowfighter.jpg"));
function loadIsNowcomplete(event:Event):void
var abcdefghijklmnopqrstuvwxyz:Bitmap = new Bitmap();
abcdefghijklmnopqrstuvwxyz = event.target.content;
abcdefghijklmnopqrstuvwxyz.name = "MyLoadedImage"; // bugging line
var kontainer:MovieClip = new MovieClip();
kontainer.addChild(abcdefghijklmnopqrstuvwxyz);
addChild(kontainer);
trace("content: " + kontainer.getChildAt(0).name); // instance8
theTween.addTarget(abcdefghijklmnopqrstuvwxyz, 1); -
Error #1056: Cannot create property __id0_ on ModuleSwf
I have a document class for a SWF. This SWF compiles and runs fine. When I load it inside another SWF, I get this:
ReferenceError: Error #1056: Cannot create property __id0_ on ModuleSwf.
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at ModuleSwf()
ModuleSwf is the document class of the loaded SWF. What is causing this?ReferenceError: Error #1056: Cannot create property __id0_ on ModuleSwf.
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at ModuleSwf()[C:\Users\me\Projects\MyProject\Production\Assembly\classes\ModuleSwf.as:17]
package
import flash.display.DisplayObject;
import flash.display.MovieClip;
import flash.events.Event;
public class ModuleSwf extends MovieClip
{ // This is line 17
public function ModuleSwf()
if (this != root)
stop();
addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler, false, 0, true);
addEventListener(Event.REMOVED_FROM_STAGE, removedFromStageHandler, false, 0, true); -
I'm using amxmlc to build a SWF from an MXML source code file. I'm passing -swf-version=13 to amxmlc.
In the MXML source, I have the following line:
<s:TextArea id="inputTextArea" width="100%" height="100" fontSize="28" borderColor="#000000" skinClass="spark.skins.mobile.TextInputSkin" />
I get these errors when running the amxmlc command:
...App.mxml(428): Error: Access of undefined property TextInputSkin.
<s:TextArea id="inputTextArea" width="100%" height="100" fontSize="28" borderColor="#000000" skinClass="spark.skins.mobile.TextInputSkin" />
...App.mxml(428): Error: Definition spark.skins.mobile:TextInputSkin could not be found.
<s:TextArea id="inputTextArea" width="100%" height="100" fontSize="28" borderColor="#000000" skinClass="spark.skins.mobile.TextInputSkin" />
Why am I getting these errors? I need to be able to use the spark.skins.mobile.TextInputSkin in order to have use of the soft keyboard on iOS devices.you need the classes mentioned after 'Definition" in the lines below and they should be place in de/alex_uhlmann/animationpackage subdirectory of your default directory.
Symbol 'nms_new_all.flv', Layer 'Layer 6', Frame 1, Line 2, Column 50
1172: Definition de.alex_uhlmann.animationpackage.animation could not be found.
Symbol 'nms_new_all.flv', Layer 'Layer 6', Frame 1, Line 3, Column 48
1172: Definition de.alex_uhlmann.animationpackage.drawing could not be found.
Symbol 'nms_new_all.flv', Layer 'Layer 6', Frame 1, Line 4, Column 48
1172: Definition de.alex_uhlmann.animationpackage.utility could not be found.
you also need penner's easing class in com/robertpanner -
Oh man! jsut when i thought I w'as getting somewhere! I thought I had my load and unload code sorted and now I am getting this error for a particular .swf that I am trying to load. the loader code is working fine, it will load a test. The particular.swf works fine on its own, but it wont load for some reason! Argh!!!!! AM I just a total $%#^%# idiot or waht! This process has been like having my eyeballs extracted by ants!
Please please help
ReferenceError: Error #1056: Cannot create property write_visionMC on aavar.
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at aavar()
write_visionMC is the a movieclip inside the .swf I am trying to load aavar() is my docuemnt classuse the trace() function to debug. start by confirming that your document class'es constructor is being called. then use traces to make sure your movieclip exists before it's being referenced.
-
I created random quiz with 20 questions and tested it at www.scorm.com for scorm compliance testing. When I launch the course, i get the below error message. If I select continue and proceed to the quiz, after answering few question, randomly submit button for one of the questions is getting disabled. Please help.
ERROR MESSAGE:
ReferenceError: Error #1056: Cannot create property btnEnterJ on mmquizzingv4_as3.mmquizclasses.SubmitButton.
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at captivate.veela_as3::rdBase()
at captivate.veela_as3::rdItem()
at mmquizzingv4_as3.mmquizclasses::QuestionButton()
at mmquizzingv4_as3.mmquizclasses::SubmitButton()
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at mmquizzingv4_as3.mmquizclasses::Question()
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at captivate.veela_as3::rdBase()
at captivate.veela_as3::rdSlide()
at captivate.veela_as3::rdQPSlide()I got the code when I up graded to Adobe air and it has a conflect with accure weather..... Looks like someone attached it to the upgrade to Adobe 8
Enter the code in the Adobe support search web page and you get another erro code not in English....hummmm Google comes up on the support button
to reg the google internet browers I did and google came up and I type in the adobe 1056 error...Over 5 third party free fixes came up???? Windows 7
didn't like anyone of them.......I called Adobe support and no help for free......I uninstalled the Adobe Air and the error went away along with adobe Air...
It seems everyone else knows there is a problem but Adobe???? I love Adobe.....I don't like there lack of Training their customer support people.... -
Hello,
I am currently working with digital accelerometer LIS35DE from ST Microelectronics. I want to start with tests of this device. For that purpose I used NI 845x USB to connect with accelerometer via I2C. Unfortunately, when I made electrical connections and set up parameters of communication and run the program (I found it in examples) the following error occured:
Error -301713 occurred at Property Node (arg 2) in General I2C Read.vi
Possible reason(s):
NI-845x: An input parameter, or combination of parameters, is invalid. An example of this error may be setting an invalid baud rate or enabling I2C ACK polling while using 10-bit addressing.
The code can be found in attachements. I couldn't find any extended description of this problem. What could be a problem: incorrect device address, register address, configuration parameters?
Any help is appreciated!
Best regards,
Michael
Attachments:
General I2C Read.vi 24 KBHi MicMac89!
First of all could you please post which version of LabView are you using?
Could you please tell me which version of 845X hw are you using? (8451 or 8452)
I opened the example you attached. As you wrote the error occurs at the second argument of the property node. (I guess this is the first property node where the error occurs.)
This argument of the property node enables the onboard pull-up resistors. But not all NI-845x hardware support pull-up resistors. (Because of this is important to know which hw version are you using.)
Did you try the example with disabling the pull-up resistors?
I suggest you to go through the Manual of this product, (if you did this not yet) This could make it clear where and when to use what kind of pull-up resistors.
For example: If you are using 8452, you must enable pull-up resistors, for Vref ≤ 1.8 V for the FPGA to properly detect a low-to-high transition
Manual: http://www.ni.com/pdf/manuals/371746d.pdf
HW specification: http://www.ni.com/pdf/manuals/290598a.pdf
Please post if my suggestions helped. Of course if you have any questions, don't hesitate to post them.
Best regards,
Balazs Nagy -
Error 1073807202 occurred at Property Node (arg 1) in VISA Configure
I am working with the 30-day evaluation version of LabVIEW
(Version 9.0 32-bit). I am attempting to perform the serial loopback test
described in NI's Developer Zone Tutorial, executing Basic Serial Read and
Write.vi. When I click the Run arrow a dialog box appears with the
following legend:
"Error 1073807202 occurred at Property Node (arg 1) in VISA Configure
Serial Port (Instr).vi>Basic Serial Read and Write.vi. LabVIEW: VISA or
code library could not be located. ...required drive not installed..."
I can find the "smplserl.vi" driver in the /examples folder on my PC.
What's wrong?Did you do a search for that error? Install NI-VISA.
-
Error 1055 occurred at Property node
Generating the error:
"Error 1055 occurred at Property Node in ... Possible reason(s): LabVIEW object reference is invalid."
when I try to wire the IMAGE OUT output from the IMAQdx Snap vi to the value property of an externally referenced image display control.
To describe in more detail, I have a parent vi with an image display control and a child vi which has a control refnum linked to the parent vi display. In the child vi I create a value property for the refnum and try to write images to it, essentially to drive the parent display from the child vi.
The technique works elsewhere, though I can't think of what I could have done differently to generate this error?Hi Mike - looks like I may not need to. I've been working away at this and have found the original cause and something else a bit weird...
I deleted the objects from the sub-VI that was giving me errors, then cut and pasted the objects (image display refnum and value property) from a VI that was working and this solved the problem. So you might think that the issue was just some obscure configuration item, or I'd used the wrong type in my reference or something.
I found the display reference in the parent VI was not even wired to the sub VI - duh! Error between keyboard and chair. So at least the original error message made sense, but I have no idea why it actually worked after pasting in the new objects. Are these references using some sort of auto-magic? Who knows. Safer to wire up my sub-VI's properly methinks.
Sorry for wasting forum time on this one. -
HI,
I created a Real Time application with debugging enabled that only makes a straight line move and then finds center (using SoftMotion function blocks). When I run the VI from the project everything works fine. When I create the executable and run the application as a start up some times it moves beyond the limit switches and I have to abort the application, it never really works as smooth as it does when ran directly from the project.
I simplified the application. When connecting to the executable ( Operate>>Debug Application or Shared Library...)
I saw that sometimes I was getting an error that said the find center function could not be executed because the driver was not enabled. This was never needed when running from the project. I added the Power SoftMotion block and I enabled the driver before getting into the while loop that finds center. Again the VI ran without errors when ran directly from the project, but when I connected to the executable I found the following error coming out of the Power SoftMotion block (the name of my VI is: "Testing SEND to ZERO by itself.vi"):
"Error -70038 occurred at Property Node in nimc.fb.power.power.coordinate.vi --> Testing SEND to ZERO by itself.vi
Possible reason(s):
Motion: An unexpected error has occurred internal to the driver. Please contact National Instruments with the name of the function or VI that returned this error"
I am using cRIO 9022 as a controller and two 9512s.
LabVIEW 2009
NI-RIO 3.2.1
SoftMotion
Any idea why the VI works fine when ran directly from the project but does not work as expected when ran as a stand alone application directly on the cRIO?
Thanks,
Fab
Certified LabVIEW Architect * Certified Professional Instructor * LabVIEW ChampionMarc,
When I simplified my program, I forgot to put the Power Function block inside a loop and make sure I was sending a pulse for the execute input. I am guessing that could have caused the weird error.
If I see it again, I will let you know.
Thanks,
Fab
Certified LabVIEW Architect * Certified Professional Instructor * LabVIEW Champion -
FPGA 2010 Compilation error - TclTasklC:project_028: Unknown property value
Hi, I'm using a cRIO 9075 and a NI 9211 to measure temperature for a project busy with. Everytime I try t compile code I have a compilation error that read as follows:
Compilation failed due to a Xilinx error.
Details:
ERROR: TclTasksC: project_028:Unknown property value "spartan6" specified for "PROP_DevFamily"
Can someone help me on how to resolve this error, I'm using LabVIEW FPGA 2010 and Xilinx 11.5
Regards
Solved!
Go to Solution.What version of the NI-RIO driver do you have?
Attached is a chart with the different compatibilities of the RIO driver.
NI-RIO and LabVIEW Version Compatibility
http://digital.ni.com/public.nsf/allkb/577CC9A7DCFC73DF8625738400116CC3?OpenDocument
Is this a 64-bit machine? Also, the minimum version of LabVIEW that will work with the 9075 is LabVIEW 2010SP1. You can verify if you have this version by going into Measurement & Austomation Explorer and expanding software. If you do not have LabVIEW 2010SP1, you will need either the platform DVDs for 2010 SP1 or you can download the content from www.NI.com/src.
You will also want to verify that you have the 2010SP1 FPGA module and 2010SP1 RT module.
Also, does this issue occur with all FPGA VIs that you try to compile or only the one that you are currently working on?
You can check by doing two things:
1. Try to compile a blank FPGA VI (i.e. nothing on the block diagram or front panel)
2. Try to compile an FPGA VI from one of the example LabVIEW projects
Please post back if one of these troubleshooting steps resolved your issue or if you're still having problems.
Jordan -
Error cluster in XControls Property node
Hello!
Property Nodes of XControls do have Error Clusters, but how can I change those out of the Facade? I'm setting an object through a property node for tree data. It is possible that some of the object methods generate an error while executing in the facade and I would like to catch this error in the VI containing my XControl.You can't change the error output from a property node from within the facade since the facade only gets called after the property VI has run and modified the contents of the display state information. If possible try to catch invalid values in the property VI itsefl. If there are errors that the xcontrol will need to report you will need to provide a separate mechanism.
Something that I have used in the past to good effect is the idea of an error stack. The error stack itself is an array of error clusters that resides in the display state data and is maintained as a circular buffer by the xcontrol code. To access this value from the calling program create a read-only property that reads the contents of the buffer and then clears it.
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps -
Server0 not starting; ERROR = Can't open property file
Hi,
I have installed SAP EP 6.0 and it was working fine till yesterday.
But now when I am trying to open the Portal (http://hostname:50000/irj) it says Page cannot be displayed.
Also when I try to login to Visual Admin I get this error message:-
Unable to lookup connection Default http://sbdep:8101/msgserver/text/logon returned empty list of connection parameters
I restarted the EP instance (not rebooted) and the JC00 and SCS01 have started normally,but portal is till not UP.
Have found the following details in the logs:-
dev_jcontrol :-
[Thr 47609482135840] *** ERROR => Can't open property file [/usr/sap/EPD/JC00/SDM/program/config/sdm_jstartup.properties] [jstartxx_mt. 1952]
[Thr 47609482135840] *** ERROR => JStartupReadArgumentsEx: can't enumerate nodes [/usr/sap/EPD/JC00/j2ee/cluster/instance.properties:/usr/sap/EPD/JC00/SDM/program/config/sdm_jstartup.properties] (rc = -1) [jstartxx_mt. 524]
Kindly suggest where cud be the issue and how do I proceed.
Rgds,
AbhijeetHi,
- I think firstly, you need to ensure following files is restored or available as per location
1. instance.properties file
2. sdm_jstartup.properties file
and restart instance
- check if any profile changes
Regards,
Vincent -
Checkbox and movieclip height issue
Hi,
I added a check box component inside a empty movieclip.Before adding the movie clip height is 0,once i added a check box component on the movieclip its height shows 100.But when i saw the height of check box its just 22. whats the issue on calculating the movieclip height?
Here is the coding
var mc:MovieClip=new MovieClip();
addChild(mc)
var cb:CheckBox= new CheckBox();
cb.label="tts"
mc.addChild(cb)
trace(cb.height) // output 22
trace(mc.height) // ouput 100
Issue:
I want to calculate the movieclip height on runtime.on the above case i expect the mc height as 22 but it give 100.how to solve this?Yes i checked it..
trace(cb.height,mc.scaleX,mc.scaleY)
// output 22 1 1
trace(mc.height,mc.scaleX,mc.scaleY) // ouput 100 1 1
seems issue not deal with the scaleX,scaleY.becase when i other movieclips the height is perfect. issue is adding check box component -
SRDEMO ??? error occurred while getting property "userId" from an instance
Error
JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: java.lang.RuntimeException, msg=javax.servlet.jsp.el.ELException: An error occurred while getting property "userId" from an instance of class oracle.mysrdemo.view.UserInfo
JBO-29000: Unexpected exception caught: java.lang.RuntimeException, msg=javax.servlet.jsp.el.ELException: An error occurred while getting property "userId" from an instance of class oracle.mysrdemo.view.UserInfo
javax.servlet.jsp.el.ELException: An error occurred while getting property "userId" from an instance of class oracle.mysrdemo.view.UserInfo
Hello,
Can you please guide to correct the above error. Thanks a lot.
DShahHi,
I got the answer to my question. The tables were not populated. So I ran the script - populateSchemaTables.sql, and got the data into the tables. The error is gone!
Lin
Maybe you are looking for
-
Creating a .MSG file which has file attachments
Hi If I wanted to create a Word document or an Excel file, I would simply use cfcontent and then save the content to disk using cffile. However, I now have a requirement whereby I would like to create a .MSG file. (This is the equivalent, if you use
-
I came up with a way to increase the bottom line and increase public opinion of Verizon.
When the Verizon customer service staff read script to customers all day, they know all the details... all the small details. The average user does not. Some people use Verizon email for important email, and then other email accounts for less impo
-
Hai all i am all new to jsf. i have created a edit profile page where it is displaying the content fetched from database in textbox and combobox, now i have a field suppose username which is a required field like <h:inputText value="#{xBean.username}
-
Unable to install SAPNW2004sSneakPreviewABAP
I am trying to install SAPNW2004sSneakPreviewABAP while installing at 4 point i got the following error Could you please anybody can help me in this I am installing SneakPreviewABAP in WindowsXP with SP2 ERROR 2006-03-30 22:19:01 CJS-30129 Creating
-
Retouch tool adjustments not saving
Had this problem in previous version of Aperture (after it worked it just stopped working!). Changes I make using the repair tool to Repair or Clone are not showing. When I make a repair, there is a long delay with "Loading" showing and when that op