ActionScript 3.0 :: Cannot Access X Property Of Rectangle

Jun 24, 2009

This works:

ActionScript Code:
var gc:Rectangle = (textField[11].getCharBoundaries(startIndex));
trace (gc); // returns (x=32.7, y=2, w=4.15, h=8.85)

[Code].....

There are some documented bugs in getCharBoundaries, but this seems fine as it will obviously retrieve the relevant values. I can't believe I have to pull out the x value using toString() and a RegExp

View 9 Replies


Similar Posts:


Flex :: Access To Object Property When The Propety To Access To It's In A String Variable?

Oct 20, 2010

It's too complicate to explain but I'll give you an example

I have an AS3 ResultEvent Object and this object has several propeties which can be accessed by this like:event.result.name or event.result.age and, I have this String variable: eventProperty:String that contains "name" or "age" How do I access to event.result. with the variable?

View 2 Replies

Actionscript 3 :: Scrollbar With Sprite And Rectangle Won't Move Text, Just The Rectangle It's Painted On?

Mar 8, 2010

For those of you still with me, I am tasked with making some scrollable content in Flash. Load in a TextFile using LoadURL(), then display it. To get the text, we've written our own class TextFieldExtended, which is basically just there to give the textfile location to the constructor and then have the class do the various steps of getting it and loading it for you.So I needed to get a Scrollbar, which I got hereThe thing is, it works with Sprites.After trying to get it to accept TextFieldExtended, I bumped into a block, since the scrollbar relied heavily on a Sprite property that TextFieldExtended didn't have or could have.

So I tried adding the TextFieldExtended instance to a Sprite instance using addchild.A problem occurs here that I do not know how to handle. It seems that a Rectangle is drawn and the Text is drawn on that. I say this because the scrollbar moves the Rectangle up and down a bit, but the text doesn't scroll, just the Rectangle it is positioned in and the text then moves along with it.My question: can this be fixed, or is does this implementation of scrollbars need a lot of adaptations before this is possible?

View 1 Replies

Draw Rectangle Should See Little Bold Circle To Indicate A Perfect Rectangle

May 20, 2009

I draw a rectangle i should see a little bold circle to indicate a perfect rectangle, I seemed to lost mine, can somebody please tell me how to get it back!

View 2 Replies

ActionScript 3.0 :: Convert Rectangle To Curved Rectangle?

Aug 2, 2011

I am trying to convert a rectangle(actually multiple rectangles) to a curved rectangle. I think it should be pretty easy but I guess i am stupid. Basically I would have a start position and stop position (many of these), and they would be converted to curved rectangles and follow in a cicrle around.

View 0 Replies

ActionScript 3.0 :: Creating A Rectangle Inside Of A Rectangle?

Jun 26, 2010

I would like to create a rectangle inside of a rectangle, starting approximately 15% inward from the right side of the other rectangle.

I know how to create rectangles with:

Code:
var newHotRect:MovieClip = new MovieClip();
newHotRect.graphics.beginFill(0x00FF00);
newHotRect.graphics.drawRect(0, 0, 100, 100);
addChild(newHotRect);

But how would I make another rectangle on top of that (the black one pictured) that is approximately 15% from the right?

I toyed around with .right, and .bottomright with no success. Can anyone lead me in the right direction? or even finding the x and y of the upper right or bottom right side of a rectangle?

View 10 Replies

ActionScript 3.0 :: Rectangle To Rectangle Collision Response?

May 20, 2011

how to respond when a rectangle hits another rectangle? I already know how to detect the collision, I just don't know how to respond to it. I'm just trying making a simple side-scrolling platform game where I have platforms I can walk on and bump against on all sides. I have searched everywhere and just can't find the tutorials I'm looking for.

View 6 Replies

AS3 :: Css - Access Of Undefined Property?

Mar 16, 2011

I know there are a number of posts dealing with this issue. But, I'm still not understanding it.I keep getting a "1120: Access of undefined property CSSloader." in the following script:

package as3.comp{
import flash.events.Event;
import flash.events.ProgressEvent;

[code]........

View 1 Replies

ActionScript 3.0 :: Access A Set Property

Sep 3, 2009

I need to access the property Access inside of my class. Actually I can do this in my FLA Reader.Access, but take a look in onComplete function, this function try call Access, but nothing happen.[code]

View 2 Replies

ActionScript 3.0 :: Cannot Access A Property

Sep 7, 2010

BTW the code i have below works, but when i try to have an animation sequence it doesnt work..menu is a movieclip i made then inside it are buttons like read for example in my code,,menu.read w/o animation works but when i place an animation to make it have a cool intro i get the error. [code]...

View 7 Replies

ActionScript 3.0 :: ErrorCannot Access A Property?

Oct 23, 2010

i am working on a flash liquid website on AS3. The main fla file works with the website.as file where all the code adjusts all the movie clips on the stage. (middle, top left, top right, low left etc etc)This works fine...however.. when i add buttons and interactivity to move to another frames on the timeline inside the middle movie clip i get this stupid errorCannot access a property or method of a null object referenceI got this before and i know that flash doesnt read the instance of the button..

View 2 Replies

Access Of Undefined Property HomeArtist MC

Jun 29, 2009

I have an app where I am wanting to use some movieclips when clicked on to remove the current movieclip and add a new movieclip. My problem seems to be that whenever I refer to the homeArtist_mc movieclip I get an error.

For example on line 50 in my actionscript I have
homeArtist_mc.buttonMode = true;
And I get this error
1120: access of undefined property homeArtist_mc.

Attachments: index004.zip (1.6 MB)

View 2 Replies

Access Of Undefined Property On Button?

Dec 14, 2009

i have gave this action on the timeline but i m getting this error (Access of undefined property)
 
close_btn.addEventListener(MouseEvent.CLICK,connection);
function connection(evt:MouseEvent):void


[code]......

View 1 Replies

ActionScript 3.0 :: Cannot Access A Property / Method

Nov 6, 2010

Here's the context of the problem, in which I will try to include as much information as possible while keeping the explanation brief.

I am trying to make a portfolio website (architectural design + concept art).  Flash / programing are not my focus and this is my first go at learning the software. Due to the nature of the content and my (lack) of ability in AS3, I want the the coding to be really simple and still let the site look good.  The way the site is currently structured:

1) Basic menu buttons that navigate to sections of the site (brings up a new page).

2) Example, clicking on <Graphics> takes you to a new page and a sub-menu animates in (simple motion tween for the buttons to cascade down).  This animation is a movie clip placed on the main timeline.

3) On the screen is also a slideshow for all the images within <Graphics>.Instead of multiple small slideshows, I combined them all into one, so as to avoid complications with add / remove from stage.  There are prev / next buttons that keep images within their sub section (ie 1->2->3->1). The sub-menu buttons are suppose to link to the start of each sub section, much like chapters on a DVD.  (The slideshow is a movieclip sub-nested in the menu movieclip).

View 4 Replies

Actionscript 3 :: Access Of Undefined Property?

Mar 25, 2010

first of all I am completely new to AS3.I want to create a simple website, with 3 buttons.Once you click on the button, content should appear next to it. But i have trouble
programming even one button.Here is the script:

stop();
photography_btn.addEventListener(MouseEvent.CLICK, photoclick);
function photoclick(event:MouseEvent) {

[code]....

View 2 Replies

Actionscript 2.0 :: Access NAME Property Of A Frame In It?

Jun 18, 2010

I name frame 50 "_foo" (in the IDE)

I can trace this._currentframe at any time (and get a number)

I can gotoAndPlay("_foo");

But how can I find out if the current frame IS "_foo" as the movie plays?

View 1 Replies

ActionScript 3.0 :: Cannot Access Property Of A Null

Nov 19, 2009

Getting: TypeError: Error #1009: Cannot access a property or method of a null object reference. at CatProcess()

Don't know why. When I run it, it's the userName_iBox that isn't being added to the stage so it must be to do with that but I can't see whats wrong with it.[code]...

View 2 Replies

ActionScript 3.0 :: Cannot Access A Property Or Method

Aug 13, 2010

I've got on main timeline (on frame 10) buttons, when I click one of them it goes to its currentLabel"". On curerntLabel at frame20 "racerButton" where I've got some tweening. At currentLabel "boardButton" at frame30 I load external swf.The problem I've got is when I press any button everything works fine. But when I first press button "boardButton" at frame30 the ext.swf shows up fine, but when next I click the button"racerButton" at frame20 the tweening doesn't work there and it gives me error.[code]when I press any button everything works fine except from bordButton to racerButton

View 0 Replies

ActionScript 3.0 :: Access MC Property From Class?

Sep 17, 2010

I have one class which is assigned to dropBar MC:

ActionScript Code:
import src.DropDown;
var inheritanceDrop:DropDown = new DropDown(dropBar, 1);

[code].....

View 5 Replies

ActionScript 3.0 :: Access To An Undefined Key Property?

Feb 4, 2011

i keep getting that error and cannot figure why. This is my code:

Code:
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;

[code].....

View 2 Replies

ActionScript 3.0 :: Access Of Undefined Property Name

Oct 28, 2011

I am working on a piece of code and I am getting bizar Access of undefined property name errors. I am posting my code below. About half way through the function, references to "name" become undefined.

Code:
private function getIcon(_name:String):int{
//5 is min length valid name can be y.xxx
if(_name == null || _name.length <5){

[code]....

In all the code past this method, all the variables and class names are showing as undefined.

View 4 Replies

1120 - Access Of Undefined Property?

Jun 8, 2010

So I'm quite to Flash, AS3, etc... And this is making me nuts I'm taking on creating this website but some of my buttons just continually get a "1120: Access of undefined property" error. These are very simple buttons (not movie clip buttons or anything fancy), and their use is to navigate from one section to another (no more no less), using Labels (not much of a surprise here either).

I'm not sure whether this is relevant but the button IS inside a movie clip called "jobPositions_mc", the instance name is "jobPositions".The button is a generic button that I reused for different job positions, each one with a different instance name. In this example, the button name is "JobsOpeningButton_btn" and the instance name is "jrSalesBtn"The label of the frame I want to go to by pressing the button is "jrSales"

The script I'm using is the following:

[Code]....

View 2 Replies

IDE :: Access Of Undefined Property _root?

Feb 26, 2008

I just started using CS3 and I'm having some trouble.

I am getting the following error: Access of undefined property _root

it refers to every instance in the code below where I use _root

The movieclip "pages" is looping even though there is a stop(); on each frame

import flash.events.MouseEvent;
weirdsville_button_over.addEventListener(MouseEven t.MOUSE_OVER, weirdsville_over);
function weirdsville_over(event:MouseEvent):void {
if (_root.pages.currentFrame != 2) {
weirdsville_button.gotoAndStop(2);

[Code]...

View 7 Replies

IDE :: Access Of Undefined Property TextFieldAutoSize

Mar 4, 2009

I have a class that will not run in Flash CS4
myLabel.autoSize = TextFieldAutoSize.CENTER
I have tried everything to get it to work, here is the code, I am running it from flash with a class called main, if i comment the culprit line it the rest of it works.
Error : 1120: Access of undefined property TextFieldAutoSize.

package {
import flash.display.Sprite;
import flash.text.TextField;
import flash.text.TextFieldType;
import flash.text.StyleSheet;
import flash.text.TextFormat;
[Code] ......

View 2 Replies

ActionScript 3.0 :: Access MC Property Inside The MC Itself?

May 6, 2009

I create a new Ball movieclip and sets the Uid property:

var ball_mc:Ball = new Ball();
ball_mc.uID = "1232435";
addChild(ball_mc);

From outside the movieclip i can access the property value by trace(ball_mc.uID);, but what if i what to reach the value inside the movieclip itself? trace(uID); or trace(ball_mc.uID); dosent seem to work.

View 3 Replies

ActionScript 3.0 :: Access Of Undefined Property?

Jan 25, 2010

im trying to define a number in my constructor function and use it in another method, ives me Access of undefined property destinationX on the last line here.[code]

View 2 Replies

ActionScript 3.0 :: Access Of Undefined Property

Dec 8, 2009

I'm new to Actionscript and am creating my first flash website for my degree. So far I've managed to get the home page to animate by tweening using actionscript. When the menu options are clicked I want the website to slide to different pages. So far I've tried just getting the background to move but get the error 1120: Access of undefined property. "background_img" is the instance name and if i use the code in the portfolio.as file i can tween it fine.[Code]...

View 9 Replies

ActionScript 3.0 :: Flash Cannot Access A Property

Jul 8, 2010

I am working in flash cs3 past 1 years i have small error in flash cs3 coding. I create external class file,

//
package {
import flash.display.MovieClip;

[Code]....

when i run this code i got the error message

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

View 4 Replies

ActionScript 3.0 :: 1120: Access Of Undefined Property

Mar 18, 2009

I have 4 movie clips on the stage named coil1_mc, coil2_mc ...I have this code on my actions layer

coil1_mc.gotoAndStop(2);
coil2_mc.gotoAndStop(2);
coil3_mc.gotoAndStop(2);
coil4_mc.gotoAndStop(2);

I keep getting this error below. Coil3 and 4 work just fine they dont error out. I'm really confused. I have attached my fla if you want to take a look yourself.1120: Access of undefined property coil1_mc.

View 1 Replies

ActionScript 2.0 :: Access An Object Property From A Different Frame?

Apr 25, 2009

how to access an object property from a different frame. This is my code:

Frame 1:
var HelloWorld:Object = new Object()
Frame 2:
Number = 5
HelloWorld["Planet"+Number] = function(){}
HelloWorld["Planet"+Number].Person = "John"

[Code].....

So how could I make it accessible from all frames? I've tried adding _global to the code on Frame 1 but it still wouldn't work...

View 2 Replies







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