ActionScript 2.0 :: [FMX] - Using Movieclips To Switch Between Scenes
Aug 30, 2004Does anybody know a way to move through different scenes using movieclips? As far as I know, you have to use gotoAndPlay(scene, frame) on a button.
View 12 RepliesDoes anybody know a way to move through different scenes using movieclips? As far as I know, you have to use gotoAndPlay(scene, frame) on a button.
View 12 RepliesDoes anybody know a way to move through different scenes using movieclips? As far as I know, you have to use gotoAndPlay(scene, frame) on a button.
View 12 Repliesi do not possess any knowledge in using of scenes and i got a proj which requires me do so and i been using the alpha-ing and tweens to do the button switching its really tiring and confusing
so can anyone enlighten me on how to use scene to do switching of 1 scene to other along by using a 'next button' and 'previous button'
I am working in CS4 and am trying to use AS3.0 to make buttons that go to different scenes. I am not using "Scene 2" in my AS; instead, I am labeling frame 1 of Scene 2 and am using that frame label in my coding.
Unfortunately I cannot get it to work properly. I am about 8 hours into trying to fix it and cannot seem to get it resolved.
I have attached the .fla file for your reference. I have also pasted my AS coding below in case it is a simple thing (probably not!). The movie needs to stop at a certain frame so the buttons are available for the users.
stop();
btn2_btn.addEventListener(MouseEvent.CLICK, showimage);
function showimage(event:MouseEvent):void {
[Code]....
At the moment I have two scenes with both two animations in it. At anytime they can access the next scene(3), an questionnaire. What I want is that the user can access the questionnaire after they played all of the four animations.
View 0 RepliesSituation: I have a project I'm working on where I have buttons which make click sounds on their own, and also take you to other scenes where a sound will immediately play. There are also three movieclips involved, total my base movieclip and two independent ones that load on top of that. Problem: I want to include a Mute button so that you can turn off all sounds, but can't figure out how to do that..As I understand it, stopAllSounds won't work for me, because as soon as someone hits another button, a new sound will play.
View 5 Replieswhenever I set my sound to stream and continue to make a movie with multiple scenes. The audio and video get disgustingly out of sync sometimes even off by 30 seconds. I just started an animation its only 10 seconds long with two scenes and the AV is already off by about 5 seconds. Ive worked around this by avoiding scenes altogether but i really don't want to have another 5000 frame scene. I discovered this problem in Flash MX and Im quite annoyed that it still has't been fixed 3 years later!
View 1 RepliesI have an interactive story divided into scenes. At the end of each scene a button appears. This occurs on a frame on the timeline.
There are two different buttons that might appear based on whether a prior scene has been viewed or not.
For example, there are Scene_1 and Scene_2. At the end of Scene_2 one of two buttons will appear. The buttons will be either "Go see Scene_1" or "Return to Main Menu".
If the user has already seen Scene_1, Flash will know that and automatically go to the frame in Scene_2 that contains the button "Return to Main Menu".
Conversely, if the user has not seen Scene_1, Flash will know and automatically go to the frame in Scene_2 that contains the button "Go see Scene_1".
I imagine there would be an action frame at the end of Scene_2 that will contain the as2 code to enable this action.
Perhaps something like, but probably not at all like the following:
if ("Scene_1", last frame == true){gotoAndPlay("frame#");}else{gotoAndPlay("frame#");}
What I'm trying to do is create a program that, depending on 2 variables, multiplies another variable by a static number. Heres the code I have so far:
[Code]...
I want this on an MC:
[AS]
i = 0;
switch(thing){
case 0:
[code]....
Basically what I'm wondering is, will I lose the value of i in the first switch once I'm out of the switch? Can the second switch read the 1st switch?
Im trying to create a program that, depending on 2 variables, multiplies another variable by a static number. A friend suggested I use case/switch instead of if/else statements,which is what I was using before.
[Code]...
I am working with a project that has many scenes. Each scene has a movie clip attached to it. The first scene is simple...just a couple of buttons and that is it. My worry is that when I add all of the videos that correspond with each button and publish the SWF will be a huge file. THE QUESTION: Does flash load ALL scenes of a movie or does it load the first scene and then load the other scenes when the user needs to view them?
My ultimate goal is to just have the first scene load and then when the user clicks on the buttons contained within that scene that only upon release does the corresponding scene load. Maybe I am doing this completely wrong and should look at doing it another way.
I am coding this loader that requires multiple Scenes because of long swf presentations. My loader swf is using a timeline scrubber and I am having problems when dealing with Scenes because the currentframe goes back to "0" when a new scene starts and scrubber goes back to the beginning.
View 1 RepliesI am having a very unique problem: I am creating a simple flash website, and I have a series of buttons that link to a series of frames. There are 27 buttons, and each proceed to a separate labeled frame. Each of the frames is a short animation 13 frames long. The buttons are all versions of this:
[Code]....
Then, 13 frames into the animation I just have a stop(); command. My issue is that if you click on any button in the series, none of the buttons that go to frames before the current one work. If I click button 20 and go to the 20th animation in the set, buttons 1-19 don't work, but 21-27 still do.
What's more, from moving the actions around to see if they needed to be in the same key frame as the button, I found that if the actions are in a single key frame in any of the animations, the animation stops on the frame that the actions are in. I also found that each button will only work once.
ActionScript 3 is just too tough for me, so here's a probably very simple question: How do I manage to create a navigation bar across all Scenes (6) and Frames (125 per Scene)? how to create the button and the AS, but it's only valid for one single frame then...
How I did it:
Code:
land.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene_11);
function fl_ClickToGoToScene_11(event:MouseEvent):void
[Code]....
Search function here keeps crashing or not loading, is that normal?
I am having a movie with 8 scenes and being in Thailand where the internet is slow I would like it to preload before it opens because now, after it opens a lot off the stuff ain't there yet like buttons and animations that are built into different scenes.
View 2 RepliesI've just started working with CS4, and admittedly I'm new to Flash, but I can't get the Scene functionality to work as described in the docs. The class MovieClip has a currentScene property that should return a Scene object. The Flash 10.0 docs give this code as an example :import flash.display.Scene;var scene:Scene =mc1.currentScene;trace(scene.name + ": " + scene.numFrames + " frames"); However, if you create a new ActionScript 3.0 fla file, create a MovieClip instance, name it mc1, and put this exact code in one of the frames, it returns a Scene object with no name and only 1 frame.Changing the name of the scene in CS4 does not . Am I missing something?
View 15 RepliesI'm building a portfolio site and I've renamed the secenes and reordered them but when I test the movie it defaults to what was originally scene 1. I'm working in AS2. If the mods will allow the web site is [URL]. There is an intro page which was scene 6 which is now renamed "intro" and draggd to the top of the pile but it doesnt show when I preview or upload.
View 2 RepliesI'm building a simple interactive video/animation in Flash. I have a sample from the company that I'm going follow and they use separate scenes for different sections of the video. I've read there are disadvantages to using Scenes but I haven't seen any advantages. In fact I haven't found much about Scenes at all. Most people seem to build their stuff in one scene, just labeling frames so they can jump to them to make scenes that way. I also have been looking up tutorials and I can't find anything about using the Scenes palette and how to connect the scenes together. Is there any reason I should use this Scenes palette and not do my whole video in one scene?
View 7 RepliesI seem to be having issues with sendAndLoad() from different scenes.When I load the .swf (ctrl+enter) the communication is fine, when I naviget to scene2, the same code doesn't seem to execute at all...
Code:
//--------HERE WE SEND THE DATA--------//
var myLv:LoadVars = new LoadVars();
[code].....
I am doing a project for work and haven't used scenes in 3 years so I am a little rough around the edges.
What I am have is 3 buttons which should each go to 3 different scenes. The scene names are "home", "twoPortlands" and "portlands" and then each scene has a layer with the Frame Label of "home", "twoPortlands" and "portlands" I want the first button to go to and play "home" I want the second button to go to and play "twoPortlands" and then the third button to go to play "portlands"
I have the following code on the first frame of home (which is the main interface)
[Code]...
I have 2 scenes. Scene 1 and Scene 2. When i click on some thing in Scene 1 it adds to the invetory. Then i click and move to Scene 2 but that thing is not in Scene 2. I just want to have that thing in every Scene...
View 5 RepliesI upgraded to Flash CS4 and found out i dont like actionscript 3. i have an older flash site I opened in CS4 and all the actionscripts work on the scenes. I began a new flash file and created scenes with the actionscript 2, but it wont let me enter the script in the actionscript window. Here is an example of what i am using to navigate with buttons. Can someone chime in and show me a simple method to navigate thru the scenes with actionscript 3 or how to continue to use actionscript 2.
[Code]...
I m trying to make sense of how to load a swf into a parent MovieClip and allow them to communicate.I ve attached two zip files � one which works fine and the other doesn�t. Unfortunately (for me), the one which doesn�t work is closer to my current project.I need to load movieclips into the parent movieclip. The parent movieclip has controls which rely on values parsed from the child movieclip.In the parent movieclips I wait until the loading is complete and so the values should be passed. However, the values aren�t passed unless I use a button (or timer), to pass the values (see the working exampes).The code which doesn�t work is:
Parent movieclip:
ActionScript Code:
stop();
var myLoader:Loader = new Loader();[code].............
how I can switch between different songs?The idea is that an animation will loop continuously (graphic, not a movieclip), and there is one button that will allow the user to change the background music.
View 1 RepliesI'm currently building a Flash Game for my work. I made a switch to check if my items fell into the right bucket. But when I was developing all my other functions I realized that I could handle this in an If Else instead...So the question is: What is faster (less CPU intensive), a switch or If Else?Here is my switch:
Code:
function getPoints(naam,orgNaam,baksoort):Void {
switch(baksoort){
case "bak_B01":[code]....
I have two SWF-Movies. One is exported into eht other as Child.Can I instance the Objects of the two libraries in all places, where ActionScript is possible? (In Keyframes of the MovieClips and in external class definitions.)
View 3 RepliesI am creating my first Flash Web site, learning ActionScripting as I go. I think my most recent problem requires some simple scripting, but I haven't found a solution on the Board, so I decided to post this message.
Basically, I am trying to make the transitions between each section of my site seamless, and in absence of any HTML-like jumps in which the page just cuts to another. For example, when you click on a button from the main navigation area of my portfolio site, you are taken to another section (separate scene),and the content area changes.I want the previous scene to fade out, after the button is clicked, before the new scene loads. Another words, I need to figure out how to tell the timeline to do this for each button:
When I click the Graphics navigation button,FIRST play frames 300-310 of the current scene (fading out animation)THEN take me to the frame label graphics.Heres the code attached to my Graphics button currently (it nested inside a movie clip, hence the _.root part). How would I change this to get it to play frames 300-310 of the current scene before it takes me to the graphics page?
on (release) {
_root.gotoAndPlay("graphics");
}
Is there a way to convert a flash presentation to scenes?
also is there a way to copy frames and paste them in place without things getting shifted weird?
I am using an xml driven photo gallery as part of a site, with the index page on one scene and the gallery on another.i can get the scenes to go forward and back with the GotoAndPlay function, but when i go back from the gallery the xml images are still visible.AS script for xml portion is too long to post in message.
View 1 Replies