TypeError: Error #1009 - (Null reference error) With Flash.
I am not an expert in flash, but i do work with AS and tweak Flash projects , though not having deep expertise in it. Currently i need to revamp a flash website done by one another guy, and the code base given to me, upon execution is throwing the following error.
"--- TypeError: Error #1009: Cannot access a property or method of a null object reference. at NewSite_fla::MainTimeline/__setProp_ContactOutP1_ContactOut_Contents_0() at NewSite_fla::MainTimeline/frame1() --"
The structure of the project is like, it has the different sections split into different movie clips. There is no single main timeline, but click actions on different areas of seperate movie clips will take them between one another. All the AS logic of event handling are written inline in FLA , no seperate Document class exists.
Preloader Movie clip is the first one getting loaded. As i understood the error is getting thrown initially itself, and it is not happening due to any Action script logic written inline, because it is throwing error even before hitting the first inline AS code.
I am not able to figure Out what exactly it causing the problem, or where to resolve it. I setup the stuff online, for reference if anybody want to take a look at it, and here is the link.You need to have flash debugger turned ON in your browser, if need to see the exception getting triggered.
http://tinyurl.com/2alvlfx
I really got stuck at this point. Any help will be great.I had not seen the particular solution i am looking for anywhere yet, though Error #1009 is common.
Thanks, for putting effort in helping me. I debugged the movie.The line of code being shown is this >>
if(__setPropDict[ContactOutP1]== undefined || ! ((int(__setPropDict[ContactOutP1]) >= 1 && int(__setPropDict[ContactOutP1]) <=5))){
__setPropDict[ContactOutP1] = currentFrame;
__setProp_ContactOutP1_ContactOut_Contents_0();
And i think this third line of code is where the exception is being thrown. But as i understood, this code is not written by the developer. I had nto seen this code, anywhere in the actions. Hopefully this will give you hint about what is exactly causing the issue and what can be done to resolve it.
Similar Messages
-
Error#1009. Actionscript error in Flash Game I'm making...
Hi,
I'm making a Flash game and rather than putting all the AS3 on a seperate .as file, I'm throwing it on the timeline, which may or may not be a mistake since this game is getting really big, really fast and messy.
And so I'm getting this error when I test:
TypeError: Error #1009: Cannot access a property or method of a null object reference at GameBeta_MainTimeline_fla::MainTimeline/frame1()
From what I've read on this error, it refers to something that isn't instantiated yet, like something that's out of order? Like I'm referring to something that doesn't exist at the point in time that I'm referring to it? So I'm looking at my AS3 and have NO idea. Here is what I have written:
stop();
//TITLE PAGE
play_game.addEventListener(MouseEvent.CLICK, startgame)
function startgame(evt:MouseEvent):void
gotoAndStop("Name Input");
//Name and Gender input page
var userName:String;
inputField.addEventListener(Event.CHANGE, onInput)
function onInput(e:Event):void
outputField.text = "So your name is " + inputField.text + " are you sure?";
userName = inputField.text;
confirm_input.addEventListener(MouseEvent.CLICK, toCreationpg)
function toCreationpg(evt:MouseEvent):void
gotoAndStop("Fem Creation");
outputField.text = "So your name is "+ userName;
//Character Creation Page
readytostart.addEventListener(MouseEvent.CLICK, firstscene_plz)
function firstscene_plz(evt:MouseEvent):void
gotoAndStop("Day03");
outputField.text = "Let's make your character, "+ userName;
So, any ideas as to why I'm getting this error?
Before I had each page with it's own Actionscript and buttons inside their own movieclips on the timeline. That was getting confusing so I took everything out of the movieclips to place everything on one timeline and have one layer of Actionscript hoping to simplify things and find the problem easier. No luck. It's supposed to have a Title page and a button that goes to the 2nd page where you input your name, and while you type, it shows your name before you confirm by hitting another button that finally goes to the Character Creation page. When I test, I just get that Error#1009, it'll get to the 2nd page for the name input, but the text fields act wacky and the button to proceed isn't working. I'm hoping that when I find the source of this error, the rest will be fixed as well.
Thanks in advance for any advice offered! I'll greatly appreciate it.Yeah, that's what makes me even more confused. I have a seperate file where I'm testing the name input mechanics alone, just using this piece of actionscript, one input box with an instance inputField and a dynamic box outputField, a button, instance enter_name, that confirms and repeats the input on the next page. And it works.
inputField.addEventListener(Event.CHANGE, onInput)
var userName:String;
function onInput(e:Event):void
outputField.text = "You typed " + inputField.text;
userName = inputField.text;
enter_name.addEventListener(MouseEvent.CLICK, onClick)
function onClick(evt:MouseEvent):void
gotoAndStop("frame two");
outputField.text = "So your name is "+ userName;
So I don't get the error with that seperate file so could it be that other things are conflicting with this? Perhaps the order in which I've written my actionscript or the way I've organized my frames? In my other file, it says it's the inputField Event Listener but it'll work when I take out all the other frames and script... -
Error using Acrobat portfolio SDK with Flash Builder
Hi all
I've been trying to customize a navigator portfolio for Adobe Acrobat X using Flash Builder 4.5. I was running this proyect as Navigator but I received the following Flash Player error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at acrobat.navhost.app::SingleNavApp/set productConfig()[C:\dev\A10_1R1_Sandbox\Acrobat\Viewer\AcroView\Portfolio\Flash\Libs\NavHo stUtil\src\acrobat\navhost\app\SingleNavApp.as:333]
at com.adobe.app::AppPrefsBinding/productConfig()[C:\dev\A10_1R1_Sandbox\Acrobat\Viewer\Acro View\Portfolio\Flash\Libs\NavPreviewShared\src\com\adobe\app\AppPrefsBinding.as:93]
at com.adobe.app::AppPrefsBinding/refresh()[C:\dev\A10_1R1_Sandbox\Acrobat\Viewer\AcroView\P ortfolio\Flash\Libs\NavPreviewShared\src\com\adobe\app\AppPrefsBinding.as:76]
at Function/<anonymous>()[E:\dev\4.x\frameworks\projects\framework\src\mx\binding\utils\Bind ingUtils.as:180]
at mx.binding.utils::ChangeWatcher/wrapHandler()[E:\dev\4.x\frameworks\projects\framework\sr c\mx\binding\utils\ChangeWatcher.as:557]
at flash.events::EventDispatcher/dispatchEventFunction()
I've installed Acrobat portfolio SDK into Flash Builder and I have followed the documentation of Building a Navigator from http://learning.adobe.comOk, finally got this working. Many hidden gotchas.
1. You have to make a Trust File for your custom panel. This is actually in the SDK, around page 53, so my bad -- but the problem is that there is no feedback from the Adobe application if you don't have this. The application just hangs. It should produce an error message "can't find trust file, etc.". This should not be that hard to implement.
2. The latest Flex SDK does not seem to work in Bridge CC or other similar applications. You have to use Flex SDK 3.x, apparently, and this is NOT in the documentation. Not only should you set the default SDK in Flex Builder to 3.x (I'm using 3.6) but you have to edit the build.properties file to make sure it's pointing to the correct folder, eg: C:/Program Files/Adobe/Adobe Flash Builder 4.7 (64 Bit)/sdks/3.6.0. Fortunately Flash Builder 4.7 comes with 3.6 installed. If you have an older version, it's likely to be completely different.
More info in this thread: http://forums.adobe.com/thread/1114153. -
Hi,
The old Active Directory accounts of my server were removed, those accounts are used by some of the SharePoint sites. A new AD account was created and when I try to replace the old accounts with new I am facing issue. I am also unable to create new web application,
service application from my Central Administration. I also tried by restoring old accounts but still I am facing same issues, I
am getting the error message Object
reference not set to an instance of an object. for any create activities in Central Administration.
Thanks in Advance for your helpThanks for the reply. When I am trying to update service account of services also I am getting error
message Object
reference not set to an instance of an object. i.e., while selecting component(web/service application from drop down) redirecting to error page -
IE8 Error when opening Pop-up with Flash Content
I am running into a problem creating a webpage. I am very new to AS3 and not quite a novice at Dw CS3. I have audio files and flash content that is downloadable from my page. The audio is made available by clicking on a flash button that links to an mp3 or wav file. The player then opens and plays the file. I also created some flash animations that are accessed by flash buttons I also created and put on my webpage. I added scripting (AS3) for those buttons that defines a pop-up window size and points to an html page to put into the pop-up window. I'm really not sure if this script is the most efficient. It probably isn't. The script is below: (Note: I could not paste it in so I retyped it. Don't know why, but the script works even though there might be syntax errors below.)
//define variable "jscommand" that has URL to open and pop-up window parameters
var jscommand:String="window.open('Multiplication.html,'miniwindow','height=440,width=605,toolbar=yes,scrollbar=no');";
//define variable "openflashURL" which runs "jscommand"
var openflashURL:URLRequest("javascript"+jscommand+"void(0);");
//define function "openflashdown" that initiates URL request
function openflashdown(Event:MouseEvent):void{
NavigateToURL(openflashURL,"_self"};
//define button listener
Mult_FlashPlayer_btn.addEventListener(MouseEvent.CLICK,openflashdown);
The problem is as follows: When I click on the flash buttons that use the above script, I get a pop-up window with the .swf in it and everything runs fine. Next, when I click on an audio button, the mp3 file downloads and the player (Real) begins to play it. But if I try to open up the flash animation again I get this error message from IE8 "Unspecified Error Internet Explorer cannot download".
I tried to find anwsers on-line and I found another person with a similar problem. Their solution was to take the javascript code out of the flash button coding and put it in the html page directly. I took the first line on code in the above and put it in the html code. Dw did not recognize it as code but as text. I don't know where to go from here. Does anyone know what to do? I'm a beginner so please be as clear as you can be.Try uninstalling your sound card driver in Device Manager and reboot your PC.
-
Getting a syntax error from mx.transitions.Tween with flash CS4
Hello all!
I am getting an import error with the following libraries:
import mx.transitions.Tween;
import mx.transitions.easing.*;
The errors are like this one:
Definition fl.transitions:Tween could not be found
I am using it as part of my .fla where for sorme reason it does not work but it works fine in the original archive. I guess it is a problem with the action script version becouse the original template use as2 and I am using as3.
Does anyone know which are the equivalent libraries in as3???
May I import does libraries directly in as3?
Thanks in advance for your helpin as3, you should use:
import fl.transitions.Tween;
import fl.transitions.easing.*;
NOT
import mx.transitions.Tween;
import mx.transitions.easing.*;
(see the difference?) -
Emulator Threading Issue: Null Reference Exception with CloudQueue.CreatIfNotExists
I am using Azure 2.2 SDK and Storage library (2.1.0.1).
var queueClient = CloudStorageAccount.DevelopmentStorageAccount.CreateCloudQueueClient();
var queue = queueClient.GetQueueReference("etsuttest");
for (int index = 0; index < 2; ++index)
Task.Factory.StartNew(() => GetCommand(queueClient));
GetCommand(queueClient);
private void GetCommand(CloudQueueClient queueClient)
int counter = 0;
var queue = queueClient.GetQueueReference("test");
while true)
queue.CreateIfNotExists();
// Dequeue code..
Thread.Sleep(1000);
The exception:
Microsoft.WindowsAzure.Storage.StorageException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.
Result StackTrace:
at Microsoft.WindowsAzure.Storage.Shared.Protocol.HttpResponseParsers.ProcessExpectedStatusCodeNoException[T](HttpStatusCode[] expectedStatusCodes, HttpStatusCode actualStatusCode, T retVal, StorageCommandBase`1 cmd, Exception ex)
at Microsoft.WindowsAzure.Storage.Queue.CloudQueue.<CreateQueueImpl>b__14(RESTCommand`1 cmd, HttpWebResponse resp, Exception ex, OperationContext ctx)
at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](StorageCommandBase`1 cmd, IRetryPolicy policy, OperationContext operationContext)
--- End of inner exception stack trace ---
at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](StorageCommandBase`1 cmd, IRetryPolicy policy, OperationContext operationContext)
at Microsoft.WindowsAzure.Storage.Queue.CloudQueue.Create(QueueRequestOptions options, OperationContext operationContext)
at Microsoft.WindowsAzure.Storage.Queue.CloudQueue.CreateIfNotExists(QueueRequestOptions options, OperationContext operationContext)
at GetCommand(CloudQueueClient queueClient) inThank you for reporting this and we apologize for the inconvenience. We will fix this issue in an upcoming release.
-
TypeError: Error #1009: from Label.as:1266
I'm building an application that has 3-4 level deep navigation and I'm using a 'stack' of view states to navigate to user requested screen.
I recently changed the navigation by bringing a screen that was 4-level deep to higher-level and now when I try to navigate to this screen, I get this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at spark.components::Label/truncateText()[E:\dev\4.x\frameworks\projects\spark\src\spark\com ponents\Label.as:1266]
at spark.components::Label/http://www.adobe.com/2006/flex/mx/internal::composeTextLines()[E:\dev\4.x\frameworks\proje cts\spark\src\spark\components\Label.as:485]
at spark.components.supportClasses::TextBase/updateDisplayList()[E:\dev\4.x\frameworks\proje cts\spark\src\spark\components\supportClasses\TextBase.as:684]
at mx.core::UIComponent/validateDisplayList()[E:\dev\4.x\frameworks\projects\framework\src\m x\core\UIComponent.as:8709]
at mx.managers::LayoutManager/validateClient()[E:\dev\4.x\frameworks\projects\framework\src\ mx\managers\LayoutManager.as:932]
at mx.core::UIComponent/validateNow()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\U IComponent.as:7792]
at spark.components::DataGroup/initializeTypicalItem()[E:\dev\4.x\frameworks\projects\spark\ src\spark\components\DataGroup.as:291]
at spark.components::DataGroup/ensureTypicalLayoutElement()[E:\dev\4.x\frameworks\projects\s park\src\spark\components\DataGroup.as:346]
at spark.components::DataGroup/startVirtualLayout()[E:\dev\4.x\frameworks\projects\spark\src \spark\components\DataGroup.as:1183]
at spark.components::DataGroup/updateDisplayList()[E:\dev\4.x\frameworks\projects\spark\src\ spark\components\DataGroup.as:1313]
at mx.core::UIComponent/validateDisplayList()[E:\dev\4.x\frameworks\projects\framework\src\m x\core\UIComponent.as:8709]
at mx.managers::LayoutManager/validateDisplayList()[E:\dev\4.x\frameworks\projects\framework \src\mx\managers\LayoutManager.as:663]
at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.x\frameworks\projects\framewo rk\src\mx\managers\LayoutManager.as:736]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.x\frameworks\projects \framework\src\mx\managers\LayoutManager.as:1072]
Sadly, the error doesn't point to any part of my code and so I'm at a loss. I've spent quite a bit of time looking at different part of my code but haven't been able to solve this issue.
Any suggestions on what I should look for or direction I should take to identify issue in my code?
Thanks a lot!
DilipIt's hard to know what exactly is going on without some code to look over. What exact version (including build number) of the Flex SDK are you using? You can find this is the root directory of the Flex SDK, in the flex-sdk-description.xml file.
For Example
<name>Flex Hero</name>
<version>4.5.0</version>
<build>17855</build>
A null reference error happens when you try to access a property on a reference that is null.
For example
var foo:Object;
trace(foo.bar);
In this case foo hasn't been initialized, and is therefore null.
Cheers,
Nate Beck -
Could you please help me about error 1009?
I can not update or dawnload anything even free programs what should I do with this error??????? Please help me
Where are you located? Error 1009 is usually associated with a blocked country where Apple is prohibited by law from selling software. It could also be a problem with some proxy settings in your network.
-
Access via NULL reference object not possible
Hi friends,
I have created an wda application which uses the table popin to display data.
So that i have created a view with two of the fields as link to action UI element.
In the Events/Actions of the link to action element i implemented the following logic.
data wd_table_cell_editor type ref to cl_Wd_view_element.
data wd_table_column type ref to cl_wd_table_column.
data wd_popin type ref to cl_wd_table_popin.
data id type string.
<b> wd_table_cell_editor ?= wd_this->m_view->get_element( id ).</b>
wd_table_column ?= wd_table_cell_editor->get__parent( ).
wd_popin = wd_table_column->get_popin( ).
context_element->set_attribute( name = 'SELECTED_POPIN' value =
wd_popin->id ).
So when i click on the link to action in the table column of the field am getting the following error
<b>Access via NULL reference object not possible.</b>
While debugging i have noticed that this error was coming at the below step of the code.
<b>wd_table_cell_editor ?= wd_this->m_view->get_element( id )</b>
in the m_view->get_element( id ) does not contan any value , its showing as table , as null value cannnot be assigned may be its throwing the above error.
But i didnt understand why the view is not getting UI element id ....
Can one please suggest me where might be the wrong....
Regards
Sireesha.Hi nithya,
Could you please calrify the doubts for the following q's.
1. As u said in the above post, i have changed the code to the below.
data: lr_table type ref to cl_wd_table,
lr_table_col type ref to cl_wd_table_column.
lr_table ?= wd_this->m_view->get_element( 'TABLE' ).
lr_table_col = lr_table->get_column( ID = 'TABLE_CONNECTID' ).
<b>wd_popin = lr_table_col->get_popin( ).</b>
(At the above step which is in bold , eventhough there is value in lr_table_col->get_popin , its not assigning a value to the wd_popin, throwing same error NULL etc.,)
context_element->set_attribute( name = 'SELECTED_POPIN' value =
wd_popin->id ).
2. Before changing the code suggested by u, the follwoing was the code from standard example.Its working fine in the application wdr_test_table.I have debugged the code.The value is getting assigned into wd_table_cell_editor.
The same thing i have done but its failing to assign the value. thats y its throwing null reference error. Here i have a confusion how its assigning a value and y not in the z application.am giving the code below which is in standard and my application.Please clarify these.
data wd_table_cell_editor type ref to cl_Wd_view_element.
data wd_table_column type ref to cl_wd_table_column.
data wd_popin type ref to cl_wd_table_popin.
<b>wd_table_cell_editor ?= wd_this->m_view->get_element( id ).</b>
( Note : wd_this->m_view->get_element contains value but not assigning it to the wd_table_cell_editor and same code in the standard behaving correctly like assigning the view value to the cell editor. Y this behavior, please advice me)
wd_table_column ?= wd_table_cell_editor->get__parent( ).
wd_popin = wd_table_column->get_popin( ).
context_element->set_attribute( name = 'SELECTED_POPIN' value = wd_popin->id )
Regards
Sireesha. -
Hi all,
I am new to ActionScript and Flash, and I am getting this error: TypeError: Error #1009: Cannot access a property or method of a null object reference.
at jessicaclucas_fla::MainTimeline/stopResumescroll()
I have several different clips in one movie that have scrolling content. When I click a button to move to a different clip that doesn’t have a certain scroll, it gives me this error. I cannot figure out how to fix this. You can see the site I am working on: http://www.jessicaclucas.com. I would really appreciate some help! Thank you in advance. Here is the code:
//Import TweenMax and the plugin for the blur filter
import gs.TweenMax;
import gs.plugins.BlurFilterPlugin;
//Save the content’s and mask’s height.
//Assign your own content height here!!
var RESUMECONTENT_HEIGHT:Number = 1500;
var RESUME_HEIGHT:Number = 450;
//We want to know what was the previous y coordinate of the content (for the animation)
var oldResumeY:Number = myResumecontent.y;
//Position the content on the top left corner of the mask
myResumecontent.x = myResume.x;
myResumecontent.y = myResume.y;
//Set the mask to our content
myResumecontent.mask = myResume;
//Create a rectangle that will act as the Resumebounds to the scrollMC.
//This way the scrollMC can only be dragged along the line.
var Resumebounds:Rectangle = new Rectangle(resumescrollMC.x,resumescrollMC.y,0,450);
//We want to know when the user is Resumescrolling
var Resumescrolling:Boolean = false;
//Listen when the user is holding the mouse down on the scrollMC
resumescrollMC.addEventListener(MouseEvent.MOUSE_DOWN, startResumescroll);
//Listen when the user releases the mouse button
stage.addEventListener(MouseEvent.MOUSE_UP, stopResumescroll);
//This function is called when the user is dragging the scrollMC
function startResumescroll(e:Event):void {
//Set Resumescrolling to true
Resumescrolling = true;
//Start dragging the scrollMC
resumescrollMC.startDrag(false,Resumebounds);
//This function is called when the user stops dragging the scrollMC
function stopResumescroll(e:Event):void {
//Set Resumescrolling to false
Resumescrolling = false;
//Stop the drag
resumescrollMC.stopDrag();
//Add ENTER_FRAME to animate the scroll
addEventListener(Event.ENTER_FRAME, enterResumeHandler);
//This function is called in each frame
function enterResumeHandler(e:Event):void {
//Check if we are Resumescrolling
if (Resumescrolling == true) {
//Calculate the distance how far the scrollMC is from the top
var distance:Number = Math.round(resumescrollMC.y - Resumebounds.y);
//Calculate the percentage of the distance from the line height.
//So when the scrollMC is on top, percentage is 0 and when its
//at the bottom the percentage is 1.
var percentage:Number = distance / RESUME_HEIGHT;
//Save the old y coordinate
oldResumeY = myResumecontent.y;
//Calculate a new y target coordinate for the content.
//We subtract the mask’s height from the contentHeight.
//Otherwise the content would move too far up when we scroll down.
//Remove the subraction to see for yourself!
var targetY:Number = -((RESUMECONTENT_HEIGHT - RESUME_HEIGHT) * percentage) + myResume.y;
//We only want to animate the scroll if the old y is different from the new y.
//In our movie we animate the scroll if the difference is bigger than 5 pixels.
if (Math.abs(oldResumeY - targetY) > 5) {
//Tween the content to the new location.
//Call the function ResumetweenFinished() when the tween is complete.
TweenMax.to(myResumecontent, 0.3, {y: targetY, blurFilter:{blurX:22, blurY:22}, onComplete: ResumetweenFinished});
//This function is called when the tween is finished
function ResumetweenFinished():void {
//Tween the content back to “normal” (= remove blur)
TweenMax.to(myResumecontent, 0.3, {blurFilter:{blurX:0, blurY:0}});Hi again,
Thank you for helping. I really appreciate it! Would it be easier to say, if resumescrollMC exists, then execute these functions? I was not able to figure out the null statement from your post. Here is what I am trying (though I am not sure it is possible). I declared the var resumescrollMC, and then I tried to put pretty much the entire code into an if (resumescrollMC == true) since this code only needs to be completed when resumescrollMC is on the stage. It is not working the way I have tried, but I am assuming I am setting up the code incorrectly. Or, an if statement is not supposed to be issued to an object:
//Import TweenMax and the plugin for the blur filter
import gs.TweenMax2;
import gs.plugins.BlurFilterPlugin2;
//Save the content's and mask's height.
//Assign your own content height here!!
var RESUMECONTENT_HEIGHT:Number = 1500;
var RESUME_HEIGHT:Number = 450;
var resumescrollMC:MovieClip;
if (resumescrollMC == true) {
//We want to know what was the previous y coordinate of the content (for the animation)
var oldResumeY:Number = myResumecontent.y;
//Position the content on the top left corner of the mask
myResumecontent.x = myResume.x;
myResumecontent.y = myResume.y;
//Set the mask to our content
myResumecontent.mask = myResume;
//Create a rectangle that will act as the Resumebounds to the scrollMC.
//This way the scrollMC can only be dragged along the line.
var Resumebounds:Rectangle = new Rectangle(resumescrollMC.x,resumescrollMC.y,0,450);
//We want to know when the user is Resumescrolling
var Resumescrolling:Boolean = false;
//Listen when the user is holding the mouse down on the scrollMC
resumescrollMC.addEventListener(MouseEvent.MOUSE_DOWN, startResumescroll);
//Listen when the user releases the mouse button
stage.addEventListener(MouseEvent.MOUSE_UP, stopResumescroll);
//This function is called when the user is dragging the scrollMC
function startResumescroll(e:Event):void {
//Set Resumescrolling to true
Resumescrolling = true;
//Start dragging the scrollMC
resumescrollMC.startDrag(false,Resumebounds);
//This function is called when the user stops dragging the scrollMC
function stopResumescroll(e:Event):void {
//Set Resumescrolling to false
Resumescrolling = false;
//Stop the drag
resumescrollMC.stopDrag();
//Add ENTER_FRAME to animate the scroll
addEventListener(Event.ENTER_FRAME, enterResumeHandler);
//This function is called in each frame
function enterResumeHandler(e:Event):void {
//Check if we are Resumescrolling
if (Resumescrolling == true) {
//Calculate the distance how far the scrollMC is from the top
var distance:Number = Math.round(resumescrollMC.y - Resumebounds.y);
//Calculate the percentage of the distance from the line height.
//So when the scrollMC is on top, percentage is 0 and when its
//at the bottom the percentage is 1.
var percentage:Number = distance / RESUME_HEIGHT;
//Save the old y coordinate
oldResumeY = myResumecontent.y;
//Calculate a new y target coordinate for the content.
//We subtract the mask's height from the contentHeight.
//Otherwise the content would move too far up when we scroll down.
//Remove the subraction to see for yourself!
var targetY:Number = -((RESUMECONTENT_HEIGHT - RESUME_HEIGHT) * percentage) + myResume.y;
//We only want to animate the scroll if the old y is different from the new y.
//In our movie we animate the scroll if the difference is bigger than 5 pixels.
if (Math.abs(oldResumeY - targetY) > 5) {
//Tween the content to the new location.
//Call the function ResumetweenFinished() when the tween is complete.
TweenMax.to(myResumecontent, 0.3, {y: targetY, blurFilter:{blurX:22, blurY:22}, onComplete: ResumetweenFinished});
//This function is called when the tween is finished
function ResumetweenFinished():void {
//Tween the content back to "normal" (= remove blur)
TweenMax.to(myResumecontent, 0.3, {blurFilter:{blurX:0, blurY:0}}); -
Dear Sir,
I really need your valuable assistance i was about to finish a project but at very last moment i am stuck. Here is the explanation below...
I have two files called "holder.swf" and "slide.swf" i want to improt the "slide.swf" using this action below
var myLoader:Loader = new Loader();
var url:URLRequest = new URLRequest("slide.swf");
myLoader.load(url);
addChild(myLoader);
myLoader.x = 2;
myLoader.y = 2;
Also i have attached the flash file of "holder.swf". My concern is the moment i am calling the "slide.swf" inside the "holder.swf" it is showing the following error...
" TypeError: Error #1009: Cannot access a property or method of a null object reference.
at FC_Home_Ads_Holder_v2_fla::MainTimeline() "
Here are the files uploaded for your reference, please download this file http://www.touchpixl.com/ForumsAdobecom.zip
This error is being occured from "MainTimeline.as" file here is the code been use inside of this file below....
package FC_Home_Ads_Holder_v2_fla
import __AS3__.vec.*;
import adobe.utils.*;
import com.danehansen.*;
import com.greensock.*;
import com.greensock.easing.*;
import com.greensock.plugins.*;
import flash.accessibility.*;
import flash.desktop.*;
import flash.display.*;
import flash.errors.*;
import flash.events.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.globalization.*;
import flash.media.*;
import flash.net.*;
import flash.net.drm.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.sensors.*;
import flash.system.*;
import flash.text.*;
import flash.text.engine.*;
import flash.text.ime.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends flash.display.MovieClip
public function MainTimeline()
new Vector.<String>(6)[0] = "Productivity";
new Vector.<String>(6)[1] = "Leadership";
new Vector.<String>(6)[2] = "Execution";
new Vector.<String>(6)[3] = "Education";
new Vector.<String>(6)[4] = "Speed of Trust";
new Vector.<String>(6)[5] = "Sales";
super();
addFrameScript(0, this.frame1);
return;
public function init():void
var loc1:*=null;
com.greensock.plugins.TweenPlugin.activate([com.greensock.plugins.Aut oAlphaPlugin]);
loc1 = new flash.net.URLLoader(new flash.net.URLRequest(this.XML_LOC));
var loc2:*;
this.next_mc.buttonMode = loc2 = true;
this.prev_mc.buttonMode = loc2;
stage.scaleMode = flash.display.StageScaleMode.NO_SCALE;
stage.align = flash.display.StageAlign.TOP_LEFT;
loc1.addEventListener(flash.events.Event.COMPLETE, this.xmlLoaded, false, 0, true);
this.prev_mc.addEventListener(flash.events.MouseEvent.CLICK, this.minusClick, false, 0, true);
this.next_mc.addEventListener(flash.events.MouseEvent.CLICK, this.plusClick, false, 0, true);
return;
public function xmlLoaded(arg1:flash.events.Event):void
var loc1:*=null;
var loc2:*=0;
this.xmlData = new XML(arg1.target.data);
loc2 = 0;
while (loc2 < this.LABELS.length)
loc1 = new Btn(this.LABELS[loc2], loc2);
this.btnHolder_mc.addChild(loc1);
this.BTNS.push(loc1);
trace(this.LABELS[loc2]);
++loc2;
this.current = uint(this.xmlData.@firstPick);
trace("-----width-----");
trace(this.contentMask.width);
var loc3:*=this.contentMask.width / this.LABELS.length;
trace(loc3);
loc2 = 0;
while (loc2 < this.BTNS.length)
this.BTNS[loc2].width = loc3;
this.BTNS[loc2].x = loc3 * loc2;
++loc2;
this.btnHolder_mc.addEventListener(flash.events.MouseEvent.CLICK, this.numClick, false, 0, true);
this.selectMovie();
return;
public function numClick(arg1:flash.events.MouseEvent):void
this.killTimer();
this.current = arg1.target.i;
this.selectMovie();
return;
public function killTimer():void
this.timerGoing = false;
if (this.timer)
this.timer.reset();
this.timer.addEventListener(flash.events.TimerEvent.TIMER, this.plusClick, false, 0, true);
this.timer = null;
return;
public function selectMovie():void
if (this.timerGoing)
this.timer = new flash.utils.Timer(uint(this.xmlData.ad[com.danehansen.MyMath.modulo(t his.current, this.xmlData.ad.length())].@delay), 1);
this.timer.start();
this.timer.addEventListener(flash.events.TimerEvent.TIMER, this.plusClick, false, 0, true);
while (this.holder_mc.numChildren > 0)
this.holder_mc.removeChild(this.holder_mc.getChildAt(0));
var loc1:*=new flash.display.Loader();
loc1.load(new flash.net.URLRequest(this.xmlData.ad[com.danehansen.MyMath.modulo(thi s.current, this.xmlData.ad.length())].@loc));
this.holder_mc.addChild(loc1);
var loc2:*=0;
while (loc2 < this.BTNS.length)
this.BTNS[loc2].deselect();
++loc2;
this.BTNS[com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length())].select();
var loc3:*=this.BTNS[com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length())].x + this.BTNS[com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length())].width / 2 + this.btnHolder_mc.x;
trace("addLength:" + this.xmlData.ad.length());
trace(loc3, com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length()));
com.greensock.TweenLite.to(this.indicator_mc, 0.3, {"x":loc3, "ease":com.greensock.easing.Cubic.easeOut});
loc1.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, this.adLoaded, false, 0, true);
return;
public function adLoaded(arg1:flash.events.Event):void
var evt:flash.events.Event;
var loc1:*;
evt = arg1;
try
evt.target.content.xmlData = this.xmlData.ad[com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length())];
catch (er:Error)
return;
public function minusClick(arg1:flash.events.MouseEvent):void
this.killTimer();
var loc1:*;
var loc2:*=((loc1 = this).current - 1);
loc1.current = loc2;
this.selectMovie();
return;
public function plusClick(arg1:flash.events.Event):void
if (arg1.type != "timer")
this.killTimer();
var loc1:*;
var loc2:*=((loc1 = this).current + 1);
loc1.current = loc2;
this.selectMovie();
trace("next");
return;
public function ENDED(arg1:flash.events.Event):void
if (arg1.type != "timer")
this.killTimer();
var loc1:*;
var loc2:*=((loc1 = this).current + 1);
loc1.current = loc2;
this.selectMovie();
trace("next");
return;
public function STARTED(arg1:flash.events.Event):void
this.killTimer();
return;
function frame1():*
this.timerGoing = true;
addEventListener("endNow", this.ENDED, false, 0, true);
addEventListener("startNow", this.STARTED, false, 0, true);
this.init();
return;
public const XML_LOC:String=stage.loaderInfo.parameters.xmlLoc ? stage.loaderInfo.parameters.xmlLoc : "home_ads.xml";
public const LABELS:__AS3__.vec.Vector.<String>=new Vector.<String>(6);
public const BTNS:__AS3__.vec.Vector.<Btn>=new Vector.<Btn>();
public const TRANSITION_TIME:Number=0.2;
public var contentMask:flash.display.MovieClip;
public var btnHolder_mc:flash.display.MovieClip;
public var holder_mc:flash.display.MovieClip;
public var indicator_mc:flash.display.MovieClip;
public var prev_mc:flash.display.MovieClip;
public var next_mc:flash.display.MovieClip;
public var current:int;
public var xmlData:XML;
public var timer:flash.utils.Timer;
public var timerGoing:Boolean;
Here is the folder uploaded on the server for you to get clear picture, please click on this link to download the entire folder. http://www.touchpixl.com/ForumsAdobecom.zip
I am not being able to resolve the issue, it needs a master to get the proper solution. I would request you to help me.
Thanks & Regards
Sanjib DasHere is the entire code of MainTimeline.as below, please correct it.
package FC_Home_Ads_Holder_v2_fla
import __AS3__.vec.*;
import adobe.utils.*;
import com.danehansen.*;
import com.greensock.*;
import com.greensock.easing.*;
import com.greensock.plugins.*;
import flash.accessibility.*;
import flash.desktop.*;
import flash.display.*;
import flash.errors.*;
import flash.events.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.globalization.*;
import flash.media.*;
import flash.net.*;
import flash.net.drm.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.sensors.*;
import flash.system.*;
import flash.text.*;
import flash.text.engine.*;
import flash.text.ime.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends flash.display.MovieClip
public function MainTimeline()
new Vector.<String>(6)[0] = "Productivity";
new Vector.<String>(6)[1] = "Leadership";
new Vector.<String>(6)[2] = "Execution";
new Vector.<String>(6)[3] = "Education";
new Vector.<String>(6)[4] = "Speed of Trust";
new Vector.<String>(6)[5] = "Sales";
super();
addFrameScript(0, this.frame1);
return;
public function init():void
var loc1:*=null;
com.greensock.plugins.TweenPlugin.activate([com.greensock.plugins.AutoAlphaPlugin]);
loc1 = new flash.net.URLLoader(new flash.net.URLRequest(this.XML_LOC));
var loc2:*;
this.next_mc.buttonMode = loc2 = true;
this.prev_mc.buttonMode = loc2 = true;
stage.scaleMode = flash.display.StageScaleMode.NO_SCALE;
stage.align = flash.display.StageAlign.TOP_LEFT;
loc1.addEventListener(flash.events.Event.COMPLETE, this.xmlLoaded, false, 0, true);
this.prev_mc.addEventListener(flash.events.MouseEvent.CLICK, this.minusClick, false, 0, true);
this.next_mc.addEventListener(flash.events.MouseEvent.CLICK, this.plusClick, false, 0, true);
return;
public function xmlLoaded(arg1:flash.events.Event):void
var loc1:*=null;
var loc2:*=0;
this.xmlData = new XML(arg1.target.data);
loc2 = 0;
while (loc2 < this.LABELS.length)
loc1 = new Btn(this.LABELS[loc2], loc2);
this.btnHolder_mc.addChild(loc1);
this.BTNS.push(loc1);
trace(this.LABELS[loc2]);
++loc2;
this.current = uint(this.xmlData.@firstPick);
trace("-----width-----");
trace(this.contentMask.width);
var loc3:*=this.contentMask.width / this.LABELS.length;
trace(loc3);
loc2 = 0;
while (loc2 < this.BTNS.length)
this.BTNS[loc2].width = loc3;
this.BTNS[loc2].x = loc3 * loc2;
++loc2;
this.btnHolder_mc.addEventListener(flash.events.MouseEvent.CLICK, this.numClick, false, 0, true);
this.selectMovie();
return;
public function numClick(arg1:flash.events.MouseEvent):void
this.killTimer();
this.current = arg1.target.i;
this.selectMovie();
return;
public function killTimer():void
this.timerGoing = false;
if (this.timer)
this.timer.reset();
this.timer.addEventListener(flash.events.TimerEvent.TIMER, this.plusClick, false, 0, true);
this.timer = null;
return;
public function selectMovie():void
if (this.timerGoing)
this.timer = new flash.utils.Timer(uint(this.xmlData.ad[com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length())].@delay), 1);
this.timer.start();
this.timer.addEventListener(flash.events.TimerEvent.TIMER, this.plusClick, false, 0, true);
while (this.holder_mc.numChildren > 0)
this.holder_mc.removeChild(this.holder_mc.getChildAt(0));
var loc1:*=new flash.display.Loader();
loc1.load(new flash.net.URLRequest(this.xmlData.ad[com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length())].@loc));
this.holder_mc.addChild(loc1);
var loc2:*=0;
while (loc2 < this.BTNS.length)
this.BTNS[loc2].deselect();
++loc2;
this.BTNS[com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length())].select();
var loc3:*=this.BTNS[com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length())].x + this.BTNS[com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length())].width / 2 + this.btnHolder_mc.x;
trace("addLength:" + this.xmlData.ad.length());
trace(loc3, com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length()));
com.greensock.TweenLite.to(this.indicator_mc, 0.3, {"x":loc3, "ease":com.greensock.easing.Cubic.easeOut});
loc1.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, this.adLoaded, false, 0, true);
return;
public function adLoaded(arg1:flash.events.Event):void
var evt:flash.events.Event;
var loc1:*;
evt = arg1;
try
evt.target.content.xmlData = this.xmlData.ad[com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length())];
catch (er:Error)
return;
public function minusClick(arg1:flash.events.MouseEvent):void
this.killTimer();
var loc1:*;
var loc2:*=((loc1 = this).current - 1);
loc1.current = loc2;
this.selectMovie();
return;
public function plusClick(arg1:flash.events.Event):void
if (arg1.type != "timer")
this.killTimer();
var loc1:*;
var loc2:*=((loc1 = this).current + 1);
loc1.current = loc2;
this.selectMovie();
trace("next");
return;
public function ENDED(arg1:flash.events.Event):void
if (arg1.type != "timer")
this.killTimer();
var loc1:*;
var loc2:*=((loc1 = this).current + 1);
loc1.current = loc2;
this.selectMovie();
trace("next");
return;
public function STARTED(arg1:flash.events.Event):void
this.killTimer();
return;
function frame1():*
this.timerGoing = true;
addEventListener("endNow", this.ENDED, false, 0, true);
addEventListener("startNow", this.STARTED, false, 0, true);
this.init();
return;
public const XML_LOC:String=stage.loaderInfo.parameters.xmlLoc ? stage.loaderInfo.parameters.xmlLoc : "home_ads.xml";
public const LABELS:__AS3__.vec.Vector.<String>=new Vector.<String>(6);
public const BTNS:__AS3__.vec.Vector.<Btn>=new Vector.<Btn>();
public const TRANSITION_TIME:Number=0.2;
public var contentMask:flash.display.MovieClip;
public var btnHolder_mc:flash.display.MovieClip;
public var holder_mc:flash.display.MovieClip;
public var indicator_mc:flash.display.MovieClip;
public var prev_mc:flash.display.MovieClip;
public var next_mc:flash.display.MovieClip;
public var current:int;
public var xmlData:XML;
public var timer:flash.utils.Timer;
public var timerGoing:Boolean; -
Can anyone throw any light on this obscure Flex error?...
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.controls::AdvancedDataGrid/findHeaderRenderer()[...path...\projects\datavisualisation\ src\mx\controls\AdvancedDataGrid.as:1350]
at mx.controls::AdvancedDataGrid/mouseEventToItemRenderer()[...path...\projects\datavisualis ation\src\mx\controls\AdvancedDataGrid.as:1315]
at mx.controls.listClasses::AdvancedListBase/mouseMoveHandler()[...path...\projects\datavisu alisation\src\mx\controls\listClasses\AdvancedListBase.as:8091]
I found a related bug reported on Jira: https://bugs.adobe.com/jira/browse/FLEXDMV-1631
But in our case, we have no zoom effect. It may be timing related, as there is a lot of computation going on when this page, and the ADG is first initialised.
Please?... Any suggestions or workarounds? We don't want this falling over in the hands of our customers.
<rant> And people wonder why I hate Flex!? These obscure instabilities never happen when I develop Pure ActionScript. The Flash platform is wonderfully stable. But as soon as you bring Flex into play, things take longer to develop, it's a struggle to extend or change the behaviour of the bloated components, and everything falls apart as these bugs begin to surface.</rant>facing the same problem... sdk 4.1. no solution for about 2 years ????
-
Hi, I’m doing a game for an assignment for college. Using Flash CS 5. I got this error
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at code::Game1()
When I tried to go to the next page, I thought I linked correctly. Can anyone help me? Thanks
you can find the coding here http://pastebin.com/iz8a6w6Zclick file>publish settings>swf and tick "permit debugging". retest.
the problematic line number will be in the error message. that will tell you which reference you're trying to use that is null. -
hello,
I am trying to load a menu as an external file .... and getting this : TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com::menu()
here is my code:
if(!menuLoader){
var menuRequest:URLRequest = new URLRequest("menu.swf");
var menuLoader:Loader = new Loader();
menuLoader.load(menuRequest);
container.addChild(menuLoader);
menuLoader.x = 700;
menuLoader.y = 50;
can anyone give me a helping hand?
thanks in advance.use:
here is my code:
if(menuLoader!=null){
var menuRequest:URLRequest = new URLRequest("menu.swf");
var menuLoader:Loader = new Loader();
menuLoader.load(menuRequest);
container.addChild(menuLoader);
menuLoader.x = 700;
menuLoader.y = 50;
Maybe you are looking for
-
My iPod was plugged into wall charger when an electrical burst came out the top of iPod! Has this happened to anyone else? Have scorch mark on top of iPod where the electrical current exited iPod!
-
I have been using GRAB to capture screen displays. It has just stopped working since the last OSX Upgrade. Can anyone, please help restore functionality?
-
Creative zen 20gb firmware frustrat
Good Morning,?I successfully purchased and successfully managed to get the creative zen mp3 player home but that's about where it has ended. Everytime I power up the device the "firmware problem" appears on the screen. I have downloaded the latest fi
-
Workforce Planning - Editing Existing Employee Data
Has anyone ever received the message "Unable to load the following resource: Members update failed" after trying to save a change in the "Edit Employee" form in Workforce planning? I have been receiving this message for any changes that are made. I c
-
Can I use my iphone4 to play music via USB in Mercedes Benz c class 2012
Hi I have an iPhone 4 and a Mercedes-Benz C Class 2012 , I can play music via Bluetooth but when I plug in my phone via USB it says the USB device is not recognised !. So can I change setting maybe to allow me to play via USB?