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();
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).
i have a flash movie that has a clock , slideshow and text scroller that plays all day in my resaurant. I want to change it so that it plays a movie with special offers in the mornings, then plays a movie saying we're reopening at 4.15 in the afternoon and then play another movie wit clock/slideshow inteh evening. How can i set my flash code to play these 3 different movies at the specified times automatically.
I have a video playing on my page. I want to show and hide some div's when the video reaches a certain point. Lets say hide something on 10th second and show it again on 20th second.I can easily do it in HTML5 with video tag and currentTime attribute but for IE I have to create the same functionality and I think with flash based videos (from YouTube or something like that).Is there a way to detect the current time of a video playing on my website, embeded from YouTube, Metacafe or any other video sharing site?I know I could detect it in flash and make it run some JavaScript function but I don't have flash nor have the skills to do it in AS3.
I'm working on a site, for kids, which has a small avatar in the corner that talks.The avatar is a flash file and the plan is to determine what it says through a mix of javascript and ajax.
Unfortunately when I make the flash file play an Mp3 file through JavaScript, I can't seem to stop the sound.. so when I keep clicking on a link which causes it to talk, I hear the sound repeated x times.
The odd thing is, when I attach the very same code to a button in flash, there seems to be no such limitation. It seems as if it won't store anything in global variables when calling from JavaScript.
I have 2 flash banners (using ActionScript 2) on my web page, how can I make them start playing at the same time, after the page has fully loaded? Both .SWF files are embedded in HTML using the script provided by Adobe on object export. I created both in Flash CS4, but I have very little knowledge of flash. I read about "LocalConnection", but I have no idea how to implement it in flash.
So I'm creating a movie clip using flash... Is there any way to start playing the movie from a certain frame (lets say frame 550) which I hit Ctrl + Enter So I don't have to watch the entire movie to test it?gotoAndPlay(550) doesn't work.
I'm a newbie at Flash, so started playing with a pretty standard code sample: one layer contains a movie clip with a flying rectangle, another layer has a button to control it. All script code is in Main.as file. The rectangle was named square1 through the Property window. Here is the problem: the constructor for Main has a line: square1.stop(); to prevent clip from playing, but it doesn't help - it plays. I know the constructor fires, because it has trace("stuff") in it. The code does check that the stage has been created.
What strange is that square1.currentFrame always returns 1, and square1.totalFrames returns 1 as well. The layer has 24 frames on the timeline. I tried a tween with just 2 keyframes, then converted whole tween into frames - same result. I mean, the thing is flying before my eyes, how can it be 1 frame???
I even added a listener: square1.addEventListener(Event.ENTER_FRAME, onFrameChange); The event fires all the time, i.e. the frames change, but currentFrame is still 1. Also, tried to name individual frames and use square1.gotoAndStop("begin") and stuff like that. I am really stuck with this stupid problem.
I was wondering if someone can help me. I have some difficulties playing a certain frame in another MovieClip. I have two MovieClips, MovieClip(content) and MovieClip(about_page). The about me button is placed in MovieClip(content) and I used the following code to go and play MovieClip(about_page) that is placed in the timeline:
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]...
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?
I have a small flash tidbit that is basically used like a menu. It scrolls through the thumbnails left and right, when clicked the pages navigates to the appropriate location. However, the flash movie jumps back to the beginning of the movie. Is there anyway I can get it to stay in the same spot when the page is changed? I tried using iframes, but this did not work out, it had the same result. ref:[URL] to see the problem scroll the images to the right and select 'wall boarder buddy' (fourth image from the left) this takes you the page and the flash resets to its original position.
I have a button on the main timeline. I would like to move the main timeline to a frame label called "history" and load and play a movie clip called "slideshow1".
I have the "gotoAndPlay" code working properly but can't seem to get the external swf "slideshow1" to load and play.
I've inserted the following code into the frame label "history" actionscript.
if for example the player moves, does it move him every x seconds or every x frames?like, if the flash game runs on somebody with fast computer and other has slow computer, so his game runs slower, so it can result in the player moving slower than the guy with the fast computer. so ya they'll move in 2 different speeds. in c++ you gotta add sort of timer for this so it depends on time incase the player lags or something. sometimes you gotta have 2 buffers for the screen, so while something is displayed on screen it loads the other buffer in the background, and then shows the finished loading buffer and so on. this way there are no graphic bugs.
I'm having an odd issue with reloading SWFS. I start of with loading my SWF:
var req:URLRequest = new URLRequest( "RegionalIntro.swf" ); req.method = URLRequestMethod.POST; req.data = true; // POST requests require non-null data
[Code]....
What I can't work out is why that works the first time, but when it's reloaded it doesn't work?
EDIT2: The plot thickens, I can catch the error by surrounding all of the code in the function at the top of the stack trace with a try/catch block. I trace the error and its the same, the weird thing is all the code executes as expected. All works fine and throws an error ... very odd! I'd hate to leave it like this without finding out why it's doing it though ...
I'd like to know whether there is a way to add an error handler for a #1502 execution time error in AS3.
A couple of notes:
I am aware that the max script execution time can be set on the publish options. It takes values as high as 16 bit (0-65535). So there is a max of 18 hours. The script does not get terminated after 60 seconds in the context I use it
I use it in an application built with mProjector. There is an event listener on a button that opens a file browser dialogue. As long as the browser is open the event handler does not continue. If the maximum script execution time is exceeded I get the #1502.
I have two movieclips on the same frame but on different layers located within the movieclip. The first movieclip plays just fine. However, the second one isn't going ahead even a single frame. The code that I have mentioned below is located withing the second movieclip containing background image. And I think this code is causing the issue because when I remove this it plays perfectly fine. The function of this code is to automatically re-size background image with the browser dimensions. The whole code just worked fine on the main timeline.However, when I shifted it inside a movieclip its causing an issue.
//set stage for FBF stage.align = "TL"; stage.scaleMode = "noScale";
now how do i make the movie clip to first go from frame 1 to 10( last frame in teh movieclip) with the text time and then when the movie clip starts again it should say place and so on and so forth.. depending on how many textline variables i define in the text file?
I am fairly new to Flash and have been building a movie. The movie is working properly, but when I test the movie, I receive an error:
Error #1034: Type Coercion failed: cannot convert flash.display::MovieClip@2c882701 to fl.transitions.Tween.
If I ignore this, everything behaves as it should, and when exported to a swf and played through a browser, it works fine. But, when played in the flash player on it's own, the error pops up. If I dismiss the error, it continues to behave normally.I'm not sure what this error means and if there is a way to get rid of it.The swf on the web can be found here:
we face a problem in development which cause runtime error 2022. We have a button in libaray which has bitmaps for Up, Over, Down. We want to link these bitmaps to actionscript to make some changes on the bitmapdata. But when this button first added onto stage it will cause runtime error 2022. We even tried add movieclips to encapsule these bitmap and add movieclip in the button. The error still there. Is any way to bypass this problem? Or any document about error 2022? I searched in google but all what I can find is a simple explaination same as which in flash doc.
I use UrlLoader.load() in my flash app. And I'm handling UncaughtErrorEvent.UNCAUGHT_ERROR to stop the app when an uncaught exception occured. UrlLoader.load() works when you are connecting the internet normally. But if the connection to the internet was lost after your browser loaded the app, SecurityError happens when UrlLoader.load() is called. I can not catch the SecurityError by using try catch and UNCAUGHT_ERROR happens and it stops my app. I don't want to stop the app when UrlLoader.load() failed because I'm just using UrlLoader.load() to log some unimportant information.
And I think timeout error also can be ocurred if it takes a long time to load. And I also don't want to stop my app due to the time out error. How can I solve those problems? And are there more other type of errors which can be ocurred and stop my app?
I created a frame by frame animation using the default elapsed time. There are 41 frames, and it is completed in 1.7 seconds. I would like the whole sequence to complete instead within 30 seconds. How can I change the timing? I am using Adobe Flash CS4 Professional (v. 10.0.2).
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..