ActionScript 3.0 :: Talk To Child - "reset" The Loaded File?

Nov 10, 2010

I'm updating a course from a previous developer who is no longer here, and, of course, the code is not commented and difficult to follow, but, there's a "shell" that loads an "interface" file which has the navigation controls which load other movie files using addChild. The calls look like (slide is the variable with the swf name): Actionscript Code: iFace.screen.back.addChild(slide);

One of the loaded files is a "home" file, which has several interactive areas within it. The problem is that, if the user goes into the home file, selects an area, then hits the "menu" button on the interface, selects the home file again, it shows up with the area that the user selected previously still displayed. If they select another section and then go back to home, the file gets reset. how I can "reset" the loaded file? I tried putting the following on the menu button after the function call:

Actionscript Code:
iFace.screen.back.gotoAndPlay(1);

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Talk To A Parent From A Child SWF?

Oct 20, 2009

I have an swf that is loaded in when a button is CLICKed, anyway inside the SWF file I want to access a function from the parent, how do I do this?

also can I access instance names from the parent file?

View 1 Replies

ActionScript 3.0 :: Talk To Class On Loaded SWF

Feb 17, 2009

I have my main swf that loads another swf:

PHP Code:
private function initPreview(e:MouseEvent):void{
v.stop();
var req:URLRequest = new URLRequest("Presenter.swf");
var ldr:Loader = new Loader();
ldr.load(req);
presenterHolder.addChild(ldr);
[Code] .....

Where I am loading I need to talk to that playlist object. In my PlaylistLoader class I have a function called setPlaylistID(). I need to somehow pass a number to that function of the loaded swf.

View 1 Replies

ActionScript 3.0 :: Talk To A Class On A Loaded Swf?

Feb 17, 2009

I have my main swf that loads another swf:

Code:
private function initPreview(e:MouseEvent):void
{
v.stop();

[Code].....

Where I am loading I need to talk to that playlist object. In my PlaylistLoader class I have a function called setPlaylistID(). I need to somehow pass a number to that function of the loaded swf. I cant figure this out for the life of me.

View 1 Replies

ActionScript 3.0 :: NetStream Choppy - Make A Character Start To Talk When The Sound Starts And Stop Talk When The Sound Stops

Aug 5, 2010

Need to make a character start to talk when the sound starts and stop talk when the sound stops so I'm using this:

[Code]...

View 2 Replies

Actionscript 3 :: How Can A Loaded Child Swf 1 Communicate To Next Child Swf, Child Swf 2, Which Is Currently Not Loaded

Oct 14, 2011

I have a parent swf with three buttons: next button, back button, ticker on/off button.I have three child swfs, each with a ticker mc. When I click on ticker button on parent swfit dispatches a custom event which brings ticker MC on stage and thus ticker becomes visible (ticker off button displaces it out of stage by changing the value of ticker_mc.y).

the problem I am facing is when ticker is on and I click next or back button to load next or previous child swf, the ticker goes off. How can I make sure that ticker is on all the time and closes only when I close it. How can a loaded child swf 1 communicate to next child swf, child swf 2, which is currently not loaded, that since the ticker is on on swf 1 so you please keep the ticker on on swf 2 as well?!

I think I know the problem. I have put a default value of ticker_mc = 160 (makes ticker inactive) on every child swf. So, the ticker becomes inactive everytime I load a new child swf. If someone could guide how can I do this, my problem will be solved: When first child swf is loaded, the default value of ticker_mc.y should be 160. I want to hold this value in a variable. When I click ticker active btn, position of ticker_mc changes to 194 so the value of variable should change to 194. When I click next btn, the variable value (160 or 194) should be sent to next child swf and ticker_mc.y should be equal to variable value.

This is the code so far

"Next button"
go_mc.next_btn.addEventListener(MouseEvent.CLICK, playNext);
function playNext(e:MouseEvent):void {
if (swf_no < (clips.length-1)) {

[code]....

View 1 Replies

ActionScript 3.0 :: Talk To External Swf Mcs From Main Fla File

Sep 8, 2011

I have a main fla file that loads an external swf into a holder mc, let's call it 'swfloaderholder', when a menu item clicked. Inside the external swf's fla I have a holder mc, let's call it, 'jpgloaderholder' that loads different jpegs. Is there a way to 'talk' to the 'jpgloaderholder' from witin the main fla file?

View 5 Replies

Flash :: Accessing CHILD In External Loaded Swf File

Jan 7, 2012

How do I get to the MovieClips within an externally loaded Movie Clip. Lets say I have a movie Called ONE in the swf I just loaded. How can I work with it alpha, position and other properties of the children of this clip? CODE IN MAIN TIMLINE:

[Code]...

Now its loaded I want to change the postino of the clip called ONE in the movie LoadedMC I just created.

View 1 Replies

ActionScript 3.0 :: Won't Let Reset Child Index?

Jul 15, 2010

I've got multiple images being loaded from an xml document and when they're created they add it to the stage and call a setIndex function to set it to 0. But when I try to the same object later on when they're called I get this compiler error:
 
I marked in bold the lines that relate. Out of the last two lines I marked bold I get this compiler error when I use the first one: 1118: Implicit coercion of a value with static type Object to a possibly unrelated type flash.display:Sprite.
 
and this output error when from the last bold line: TypeError: Error #2007: Parameter child must be non-null.

[Code]...

View 2 Replies

ActionScript 3.0 :: Reset Externally Loaded Swf?

May 2, 2010

I fully load a swf in my constructor function. It's actually an swf with an flvplayback component. It loads, is placed on stage and it's visible property set to false. I then have a button that makes it visible and ready to be interacted with but what I wanted to know was if I could have the swf reset itself without having to have to unload/load or add/remove from stage. Simply reset the loaded swf to it's original state?The user clicks a button revealing the loaded swf. Watches the movie embedded in the flvplayback. The user then looks around at other stuff on the site and later decides to watch it again. When he presses the button gain it should be as if he's pressing it for the first time.Simply rewinding the flvplayback component or any other method of the flvplayback class is not an option. The initial state of the swf is not the actual component but some text explaining the idea behind the movie and then a button that takes you to the playback component.

View 0 Replies

Flash - Reset Main Class When First Loaded The Package

May 12, 2011

[Code]...

Is there an easy way to reset all of my variables to the way they were when I first loaded the package so that I don't have to go through all of the variables and reset them manually?

View 2 Replies

ActionScript 2.0 :: Alpha Fade Does Not Reset When A New Images Is Loaded?

Sep 16, 2004

the problems is that the alpha fade that I created, does not reset when a new images is loaded.Here is the script.

start of script
onClipEvent (load) {
photos = new Array("images/mel_1.jpg", "images/mel_2.jpg", "images/mel_3.jpg", "images/mel_4.jpg", "images/mel_5.jpg");[code].....

View 1 Replies

ActionScript 2.0 :: Alpha Fade Does Not Reset When A New Images Is Loaded

Sep 16, 2004

I am learning actionscript and having a tough time of it... Here is the script I am having problems with...the problems is that the alpha fade that I created, does not reset when a new images is loaded. Here is the script,

[Code]....

View 1 Replies

Flash :: Loaded Font Doesn't Show Up When Parent Swf Creates TextField In Loaded Child Swf

Jun 14, 2011

Im working on a project that has a main swf file associated with the document class. It loads XML that provides the text content for the project, then it loads a swf that contains a font in its library, then it loads the first of several content module swfs. When the font swf has inited, I'm registering its library font with Font.registerFont(), and using it in a TextFormat object. After everything is done, I can add code to the document class to create a text field on the stage of the main swf and format it successfully with the TextFormat object, but when I try to do the same thing inside the loaded content module swf, the text doesn't show up there at all.

View 1 Replies

ActionScript 3.0 :: Loaded Font Doesn't Show Up / When Parent Swf Creates TextField In Loaded Child Swf

Jun 15, 2011

I'm working on a project that has a main swf file associated with the document class. It loads XML that provides the text content for the project, then it loads a swf that contains a font in its library, then it loads the first of several content module swfs. When the font swf has inited, I'm registering its library font with Font.registerFont(), and using it in a TextFormat object. After everything is done, I can add code to the document class to create a text field on the stage of the main swf and format it successfully with the TextFormat object, but when I try to do the same thing inside the loaded content module swf, the text doesn't show up there at all.

View 7 Replies

ActionScript 3.0 :: Reset The Display By The Means To Start The Motion All Over Again (reset Button)

Jul 13, 2010

Just new in forum and just new in as3 programming. All i want to do is to make some physics simulations (i'm physics teacher...). So i made my first sim with the following code, just to simulate a simple motion with constant velocity. It works ok, except the part i need to reset the display by the means to start the motion all over again (reset button). Then the motion starts but the traces of the previous motion remains on stage. I tried the null command (sp=null) but the sim could not start again because the sp nedded to be non-null...

[CODE]...

View 2 Replies

ActionScript 1/2 :: Make A Reset Button And Add Script To It To Reset All Of The Drag And Drop Movie Clips?

Apr 13, 2011

I have an issue with adding a reset button to my drag and drop movie clips.The problem is, if a student drags a movie clip to a wrong location on the SWF file I want them to be able to hit a reset button that would take them the same SWF that they opened and what would showup would a clear page for them to restart their drag and drop exercise.I know how to make the button for this just want the proper action script to be able for user to start over with no movie clip symbols on the page.

View 3 Replies

Actionscript 3 :: Add A Reset Button On A Flash File?

Mar 26, 2011

How can I make a reset button so when the file ends it resets all variables and code to the default run-time code and frame?

View 3 Replies

ActionScript 3.0 :: Load File Swf & Reset Button?

Apr 16, 2011

I want to load and unload the swf file, swf first. I want to move movie? How do I make the reset button all the actionscript so that when the file ends it resets all the variables and code to the standard run-time code?

View 1 Replies

ActionScript 3.0 :: Bg.reset() Can Only Find Reset Used For Timers?

Dec 28, 2010

reset in google yields only its use for timers.However I have code bg.reset() which I suppose puts the background back to the beginning of its timeline.

View 3 Replies

ActionScript 1/2 :: Making A Button To Reset A Flash File?

Aug 19, 2010

Is it possible to make some kind of clickable object that resets a flash file? Say you're in a game and your character gets killed. By clicking on a button you you're taken back to the start of the flash file and all the variable reset to their starting positions. Basically I just want to make a button that reloads the flash file the same as hitting the reload button on your browser (except that it just reloads the flash file and not the entire web page).

View 3 Replies

ActionScript 2.0 :: Can Several SWF's Talk To Each Other

May 12, 2011

I would like movie C, to be the "bully"and order movie B to load itself into the highest layer of movie A.can one movie control the fate of an another movie, and tell it what to do ?I've tried many variations loadmovie and targetting...no luck !

View 5 Replies

ActionScript 3.0 :: Talk To A Swf Inside A Swf?

Dec 7, 2009

I have a preloader.swf that loads index.swf I want to be able to have some actionscript inside preloader.swf that tells index.swf to gotoAndPlay(2);Is there a way to do this. Basically I don't know how to talk to the swf inside the swf, meaning I don't know what the path would be like.This is what my actionscript looks like right now:

Code:
var req:URLRequest = new URLRequest("index.swf");
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, fileLoaded);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, preload);

[code]....

View 1 Replies

ActionScript 2.0 :: Control One Loaded SWF File From Another Loaded SWF File

Feb 7, 2005

Is it possible to control one loaded SWF File eg.(MOVIE-1.swf) from another loaded SWF file eg.(MOVIE-0.swf) on a different level? eg. with a syntax like:

onRelease
_MOVIE-1.SWF.gotoAndStop (4)
or:
onRelease
gotoAndStop (MOVIE-1.swf, frame4)

View 1 Replies

ActionScript 3.0 :: How To Check If Child Loaded Or Not

Apr 15, 2009

I am building a website in which the nav bar has an animation on the "home" frame and not on the others. It works all nice until I come back to "home" and then my nav bar bugs. So I am thinking the best way to "refresh" the nav bar would be to removeChild(); and then add it again... but then when I go to the other frames (pages) it disappears. If I run addChild(); to every pages.. then it duplicates it and becomes buggy. Is there a way to run an if() function that would check if the nav bar is already there and addChild only if it is not there?

View 2 Replies

ActionScript 3.0 :: Control SWF Loaded As A Child Of MC?

Aug 18, 2009

I've loaded an external SWF into an empty MC named "M1" using this[code]...

Now I want to control the timeline of the external SWF from the main movie timeline. How do I reference the child of the M1 object in AS3? example: M1.child.stop(); (doesn't work of course).

View 1 Replies

ActionScript 3.0 :: Movie Clips Talk To Each Other?

Jun 4, 2009

Basic scenario:Two movie clips with instance names- words_mc and examples_mc on the stage.When words_mc gets to Frame 35, I want to it to tell examples_mc to move to a particular named frame within examples_mc.The frame in examples_mc is named strawberry.On Frame 35 in word_mc, I've placed:examples_mc.gotoAndPlay("strawberry");I'm getting an error:1120: Access of undefined property examples_mc.

I've tried:
this.parent.examples_mc.gotoAndPlay("strawberry");
I've tried:

[code].....

View 2 Replies

Flash :: Why Can't Get Javascript To Talk To ActionScript

Feb 9, 2010

I have a very simple flash program that plays music. It consists of a play pause button and a timer that shows the current position of the song. I'm trying to make it possible to pause or play the song using a regular form button.

[Code]...

When I click the button, Firefox's error console says "Flash is null" What am I doing wrong?

View 4 Replies

Asp.net Mvc :: Use A Flash Front End To Talk To ASP.NET MVC Controllers?

Feb 2, 2011

I guess flash can talk to web services, but can one use Flash/Flex in web pages to post back to MVC Controllers (other than via javascript)?

View 1 Replies

Javascript :: Use Flash To Talk To The Socketserver?

Feb 4, 2011

I am working on a chatting app that makes use of flash sockets. I don't want to code the entire interface in flash, so I was hoping to just use flash to talk to the socketserver and call js to modify the dom.

View 2 Replies







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