ActionScript 3.0 :: Controlling Loaded SWF Inside A Child?

Oct 19, 2008

I have loaded a SWF and attached to a MovieClip which exist in my current movie using the following code, and now I just want to access the loaded SWF to send it orders like play() or gotoAndPlay(); I have tried also: container= MocieClip(loader.content); instead adding child, but it trhows an error

View 10 Replies


Similar Posts:


Loaded Child Movie Controlling Container Parent

May 14, 2009

i'm a designer trying to step up my flash skills and have a scripting problem that's causing me trouble. essentially i have a child swf loaded into a container in a parent swf and want the child to be able to instruct the parent. to explain in full, the child contains an flv with bespoke video player components. it's container sits in one frame of the parent. when the flv finishes playing, i need the parent swf to move onto another frame.
as it's a controllable flv, it isnt possible to predict the exact length of time the child will need to be present, so it literally needs to tell the parent it's finished playing at that very point.

[Code]...

View 9 Replies

ActionScript 3.0 :: Accessing A Child Inside A Child Inside A Child?

Nov 23, 2011

mHook -> mBottom -> hItemButton -> itemButton[a] -> itemButtonExp[a]

so i press another butoon, and retrieve a number 2, how do i access itemButton[2].itemButtonExp[2]? Coz i need to change the text field in there?

in AS2 i can access it directly by changing itemButtonExp[a].text, but how do i do it in AS3?

View 3 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

AS3 :: Image - Add A Child Inside A Newly Created Instance, Inside Of A Loop?

Feb 2, 2005

I am trying to create a gallery where each thumb is housed inside of it's own movie clip that will have more data, but it keeps failing because it won't let me refer to the newly created instance of the movie clip. Below is what I am trying to do.

var xml:XML;
var xmlReq:URLRequest = new URLRequest("xml.xml");
var xmlLoader:URLLoader = new URLLoader();

[code]....

View 2 Replies

IDE :: Controlling An FLV Component In A Child?

Nov 17, 2009

I have been trying all day to find a solution to this, to no avail.. My project has a frame built in flash that loads an external swf via the addChild command. In that external swf, there is an FLV playback component that plays videos on the video tab. (There are home, video, web and contact tabs all in the parent swf) What I want, is for the FLV component to stop playing the video when one of the other tabs is clicked in the parent swf..

View 2 Replies

AS3 :: Add A Child Inside A Newly Created Instance, Inside Of A Loop?

Jun 6, 2010

I am trying to create a gallery where each thumb is housed inside of it's own movie clip that will have more data, but it keeps failing because it won't let me refer to the newly created instance of the movie clip. Below is what I am trying to do.

var xml:XML;
var xmlReq:URLRequest = new URLRequest("xml.xml");
var xmlLoader:URLLoader = new URLLoader();

[Code]....

It dies every time on that last line. How do I refer to that vidThumbn instance so I can add the imageLoader? I don't know what I'm missing. It feels like it should work.

View 2 Replies

ActionScript 3.0 :: Controlling Object From Child .as File?

Jan 24, 2010

If I import pgming from one AS into an overall one like this:
 
import asFiles.slideshow.*;
public var slideshowAS:Slideshow;
//then later:

[code]...
 
how do I control one object that is within that child .as file from the parent .as file?so for instance if in the slideshowAS there is an item called "nextBtn" and I want to be able to do something with it in the parent main menu .as file.

View 15 Replies

ActionScript 3.0 :: Controlling Object From Child .as File

Jan 24, 2010

If I import pgming from one AS into an overall one like this:

[Code]...

how do I control one object that is within that child .as file from the parent .as file? so for instance if in the slideshowAS there is an item called "nextBtn" and I want to be able to do something with it in the parent main menu .as file. If you could even direct me on what to search under I that would be very helpful! I tried googling it but did not know how to search for it.

View 2 Replies

ActionScript 3.0 :: Controlling Movieclip From Main Timeline & Child?

Sep 26, 2010

This code is currently contained within my "mc_1" movieclip. I want to be able to have this code on my main timeline, however no matter what I try I constantly get errors, multiple different versions. I've tried adding mc_1 infront of everything, but that just gives an output error about a Sprite.Also, I'm currently using visible to control whether the back image to the textbox should show - What I'd really like to do is control it using a child, but they're movieclips not buttons, so when I try to addChild within the function it errors saying I'm trying to control a movieclip within a simplebutton function.

import flash.events.MouseEvent;
stop();
mc_textbox.visible = false;

[code].....

View 12 Replies

Flex :: Controlling The Properties Of A Sprite's Child Sprites?

Dec 23, 2009

I have a sprite in which I have added other sprites. Something like:

var sp_main:Sprite = new Sprite();
var sp_group:Sprite = new Sprite();
for(i:int = 0; i < 10; i++)

[Code]....

View 1 Replies

ActionScript 3.0 :: Controlling Labelled MovieClip On Stage From A Child .as File

Jun 20, 2009

I have an FLA file with a movieclip on the stage which is labelled "blok", and a button on the stage labelled "button1". This FLA is attached to a file called main.as through the document class.

In the same folder where I am storing main.as I have a second .as file called secondFile.as. I have imported this class into main.as using: import com.tests.secondFile;

and in the constructor of main.as I have put:

loadB=new secondFile(button1);
addChild(loadB);

Within secondFile.as my constructor looks like this:

public function secondFile(button1:SimpleButton){
button1=button1;
button1.addEventListener(MouseEvent.MOUSE_DOWN, buttonPushed);
}

[Code]....

Basically I'm trying to get the MovieClip labelled "blok" to move by 50 pixels on the stage when button1 is pressed, but when I test my FLA I get the following error:

1119: Access of possibly undefined property blok through a reference with static type flash.displayisplayObjectContainer.

I would have thought that this.parent.blok would control my movieclip labelled blok on the stage of my FLA from within secondFile.as since secondFile.as is a child of main.as which is the document class of my FLA, but obviously this is not right.

how to access labelled items on the stage from within a child object.

View 6 Replies

ActionScript 3.0 :: Controlling Child Frame While Parent Playing/TWEENING?

Feb 14, 2012

I have a MovieClip named "all_Pages" inside of it has timeline tweening on its child "pg" which has sets of pages as child of pg on framesHere is the problemI am trying to execute the code written on all_pages first frame which is 6th frame

all_pages.pg.gotoAndPlay(6);
while executing all_pages.gotoAndPlay(1); // timeline tweening
i.e

[code].....

View 7 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 2.0 :: Controlling MC Inside One MC From Within Another MC?

Aug 6, 2010

I have three buttons I have built as MC's. In each on the MC's timeline I have another MC's with instance name voted01_mc, votecd02_mc, and voted03_mc, respectively. And each of the MC Buttons have instance names Q01_btn, Q02_btn and Q03_btn.

I would like to find a way to control the "visibility" of a movie clip inside one movie clip from inside another MC. I am sure there is a way to do this such as:

Q02_btn.voted02_mc._visible = false;
Q03_btn.voted03_mc._visible = false;

if the MC I wanted to make invisible was on main timeline I would do something like:

root.voted02_mc._visible = false;
root.voted03_mc._visible = false;

SO this would be inside Button MC 01 making the MC inside 02 and 03 invisible.

View 3 Replies

IDE :: Using And Controlling The JW Player Inside Of Another .fla?

May 23, 2009

I've looked over thier website quite a bit and there is no clear method to get what I want to do working.I'd like to take this JW video player I've configured:

[URL]

and put it as the player for this

[URL]

I've tried a bunch of different methods but I just can't get it working on a blank .fla, let alone mine.

View 1 Replies

ActionScript 2.0 :: Controlling SWF Inside A SWF?

Sep 29, 2011

I have a SWF that is 300x250 and needed to be resized to 336x280. There were a lot of elements to work with and the resulting SWF needed to be less than 40 kb (my starting SWF was 35 kb). To make things as easy as possible I created a stage and background of 336x280 then imported the SWF into the library and centered it. The result fits the correct dimensions without having to resize every element in the original SWF and I was able to come in under 40 kb.The problem is that I need to control the number of times the movie loops. I tried to do this using the following code on the centered movieclip (instance name smallOne):

Code:
onClipEvent(load) {
if (!loopCount) {

[code].....

View 3 Replies

ActionScript 3.0 :: Using And Controlling The JW Player Inside Of Another .fla?

May 23, 2009

I've looked over thier website quite a bit and there is no clear method to get what I want to do working. I'd like to take this JW video player I've configured:[URL]I've tried a bunch of different methods but I just can't get it working on a blank .fla, let alone mine.

View 8 Replies

ActionScript 2.0 :: Controlling Swf Inside Of Scrollpane?

Jul 6, 2010

I'm using a scrollpane for a loaded external swf file. Scroll works fine but I want to add exra buttons to control the file such as size and position. If this is regular movie you can simply add the instance name and call it but in this cane since it's inside of component I don't know how I can reach it... The component is named "mySp" and the loaded swfg file is called "photography.swf" which I set it up in parameters tab under "contentpath"

View 1 Replies

ActionScript 3.0 :: Stop Inside Frame Not Working When Loaded Inside SWf

Mar 1, 2011

I have a flash code where i am loading an AS 2 SWF inside AS 3. The thing is if i put the AS 2 SWF on same domain its working fine but if i put AS 2 SWF on different domain it loads the SWF properly but the "stop()" written inside the AS 2 frame doesnt work... and it keeps on playing all the frames continuously...

[Code]...

View 9 Replies

CS3 Controlling Timeline Backward And Forward Inside Movieclip?

Aug 12, 2009

Im trying to produce my online portfolio but for that i need to play movieclips backward and forward to various frame numbers.I found a very good script (as2) and it works great in the main timeline but inside a mc it doesnt work at all. this is the script

1. Call to Action Create an actionscript layer that extends the full length of your movie. In that layer, include the following actionscript:

function Movement() {
if (_root._currentframe > _root.mytarget){
prevFrame();

[code]....

Using the code above, the movie will play either backwards or forwards to the desired destination.As i said before this script is great but it doesnt work inside an mc.

View 3 Replies

CS3 : Controlling Timeline Backward And Forward Inside Movieclip?

Dec 6, 2009

Im trying to produce my online portfolio but for that i need to play movieclips backward and forward to various frame numbers.I found a very good script (as2) and it works great in the main timeline but inside a mc it doesnt work at all.this is the script

1. Call to Action Create an actionscript layer that extends the full length of your movie. In that layer, include the following actionscript:

function Movement() {
if (_root._currentframe > _root.mytarget){
prevFrame();

[code]....

Using the code above, the movie will play either backwards or forwards to the desired destination.As i said before this script is great but it doesnt work inside an mc.

View 1 Replies

AS3 :: Buttons Controlling Timeline Not Working Inside MovieClip?

Feb 25, 2011

This is my first time coding a website using ActionScript. So far everything has went very well, I designed the website in Photoshop, and imported to Flash CS5. Then I cleaned everything up, and started adding navigation to the various pages using buttons.The website is constructed in a very simple manner, there are five main pages and they are connected by buttons on a static navigation bar (the first page, home, doesn't have a corresponding button). Then there are nine sub pages, that each contain information on a character of the game, and are connected to corresponding buttons in the 'Character' layer/MovieClip. My four menu buttons (Story, The World, Characters, Extras) all navigate correctly without problems.

The problem arises because inside my Characters page (a movie clip) are nine buttons, each linking to a different page. These buttons should bring the timeline to the frame specified, but when the buttons are clicked nothing happens. I've spent hours searching for a solution to this, but with no avail, and I have a feeling the answer is prettysimple.gotoAndStop("gowang", "Scene 1");line in the Gowang character button function with:MovieClip(root).gotoAndStop("gowang");

View 3 Replies

ActionScript 2.0 :: Controlling Buttons Inside MC's From Root Timeline?

May 8, 2008

I have a Nav Bar on my _root timeline. Inside of which I have buttons and MC's. I want to have all the code for my buttons on the _root timeline. So, I can adjust from there.

Below is an example of what I'm trying to do from the _root timeline Actions Layer:

Code:
// ------ NAV BAR ON MAIN STAGE -----------------------------------
// ------ Instance Name = NavBar ------------------------------------
// ------ Button inside of "NavBar" = MyButton ----------------------

[Code].....

View 8 Replies

ActionScript 2.0 :: Controlling Speed/movement With Inside A Loop?

Jul 26, 2007

I am currently working on a Flash application in which I have several vertical bars that go across the window, and when one of the bars is clicked on, the others move to either the left or the right to create space to the right of the selected bar for a large image.[URL].. I have already written enough of the script to get the bars to move to where they should be when they are clicked on, but they do it instantly--there is no show of movement between point 1 and point 2 (this being the starting and ending x coordinates for each movieclip).

If you're wondering about any of my number values, they are the way they are because the document is 800 wide, it has 5 vertical bars within it, each of them 30 wide, and the bars are 5 pixels apart when placed next to each other. Anyways, here's the script I am currently working with:

[Code]...

With this code, all the speed variable does is determine the length of the pause before the bar goes from its original x coordinate to its final x coordinate. I have tried to replace the line that reads "clip3_mc._x += speed;" with several variations ("clip3_mc._x ++;" , "clip_mc._x = clip_mc._x + 15"), but I don't think that's the issue.

View 1 Replies

Actionscript 3 :: Controlling The Mc's Of A Loaded SWF?

Apr 26, 2010

I have a controller.swf which loads an external swf into a movieclip.

news_mc = loadEvent.currentTarget.content as MovieClip;

the swf is called "news.swf" and has a movieclip on the maintimeline, frame 1 called "sb".

I have tried everything to access this such as

mews_mc.sb.alpha = 0;

but nothing works?

View 1 Replies

ActionScript 3.0 :: Controlling The Loaded SWF?

Jan 20, 2010

I'm loading a SWF into a main SWF using the code bellow, from senocular tutorials:

Code:
var request:URLRequest = new URLRequest("home.swf");
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);

[code]....

I have buttons inside a movie clip, at the main movie (parent) and I want to control the home.swf movie that I just loaded. How can I do that?I'm trying this, without any result:

Code:
function botao_clique(e:MouseEvent):void{
MovieClip(root).window_mc.textos_mc.gotoAndStop(2);
}

View 4 Replies

Actionscript 3 :: Controlling External Swf(Scenes, Frame) Inside Main Swf?

Jan 8, 2011

Am gonna create an encyclopedia program, consist many of Chapter. I have difficulties about controlling external swf inside my Main swf. This is my Main.as in Actionscript 3

public class utama extends MovieClip {
var loader:Loader;
var urlReq:URLRequest;[code]........

Am using eksternal page as a Chapter, and A Chapter consist of many Pages (it using Scene)
For an example :

Chapter 1 --> Page 1 it will be represented as hal1.swf-->Scene 1
Chapter 1 --> Page 2 it will be represented as hal1.swf-->Scene 2

Now, How to control it, I still didn't get it ??

View 1 Replies

ActionScript 2.0 :: Controlling A Movieclip Inside A Swf Seek,play,pause Etc?

Jul 24, 2009

how to add like a youtube type control bar into a swf to control a movieclip inside the swf so i can add any movie clip in and change a few varibles and still have the whole thing self contained inside the swf. I have been looking for about 2 hours now and i cant find any info on what im looking to do has

View 2 Replies







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