ActionScript 3.0 :: Communicate To A Child In Different Frames?

Jul 8, 2010

I have no clue on how to reference to different childs in a movieclip on different frames. Let me explain the situation:

I have a movieclip containing different views of a car distributed on frames. On these frames there are targets that must respond when clicked (the position of the targets vary from a frame to another) I can only reference to targets on the first frame.

ex: Movieclip.target1.addEventListener(MouseEvent.CLIC K, showPart)

how can I communicate to the targets on the other frames of my Movieclip ?

View 4 Replies


Similar Posts:


IDE :: Get Child Swf To Communicate With Main Swf?

Feb 2, 2009

how do I get my child swf to communicate with my main swf?

(this is main1.swf)
var homeRequest:URLRequest = new URLRequest("window1.swf");
var homeLoader:Loader = new Loader();

[Code]....

Obviously, MovieClip(root) is not getting to the main.swf's root timeline. What code do I need to do this?

View 1 Replies

ActionScript 2.0 :: [CS3] Parent And Child Communicate?

Feb 14, 2011

I've made a big pretty website. So big and so pretty that it takes more than two minutes to load. I figured I could make it smaller by breaking it up into separate swfs and loading them into a holder as required, but I have no idea how to make them talk to eachother. I'll give a basic example.So, i've loaded up my movie into the holder movie with:loadMovie("page1.swf","page1MC");and in page1.swf there is a button called "page1_buttonA". In the old giant overweight site, onRelease it did a gotoAndPlay, but now I would like it to load the next part excitingly named page2.swf. For my own sanity's sake I'd like to keep the most of the code controlling all the to-ing and fro-ing in the holder movie. So, what's the format (syntax?) for getting the holder movie to notice what happens in the child movie and getting it to react accordingly?

//button that loads page 2
page1MC.page1_buttonA.onRelease = function() {
_root.createEmptyMovieClip("page2MC",2);

[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 :: Add Child To Specific Frames?

Sep 16, 2009

I have a need to add an object to the display list at a specified frame number. Something equivalent to addChildAtFrame(mc, 100).

I know I could achieved this by creating a layer within the fla, making a new frame at the desired location, and placing a blank movieclip within the frame in order to have a target displayObject to addChild to but I would prefer to do this via code.

Is there anyway to accomplish this dynamically?

View 2 Replies

ActionScript 3.0 :: Remove Child From Other Frames?

Aug 12, 2011

I have a slideshow that you can click to go to various frames with different images. I'm doing this with a loader. Problem is, once you click on a button and the image loads, the image stays there when you go to a different frame and different image. I've tried removing the child at the beginning of a new frame, but that doesn't seem kosher. I know this code is not the cleanest it could be, but bear with me.

View 2 Replies

ActionScript 3.0 :: Remove Child If It Exists After Xxx Frames

Feb 28, 2011

I have been through many threads and none have helped. I am trying to remove a child if it exists. I am clicking on the button and sometimes there is no other child loaded. I want some code that looks to see if a child is loaded and then if so unloads. There are going to be at lease 5 possible .swf files loaded. [code]

View 1 Replies

ActionScript 2.0 :: Parent / Child MovieClip - Nested Frames And GotoAndStop

Dec 2, 2011

I have a very specific AS2 parent/child movie clip issue. I have a main Character movie clip which contains as nested frames each profile of the Character (front,back,left,etc). Within each of these child profile MC frames, animations for those profiles are further nested in frames. Then, essentially I have movement code as part of the key listener:

Code:
switch(Key.getCode()){
case 87:
Character._y -= 10;
Character.gotoAndStop('Back');
Character.gotoAndStop('walk');
break;
[Code] .....

And later code to reset to the character's resting frame after key release:
Code:
switch(Character._currentFrame){
case 5:
Character.gotoAndStop('Back');
break;
[Code] .....

The problem is that when I try to Character.gotoAndStop('Front'); after key release, flash thinks, you're already on the Front frame (because the walk animation is a child of that MC and is already playing). Therefore the walk animation just keeps playing after the key has been released.

View 1 Replies

ActionScript 3.0 :: Multiple Buttons To Open Child Swfs Then Be Able To Close The Child From Within The Child?

Mar 25, 2009

I have a picture on the stage that has multiple items that have hotspots/links over them that should open a child swf on top of the background and show details about the items. then have a button in the child swf itself that removes the child from over the background so the user can click on another item etc.I found this code in someone's post and I am trying to modify it so that works for multiple swf files...it currently works for a single swf.I wan to pass the name of the button in front of the .swf in the URLRequest to have the same name as the instance name of the referring button. But I can't figure it out. Here is the code I am using on the stage

View 2 Replies

IDE :: Create A Preloader That Plays A Certain Amount Of Frames As It Loads The Rest Of The Frames

Nov 16, 2009

I want to create a preloader that plays a certain amount of frames as it loads the rest of the frames. So, I have labels on the frames basically and need a preloader to play the "loading" frames as it is loading the "content" frames. Does that make sense? I have no idea how to even start this one... p.s. I am using AS 2.0, but if it can be done in 3.0 easier, I can switch over its no biggie

View 4 Replies

ActionScript 3.0 :: Putting Multiple Instances Of The FlvPlayback Component In Different Frames And Using Buttons To Navigate To Frames

May 2, 2011

there seems to be no accepted method of playing multiple flv using buttons. My latest attempt has me putting multiple instances of the flvPlayback component in different frames and using buttons to navigate to those frames. It works but nothing anyone has posted anywhere will result in removing the flv when you go to a different frame and instance. This was simple in AS2. Load movie to a traget and each time you load a new movie the other one goes away. REALLY goes away.

View 7 Replies

ActionScript 2.0 :: Move Frames Within A Movie Clip With Buttons On Other Frames?

Nov 24, 2011

basically im making a quiz on my main timeline ive got my questions and answers and on the last frame i want it to say how many answers the user got right. ive made a movie clip on this last frame. in the movie clip ive got 11 frames with the posible totals so frame one would be 0/10 frame 2 would be 1/10 etc what i want to do is when the user clicks the correct answer on the other frames i want flash to make the frames within the movie clip to go 1 step forward.

View 2 Replies

Count Frames - Perform Action Every 12 Frames

Mar 26, 2009

I have a function that counts days and some other variables and displays the values via dynamic text.

[Code]...

I have to place the incrementCount(): function every 12 frames so that it increments the values. Seems like it would be easier to simply modify the script to count "every 12 frames" but I can't find anything that tells me how to "count frames" in flash. Seems to be this is probably basic but I've searched unsuccessfully....so how do you do this. How do I get my script to work so it's frame based so I don't have to put incrementCount() every 12 frames?

View 16 Replies

ActionScript 3.0 :: Have A Movieclip Of About 50 Frames And Navigate Between These 50 Frames?

Jan 7, 2010

Is it possible to have an movieclip of about 50 frames and navigate between these 50 frames? As if u put a marker on frame 10 and one at frame 30 and if u use a button it plays to frame 10 and stops and use another button to go from frame 10 to frame 30 and stop... and reverse if u use the earlier button.

View 5 Replies

ActionScript 3.0 :: Communicate To C/C++ Dll Or Lib?

May 25, 2010

We are developing a Flash application based on Windows CE 6.0 R3 and the application is intended to work with Adobe flash plug in available in WinCE R3 Internet Explorer. Application need to communicate with middleware libraries written in C/C++. Flash screens uses Action Script 3.0. We would like to know how a Flash application (Action script program) can communicate with a native (C/C++) dll/lib?

View 1 Replies

C++ :: Communicate Between It And Flash?

Mar 18, 2011

Is there any way I can have an integration between Flash AS and C++? Let's say I have created a socket using C++ and multi-casting it to several ip addresses.

On one of the IPs I am running a Flash client. Can I receive the Multicast message (sent by MFC/C++ application) through my Flash application.

Or at least can I develop a Flash plugin (menu item) using C++?

View 1 Replies

Actionscript 2.0 :: Communicate From One SWF To Another?

Feb 18, 2009

The Flash site I am building includes an FLV video which is embedded into a SWF (SWF1),which contains the video control components. SWF1 is in turn loaded into another SWF (SWF2) after SWF2 is launched. After I leave the part of SWF2 which contains the video, the video and audio continue to play. You can still hear the audio after you have moved away from the SWF1 video.The SWF1 video is part of a set of mostly PNG images that slide like a slide show along the X axis. When I hit the forward arrow, the SWF1 video slides out to the left and a loaded PNG image slides in from the right and into view. But you still hear the audio from SWF1 and the video continues to play.All of the loaded SWF video (there are three total) and PNG images are loaded into the same movie clip.Question: How can I tell the FLV video embedded in SWF1 to stop playing once SWF1 has moved out of view? I would like SWF2 to tell SWF1 to stop the video.

View 2 Replies

ActionScript 2.0 :: Loading Many Swf (30 Swf) In Frames (30 Frames)

Jan 8, 2010

I want to preload all of the voiceover swf files before a lesson starts so that they are instantly available when each frame / page that incorporates a voiceover is first visited.

View 4 Replies

Flex :: SWFLoader - Child Apps Couldn't Access Certain Objects That Were Instantiated By Another Child App?

Aug 23, 2010

i have problem with swfLoader in flex, when i close following code in click method i can easly add many swf to main application

<mx:VBox id="content" width="100%" height="100%" ></mx:VBox>
public function doIT():void
{[code]....

when i close adding those swfs in loop i have the same error, it looks like child apps couldn't access certain objects that were instantiated by another child app, so what can i do?

View 1 Replies

ActionScript 3.0 :: Can't Swap Child For New Class Instance IF Child Is Exported For Action Script?

Aug 18, 2010

I have a movieClip with one frame on the timeline containing one child whose instance name is "myContent"I am using this function to swap "myContent" with any number of possible class instances.

Code:
function setContentAsClass(c:Class)
{

[code].....

View 2 Replies

ActionScript 3.0 :: Flash Selecting A Specific Child By Mouseclick, Turning Off A Child Within All Non Selected?

Mar 19, 2011

I've used this site as a resource leading up to this, not particularly sure if I worded this correctly I have a class "Block" which is just a square (will be something else later on in the process) I want each block to have controls to add an additional block in either direction so I have another class BlockButtons which has my buttons for each direction.

And another class GlobalVar where I keep all my variables for funsies

[Code]...

View 1 Replies

Flex :: ViewStack.addChild Adding Multiple Child And Only The Last Child Is Visible?

Mar 10, 2010

var viewStack:ViewStack = new ViewStack();
viewStack.percentWidth = 100;
viewStack.percentHeight = 100;

[Code]....

Its only displaying canVas3 contents not canVas1 and canVas2

View 1 Replies

Flex :: Viewstack - Navigate To The Second Child During Onclick Of A Button Present In The Second Child?

May 10, 2010

I have a component mxml file in which i have a view stack, on click of a button i navigate to the first child, now i need to navigate to the second child during onclick of a button present in the second child. All the childs are component files included within the view stack. How could this be done, Sample code is present below,

[code]...

Now in my offering.mxml file if i try to access navigationViewStack i am getting an error stating 'Access of undefined property navigationViewStack.

View 3 Replies

ActionScript 3.0 :: Access Child Vars/functions Without Adding Code To Child?

Mar 11, 2010

I've seen some discussion on how to load a child swf using swfLoader and accessing it's variables but I am wondering if it is possible to do this without adding any code to the child swf.Either accessing public vars or listening for funciton calls would work fine

View 2 Replies

Actionscript 3 :: Remove A Child At A Point - Error #2025: The Supplied DisplayObject Must Be A Child Of The Caller

Dec 14, 2010

i'm new to AS3 and i was wondering what is the best way to remove a child at a point. i tried Holder.removeChild(Holder.getObjectsUnderPoint(new Point(exampleX, exampleY))[0]); however that returned ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.

View 2 Replies

Child Of Child Movie Clip Are Null In Imported Object From Flex To Flash Right After Being Created?

Dec 16, 2010

I have an Movie Clip in Flash that have subobject of button type which has subobject of input text and movie clips. Right after creation core Moveclip all subobject are set to null, when I expect them to be valid objects.

[Code]...

MC_Core_design was created in Flash and exported to Actionscript. I've done this for button_1 class aswell. The code was written using Flex. When I comment out both lines that result in error I get correct view of the core Movie clip with all subobject. How can I set subobject properties right after object creation?

View 2 Replies

ActionScript 3.0 :: Communicate Between AS3 And Embedded AS2?

Feb 28, 2009

I'm working on a game where the the engine is made in AS3, yet the interface is made in AS2. Basically I am embedding the GUI as a AS2 .swf into my main AS3 .swf. I want the AS2 GUI to be able to communicate with it's parent. Small Interface calls like Pause, Unpause, Upgrade.I tried to use External Interface, but I can't seem to get it to work. I know it's made for Javascript, but I thought that it would work just as well with AS2 to AS3.I'm able to edit the Interface file and have the FLA for it. It'd just be a real pain converting it... It'd take way to long to convert the FLA to AS3, talking weeks here, it's rather large.

View 3 Replies

ActionScript 3.0 :: LocalConnection - Communicate From One SWF To Another

Apr 23, 2009

I'm having a little issue with LocalConnection - trying to communicate from one SWF to another. From my main SWF I've loaded an external SWF of same dimensions ( effectively replacing the main SWF). What I wanted was then to re-load the main SWF, but rather than have the main SWF play from the start, I wanted to go to a specific frame instead (I used a frame label called "myMarker"). Thought LocalConnection was the way to go to achieve this. Gave it a shot and it all works well locally BUT when uploaded to server it doesn't work, but throws the following error:-

[Code]..

View 1 Replies

ActionScript 3.0 :: How To Communicate With Embedded SWF

Mar 12, 2009

I have a large.swf that loads small.swf during the runtime. How do I call a function in small.swf from large.swf and vice-versa?

View 4 Replies

How To Communicate Between 2 SWFs In Separate PCs

Aug 5, 2009

I was able to use LocalConnection to have 2 swfs communicating when both sitting in the same PC, or upload those on to the server and accessing those from the same PC. Is there any way to do this between two PCs, one PC running send.swf, controlling another PC running receive.swf? I checked adobe site for LocalConnection and it looks like this only works within one client PC.

View 2 Replies







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