ActionScript 2.0 :: Continue Statement - New SWF Is Not Loaded Into Movieclip After Reaching The End
Dec 18, 2005
[Code]...
What I'm trying to do is: When this button is pressed, whatever is in the current news_Clip movieclip goes to frame 71 and plays till it reaches the end of the outro animation which is frame 101. When it reaches frame 101, I want to load a new swf into news_Clip. Using the above code, the contents of news_Clip does its outro animation but the new SWF is not loaded into it after reaching the end. I've been screwing around with this for the past 7 hours and can't figure out what I'm not doing or doing wrong.
View 1 Replies
Similar Posts:
Jan 14, 2008
I have a number of menu buttons (home, about, contact, etc). Each button loads a new/different movieclip onto the scene. Each movieclip when loaded plays up to frame 25 and stops. When I click on any of the menu buttons, I want the current/loaded movieclip to continue playing until it reaches the end of the clip before loading the next. I tried this actionscript with no luck!
[Code]...
View 2 Replies
Jun 29, 2010
I'm trying to reach main movie from loaded swf.I load the swf using this:
ActionScript Code:
var roomloader:MovieClipLoader = new MovieClipLoader();
var roomloadHandler:Object = new Object();
roomloader.addListener(roomloadHandler);[code]...
I tryed _parent and _global. But nothing works.
View 1 Replies
Apr 19, 2004
is there a way to create an if statement that would load a movie clip after a different movieclip is loaded.i have text_mc and scroll_mc. I dont want scroll_mc to load unless the content is loaded into the text_mc.I tryed to make an if statement sort of like a something used for a preloader but I must have been off just a bit because it was not working. I dont even know if it possible.
View 7 Replies
Dec 18, 2011
I have a movieclip on the screen called "mc_bg". Within this movieclip are 7 movieclips called "barrier1" through "barrier7".From main.as I want to be able to do this call:
for (var i: int = 1; i < 3; i++ ){
trace("got here")
trace(mc_bg["mc_barrier" + String(i)])
[code]....
View 1 Replies
Sep 26, 2011
I have an application that contains a group of images (movieSymbols) on stage. (like chairs) I can drag these chairs all over the page.
However:
1) Can I have ONLY one chair on stage and drag the same chair in multiple locations so that now I will have 10 chairs on stage?
2) If the above is possible, is there a way to set a counter that will show 10 chairs are on stage?
View 5 Replies
Apr 23, 2010
I am loading a 29 frame movieclip on fame 15 of the main timeline. Is there a way to have it continue playing maintimeline when it finishes. So when it gets to frame 20 of the movieclip AS sends control back to frame 16 of the maintimeline.
View 1 Replies
Aug 12, 2010
I have the same swf externally loaded over multiple frames. I am hoping to be able to check to see if the swf is loaded, if not then load it into the container movieclip or else don't load the swf.
View 0 Replies
May 14, 2010
I am initiating loading a swf file, "bg1.swf". I have a button that, when clicked, is suppose to check to see if "bg1.swf" is loaded.I cant figure out how to write the conditional "if" part. Currently, instead of checking to see if my statement is actually true, it executes loading bg1Req? Here is the code .
var bgLoader:Loader = new Loader();
var bg1Req = new URLRequest("bg1.swf");
var bg2Req = new URLRequest("bg2.swf");
[code].....
View 7 Replies
Oct 24, 2011
Just starting to delve into as3. I have made a flash website with four navigation buttons (home, products, about, contact). When user clicks on "products", an external movie clip is loaded and everything works fine. User clicks any button after that, and myLoader.unloadAndStop, the swf is removed when you navigate away from "products". However, if the "home", "about", or "contact" buttons are clicked first (before the external swf has been loaded), it of course, throws the 1009 error.I need some sort of if/else statement to check whether or not the external swf is loaded, remove it if it is, and if not, just navigate to the "page" clicked.[code]
View 0 Replies
Nov 22, 2004
Trying to get a MovieClipLoader to work for me... This code is taken pretty much right from Macromedia's Help file. I get no error messages (yay), but I also get no trace statement (boo) or loaded clip (boo2). There *is* a clip named audioplayer.swf in the same directory as my file.
[Code]...
View 2 Replies
Jul 7, 2007
I don't know if I'm using the correctly terminology but I've made a movie rater in flash for MySpace. The problem is it doesn't allow script access. The music players on MySpace load xml files through the embed statment.
Now, I've done the same thing using this:
[URL]
I know how to read xml files in actionscript (variable=moviedata.xml.firstchild.firstchild.node value; ) and all that good stuff. The problem is, I don't know how to read an xml file that has been loaded this way with out the actual load commands being in the swf itself.
View 5 Replies
Jul 19, 2010
I've got a little script that scales a video to the stage. The scaleing function has a switch statement to indicate what kind of scaling to apply.If I declare the case value of the switch statement internally all is fine. However if I load this value from an XML doc, even though the trace indicated the value has loaded, the switch never fires.
Code:
/stage variables
var sH:Number;
var sW:Number;
var _contentHolder = new Sprite();
[code]....
View 2 Replies
Aug 20, 2009
i got 2 web domains. for example first one isi put my swf in [URL]i can reach the xml file but i cant load photo if photos are in hosts.
View 5 Replies
Feb 8, 2009
I am using Flash CS3 AS2. On my main timeline I have 3 buttons, each of which, when pressed go to the same frame in which a movieclip loads. However, when the movieclip gets to the end I want it to gotoAndPlay a different frame on the main timeline depending on which button had been pressed.
I'm guessing I need to use button instance names in combination with an if statement from within the movieclip but I'm not sure exactly.
So far I have tried
if (isPressed= "btn_latest_mar_cgn"){
_parent.gotoAndPlay("latest_cgn");
}
but something isn't quite right about that. Do I need to put something on my main timeline
View 7 Replies
Jun 4, 2011
I found this snow script on the web that I would like to use but I don't know how to turn it off.
It starts working when I load the script into frame 1. Then I would like for it to run 150 to 200 or so frames and then I would like for it to stop without using any type of button. I would like for it to just stop automatically after reaching the last frame. A simple stop(); in the last frame doesn't work.
Code:
// max number of snow flakes on screen at once
var nMaxFlakes = 100;
// fastest speed that the snow flakes fall
[Code].....
View 13 Replies
Mar 1, 2011
i have a rectangle named(p1) with w:250 h:400 and a other rectangle named(bs) same width and height , registration point is at the center right. when i click on p1 ,p1 will fellowing my mouse and the p1 rotation is depending on the bs width and height.[code]okise now my intention are , when i release the mouse ,p1 will go move back to the (bs) registration point and on the way to the registration point it will rotation++ to 90 degrees.when reached bs registration point it will become 90 degrees.if my now my p1.rotation is 135, when i release mouse , p1 moved back ,rotation will depend on the distance back and rotation to 90 , like 133 ,125 ,110, 90.
View 6 Replies
Nov 28, 2009
In the code below how can I use the movieclip in the conditional statement? This is simplified, there is lots more going on but the basic issue is shown. I want to say if currently dragged mc is dot1_mc do the copyDragTo35 function
PHP Code: var item:MovieClip;
//add event listeners to all dots
kite_mc.dot1_mc.addEventListener(MouseEvent.MOUSE_DOWN, onItemDragStart);
kite_mc.dot2_mc.addEventListener(MouseEvent.MOUSE_DOWN, onItemDragStart);
function onItemDragStart( e:MouseEvent ):void {
[Code]...
View 2 Replies
Jan 29, 2011
I have built a calculator with a running total variable (stotal) this is working great. There are 30 buttons each having its own value each add or subtract from "stotal".The attached is a much scaled down and simplified version of the calculator. In this sample each button has a value of 200. If the user gets to 1000 or more I want to load an exiernal SWF "succes.swf" that notifies them they have reached 1000.
Here is the AS for one of the buttons. I know I need to wtite this as an "If then Else If" statement in order to get it to work but I am not having much luck;
q1a.onRelease = function(){
if (a1a==true){
a1a=false;
_root.stotal -=200;
[code]....
View 6 Replies
Aug 3, 2010
I'm creating a small guessing game where on stage there are 6 squares, and the user has to click on a square, and see if it's the correct one (it should be a bit more exciting when it's finished!) The random answer is created using the math.random method and I'm using an array for the square movieclips. The problem I now have is with the IF/ELSE statements.
have a look at the following code, and the bit I need you boffins to look at is just after the if statement.
var myArray:Array = [mc_square01, mc_square02, mc_square03, mc_square04, mc_square05, mc_square06];
myArray[Math.floor(Math.random() * myArray.length)].addEventListener(MouseEvent.MOUSE_DOWN , chooseMe);
[Code].....
View 3 Replies
Aug 7, 2011
i have created a movieClip in the authoring enviornment. i dynamically get it to play and then it pauses at frame 20. how do i dynamically tell when frame 20 has been reached and then execute the next code?
View 4 Replies
Aug 13, 2009
I've made a class which dispatches a string in order to switch languages on a site that I'm working on these days.The objects that should listen for this event type (let's call them targetobjects) are located inside some objects that are located in some objects (3 levels).[code]model to reach the targetobjects I have to make an addEventListener and handler function on the stage, the grandpa object and the father object.Could it be a way to make the targetobjects listen for the LanguageEvent.LANG_CHANGED by themselves?
View 3 Replies
Nov 1, 2011
I am trying to access movieclips within my movieclip using a for statement. To try and make this clear, here is how it looks at the moment:
sections = Holder movieclip where dtf_sections is placed, as well as other clips that are needed.
dtf_sections = Where all the title movieclips are placed that are going to be used when called. Placed in here to make it easier to move, within sections
title = Movieclip that contains the text that needs to be changed, within dtf_sections
Here is my code that works:
sections.dtf_sections.title1.dtf_title.text = "Section 1"
There are upto 10 titles within dtf_sections. So, what I thought would work is this:
for(var i:uint=1; i<10; i++){
sections.dtf_sections.["title"+String(i)].dtf_title.text = "Section" +(i)
}
The reason why they are within the movieclips is masking, and appearing at different times.
View 1 Replies
Jul 7, 2010
I have created menu which has roll over and out animations.What I am trying to achieve is to play the roll over animation when rolling over the menu, but stop the roll out animation IF the focus has been set on a specific movieclip.[cod]I am not sure what I am doing wrong, but if I trace the stage focus inside the if statement nothing happens, but it works if I trace it on else statement(gives null) which means that the if statement is bypassed and the else is played.
View 7 Replies
Jul 6, 2010
I have created menu which has roll over and out animations. What I am trying to achieve is to play the roll over animation when rolling over the menu, but stop the roll out animation IF the focus has been set on a specific movieclip.
Here's my code:
Code:
function menuOut(e:MouseEvent):void
{
stage.focus == contentMc;
[Code]....
if I trace the stage focus inside the if statement nothing happens, but it works if I trace it on else statement(gives null) which means that the if statement is bypassed and the else is played.
View 1 Replies
Apr 2, 2009
My idea is for a movieclip to flip horizontally when reaching an _x point, which is 225 (it should be half the stage). Now, I know about _root.movie_clip._xscale, and I've tried it, but it didn't work. Here's my code:
onClipEvent(load){
if(_root.poke._x=-225){
_root.poke._xscale=-100;
[Code].....
And I'll upload the .fla for you, so you can see what the problem is.
View 3 Replies
Aug 25, 2008
is there a way to reach the stage (the main time line) from ANYWHERE.In AS2 it was _root...The aim is : I want to add on stage an MC from within a class. As expected, addChild(mc) doesn't work, it adds the child to my class, not to the stage. So : is there any stage.addChild(mc) or MainTimeLine.addChild(mc) or anything like this ?The other way is to add the class on stage addChild(MyClassName).
View 12 Replies
Jan 29, 2011
Basically I have a MC called 'plane3.' Inside that MC is another MC called 'plane2.' Inside 'plane2' is an animation on frame 5.(inside the MC 'plane3' the MC 'plane2' is on a classic tween going side-to-side from frame 1 to 99, once it gets to frame 99 the code gotoAndPlay(1); makes it go on loop back to the beginning)My question is how would I go about: when you click 'plane3' it lets the tween continue playing until frame 10, then on frame 10, it gotoAndPlay (100); in the same MC and ALSO plays frame 5 from inside 'plane2'
View 5 Replies
Jul 7, 2011
I have been having a problem usign a custom event... I attached it to the the main class using "addEventListener" and fire it off with "dispatchEvent" in another class. I checked that it was attached to the main class using "hasEventListener" and it returned true, also "dispatchEvent" returns true... but it ever reaches the function that I attaced it to... is there any thing I am missing?
View 3 Replies
Nov 18, 2009
I created some movieclip buttons, set a statement to disable it, but I can't enable them again when another button is selected how can i resolve this?[code]
View 4 Replies