ActionScript 3.0 :: Getting Error On Window Resize While Second Frame Playing

Nov 28, 2011

The problem is that I'm getting an #1009 error when I resize while the second frame is playing. This is the code on the first frame:

Code:
stop();
import flash.events.*;
import flash.display.*;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
background1.x = 0;
background1.y = 0;
[Code] .....

And this is the error I get (the error is on the first frame, on the lines where "background1" and "b_enter" are written for the first time.
Code:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Website2_fla::MainTimeline/resizeBackground1()
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Website2_fla::MainTimeline/resizeEnter()

So the problems only appears when I'm on the second frame (Home), and only when I'm resizing the window (the border of the white frame stays visible from every bit of resizing, it won't disappear).

View 4 Replies


Similar Posts:


Flash - Error Playing A Frame For The Third Time?

Jun 30, 2011

I have a flash file where the first frame contains two buttons, one of which takes the user to the second frame, and the other takes them to the third frame. At each of those frames, various text fields and variables can be manipulated via SimpleButtons. Both Frame 2 and Frame 3 have "back" buttons to take them back to Frame 1.

Currently when the user navigates back to Frame 1 for the second time (thus playing it for a third time), my second button appears to no longer exist, and I receive an error. Both buttons on Frame 1 were placed via the Flash IDE. Why is my button popping out of existence, when it did perfectly fine the previous two times? Below is my code for Frame 1. The "back" buttons simple remove event listeners and then call gotoAndStop(1)

var inited:Boolean;
var cache:SharedObject;
var libsans:Font = new libsansreg();

[code]....

View 1 Replies

ActionScript 2.0 :: If Resize The Window Before The Swf Is Loaded - It Misaligns Until Resize

Jan 4, 2009

I have a main movie here that loads in an external swf through a container mc. everything is aligned and positioned to where it should be, and they are also set to that value onresize. the problem is, when my swf is loaded in, it works fine and is in the right position, same when you resize it. BUT, if you resize the window before the swf is loaded, it misaligns, until you resize!!

View 2 Replies

ActionScript 3.0 :: Resize Mess - Block The Window From Being Bigger Window

Mar 15, 2012

The problem is: i have a flash movie (*.swf) 1280w x 640h,, and & want to remove the resize function, i mean block the window from being bigger window. i actually set a noscale function that is working on content, but the problem is with the window..... my code for nonscale is now:

[Code]....

View 4 Replies

ActionScript 3.0 :: Creating Flash DVD - Put Video Window Playing Certain Amount Of Time Then Repeats Itself In Main Window?

Oct 20, 2011

I am preparing a presentation DVD... DVD will contain wmv video, user manual and another flash exe file... So DVD interface will contain three elements; user manual, a flash exe file and video.. Flash video window will be short-time video, playing like 5-10 seconds then repeats itself... My question is, how could I accomplish to put video window playing certain amount of time then repeats itself, in main window? I need as3 fla example, which could be so useful for me..

View 1 Replies

Flex :: Flex 3 Resize The Label And Text When Resize The Window?

May 11, 2010

i am creating flex 3 component when i re size the window i need to re size the labels and text.how to do this?

View 1 Replies

Resize Swf To Fit Browser Window Without Distortion?

Feb 12, 2010

I am trying to achieve the resizing effect as seen on [URL]There is no distortion no matter what direction the browser window is resized.

View 1 Replies

Make Swf Not Resize To Browser Window?

Jul 29, 2011

I'm trying to run my swf by going directly to it on my serer eg(www.example.com/mySWF.swf), later I will embed it using HTML or PHP, however Im wondering why it keeps getting resized to the window size, I want it to stay the size of the swf. In the publish settings I set dimension to Match Movie, and I set scale to No Scale in the HTML tab of publish settings, am I doing something wrong or can you not have it stay its original size without emedding it into html?

View 5 Replies

Flash :: Resize AIR App Window While Dragging?

Apr 2, 2010

So I've noticed Windows 7 has a disturbing tendency to prevent you from dragging the title bar of windows off the top of the screen. If you try - in this case, using an air app with a draggable area at the bottom of the window, allowing you to push the top of the window up past the screen - it just kicks the window back down far enough that the title bar is at the top of what it considers the 'visible area.'

One solution would be to resize the app window as it moves, so that the title bar is always where windows wants it. How would you resize the window while you're dragging it, though? Would you do it like this?

dragHitArea.addEventListener(MouseEvent.MOUSE_DOWN, function(e:MouseEvent):void{
stage.nativeWindow.height += 50;
stage.nativeWindow.startMove();
stage.nativeWindow.height -= 50;
});

see what's going on there? When I click, I'm doing startMove(), which is hooking into the OS' function for dragging a window around. I'm also increasing and decreasing the height of the window by 50 pixels - which should give me no net increase, right?

Wrong - the first '.height +=' gets executed, but the '.height -=' after the .startMove() never runs.

View 3 Replies

ActionScript 2.0 :: Control SWF Window Resize

Feb 19, 2009

Normally the user can resize the swf window when it is playing on flash player. I want to stop the user to resize it. It is possible when we use 'fscommand("allowscale", "false")'. I dont know why it is not working for me. Did i use the script wrongly or do I need to do anything in somewhere?

View 1 Replies

ActionScript 2.0 :: Resize Swf To Fit Any Browser Window?

Jul 29, 2009

I have been scouring the net for some answers on how to get a swf to automatically resize to fit all browser windows (resolutions)...

I found one javascript [url]... that is meant to do this, but I havent had any luck in getting it to work.

View 2 Replies

ActionScript 2.0 :: Disable Resize Of Window ?

Oct 26, 2003

the allow scale only disables scaling of the content..can we actually disallow scaling of the window that plays the projector file ?I want it at a fixed window of 800x600 projector...and set it to the centre...

View 3 Replies

ActionScript 2.0 :: Window Resize With Placed Scroller

Oct 28, 2007

What I've got is a fla with some window resize code in it, and another fla that is linked to from the window resize fla, so basically when the window is resized the loaded swf eases back to the center. This works fine if all the content of the loaded swf stays within the boundries of the swf... BUT... if I place a scroller in the loaded swf then when the window is resized the loaded swf moves upwards and to the right (Not in the center!!).

The fla for the window resize fla is here The fla for the loaded swf with scroller is here

View 3 Replies

ActionScript 2.0 :: Control SWF Window Resize?

Feb 19, 2009

Normally the user can resize the swf window when it is playing on flash player. I want to stop the user to resize it. It is possible when we use'fscommand("allowscale", "false")'. I dont know why it is not working for me. Did i use the script wrongly or do I need to do anything in somewhere

View 2 Replies

ActionScript 2.0 :: Disable Resize Of Window?

Oct 26, 2003

Well..the allow scale only disables scaling of the content..can we actually disallow scaling of the window that plays the projector file ?I want it at a fixed window of 800x600 projector...

View 5 Replies

CS3 Delay - Button To Play Frame 10 To 40 Then After Playing From Frame 10-40 The Movie Stops

Jul 3, 2010

how to code this on a button

onrelease
gotoandplay(10); // i need delay here before activating the next code below//
gotoandplay(80);

the trick is.. i want the button to play frame 10 to 40 then after playing from frame 10-40 the movie stops and then play frame 80 to 100

View 4 Replies

Actionscript 3 :: Stop Movie (from Current Frame) Playing When I Click On Next Frame?

Apr 8, 2010

I have four movie clips (.f4v) in 4 frames in a movie with watch buttons.. This movie has them been imported into a main movie container that has next and previous buttons. However if i play a movie then hit next frame, the movie continues to play in the background. The code below shows one of the actionscripts for a movie clip and then the main actionscript in the main movie.[code]...

View 1 Replies

ActionScript 2.0 :: Playing A Movie Clip From A Certain Frame To A Certain Frame With A Button

Jan 7, 2009

I have an invisible button and only one mc, the mc loops 3x then stops, this is defined with as in mc.

Now i want to play the movie from the invisible button but only loop it once. Which means i would like to play it from frame 1 to frame 215.

And also when u rollout i would like the movie to stop and go to frame 1.

this is my button code so far

Code:
on (rollOver) {
tellTarget ("loader")
{

[Code]......

View 12 Replies

ActionScript 3.0 :: Stop The Background Song On Frame 1 And Have Frame 2 Playing?

Aug 7, 2010

I have 5 frames in which a different song will be playing, this is the code i used on each frame:

var mySound:Sound = new Sound();mySound.load(new URLRequest("frameone.mp3"));mySound.play();

If im on frame 1 and click on the navigation button to see frame 2, both songs on these frames play simultaniously. how can i stop the background song on frame 1, and have frame 2 playing?

View 11 Replies

ActionScript 2.0 :: Flash Scrollbar To Appear On Window Resize

May 30, 2009

I'm trying to create a scroll bar almost exactly the same as the one on this site [url].. where it only appears if the window isn't wide enough and also resizes when you resize the window. i've googled around trying to find examples of how to do it / tutorials but been unsuccessful!

View 3 Replies

Resize - Constrain - Force Fit Swf In Browser Window?

Jul 10, 2009

how to constrain the proportions of a flash site so that when a browser window is resized the swf resizes to fit?Is it actionscript needed in the fla or some html in my dreamweaver file? [URL]

View 1 Replies

ActionScript 3.0 :: Content Not Scaling On Window Resize?

Apr 10, 2010

How come my content isn't scaling when I resize the player window (see attachment)?

View 2 Replies

ActionScript 3.0 :: Resize Window/Movie Clip?

Nov 25, 2010

I have a movie clip that contains a swf file in my .FLA file . How can i enable the movie clip so that when the screen is resized either bigger or smaller, the movie clip enlarges/shrinks accordingly.

View 1 Replies

Load External SWF App In A New Air Window With Resize Functionality?

Mar 8, 2010

I'm trying to load a local SWF Application in my Air Application via the SWFLoader class. The SWFLoader class is displayed in a new Window. Therefore, i'm trying to resize the window automatically, when the Flash Application is resizing. But here's the problem. The SWFLoader does not get any events when the loader App has been resized.

The Problem seems to be the Sandbox Restrictions. I'm able to call methods in the childSandboxBridge and parentSandboxBridge Objects that i've set in the LoaderInfo of the SWFLoaders content (the loaded SWF Application). But i cannot listen to any ResizeEvents or something like that when i'm resizing the loaded App.

View 2 Replies

Flex :: Have A Mx:Window Automatically Resize To Its Content?

Mar 17, 2010

I'm creating windows in a Flex application (AIR) using the mx:Window component. I'd like the window to be automatically sized to its content (because it will be dynamic), in the same way that an mx:Panel or mx:Box would be.I've customized components before, so I'm somewhat familiar with the UIComponent lifecycle, but I'm not quite sure how best to do the logic for auto-sizing a container.If it makes it easier, I'm not expecting that the window auto-size to its content at any time, thought that would be a bonus!

View 1 Replies

Flash - Image Panning Window Resize?

May 19, 2011

I have this document in flash where I want an image to pan with mouse movement. When I test the movie it runs ok with any problem. But when I resize the window the position of the big image, it goes all wrong. I'm going crazy with this. Any help? I'll leave the link here so you can see the .fla document.

[URL]

And here is the code (Actionscript 2.0)

var boundX:Number = bigPic._x+activator._x*(bigPic._width/activator._width);
var diffX:Number = bigPic._width-activator._width;
var easeSpeed:Number = 7;

[code]....

View 1 Replies

Actionscript 3 :: Container Resizing According Window Resize?

Jan 17, 2012

I have a window witch is resizing on creationcomplete phase according user preference. This part woks well. But inside this window a s:Group (maincontainer2) exists and even if width and height is in percent, the s:Group size is bigger that the new window measure.

<?xml version="1.0" encoding="utf-8"?>
<windowSkin:wCustomWindow xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"

[Code].....

View 1 Replies

ActionScript 3.0 :: Resize To Fit Browser Window (centered)?

Jan 14, 2010

What I would like is to keep my original movie size (800x600) but have it centered both horizontally and vertically in the browser window. If the user expands the browser window, I'd like it to dynamically center itself both horizontally and vertically in the new window size.There is one that fits what I need, but it doesn't work properly. [URL]The current result when I use this in the HTML file is that everything is enlarged past the window size (and I end up with scroll bars), and the flash item is not centered.

View 5 Replies

ActionScript 3.0 :: Scaling External SWF Before Window Resize?

May 23, 2010

I am trying to scale external swfs to the window size that exists at the point when the button is clicked. The external swf is being loaded into a dynamically created mc in the main swf. I am using a resize handler and the issue i am having is that all external swfs only become veiwable when the window is resized. After the window is resized, they become viewable and scale on the resizing of the window. I call the resize handler to upate the scale base on the window size but to no avail.

The AS (3.0) that I am using can be seen below.

ActionScript Code:
stop();
var Xpos:Number = 0;
var Ypos:Number = 0;

[Code].....

View 0 Replies

ActionScript 3.0 :: Resize Swf Size For Browser Window?

Jan 13, 2012

You know how people have different monitors and resolutions how do i change my swf to fit that resolution in the browser.

View 1 Replies







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