ActionScript 3.0 :: Accessing Buttons On Externally Loaded SWF

Feb 22, 2012

I have loaded an external swf into loaderTopBanner. It works to manipulate that, but not the individual buttons within it. (e.g. btn_Home, btn_Info)
loaderTopBanner.btn_Home.alpha = 0;

View 2 Replies


Similar Posts:


IDE :: Accessing Library Of Externally Loaded Swf?

Jan 17, 2010

I have a swf file which contains in its library couple pictures. After it is loaded using preloader I would like to be able to create couple instances of them and add them to the stage

If I use swc approach and import it in library path I can not preload it but instancing is very simple i.e

Code:
public var pic:Pic1 = new Pic1();

and that's it, I can add it then to stage then.

How to access them when doing it with swf and loader class?

View 1 Replies

ActionScript 3.0 :: Air 1.0, Externally Loaded SWF Accessing Camera

Jan 21, 2011

I am building a touch screen kiosk Air App using Flash CS3 and Air 1.0.
 
I have my application downloading external SWFs for different advertisements, one of which will need access to the webcam built into the kiosk.
 
By itself, the advertisement accesses the camera just fine, however Camera.getCamera() returns null when it the SWF loaded into the kiosk app. Both the main kiosk app and the advertisement app are compiled using Air 1.0.
 
It appears that I'm getting a security sandbox violation, however I'd like to avoid completely rewriting my app using the sandbox bridge architecture just so one of my ad pieces can access a webcam.
 
Does anyone have any suggestions or know of any work-arounds for allowing webcam accesss from within an embedded SWF in Air?

View 1 Replies

Accessing A Class From An Externally Loaded Flex SWF?

Apr 23, 2011

Using Flex 4, I have created an SWF that has the following code:

<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
import com.Index ;
protected function start(event:FlexEvent):void

[Code]...

View 1 Replies

ActionScript 2.0 :: Accessing Movieclips In Externally Loaded .swf

Aug 10, 2009

I am a newbie to AS 2.0..I only have basic actionscript 2.0 knowledge."I have one main .swf file and several external .swfs which I am loading through this code.[code]Now my problem is that I would like to access one "close_mc movieclip" in ourGroup.swf ...so that clicking that clip, I can exit the externally loaded .swf from the main .swf file."

View 3 Replies

ActionScript 3.0 :: Accessing Stage Of Externally Loaded Swf?

Jul 22, 2009

I am loading an SWF created in Flash CS4, using the 3d translation tool.The SWF is being loaded into an application being build in as3 in flex builder 3.I can manage to load the movie however the stage has disappeared. All of the objects that exceed the boundaries of the (banner) remain visible instead of being cropped by the stageI attempted to mask the swf before publishing which did not work, and I attempted to programmatically assign a mask once it was imported which also did not work.None of these options threw errors, in most cases they either had no effect whatsoever or the movie simply disappeareI've read numerous posts on this and the answers always seem to be vague.Based on my research I need to access the stage properties of the SWF being loaded, but am unsure how to go about it.Do I need to compile the movie, export a swc and add it to the build path for the project?Do I HAVE to use a document class for the SWF I want to load in order to access it?Do I need to add anything else to the source or build path for the project in Flex Builder?

View 5 Replies

ActionScript 3.0 :: Accessing Properties For An Mc In An Externally Loaded Swf?

May 24, 2010

I am trying to set a couple of properties (specifically width and height) for an mc within an externally loaded swf but am having bigtime troubles. Keep getting the 'Error #1010: A term is undefined and has no properties'. The code is attached below. I have tried to figure this out and searched for solutions but could not resolve this myself.

import flash.display.MovieClip;
import flash.display.StageAlign;
import flash.display.StageScaleMode;

[code]......

View 1 Replies

ActionScript 3.0 :: Accessing Parent Variables In Externally Loaded Swf?

Jun 24, 2009

here's what I have (simplified to only show necessary code):

Main Timeline:
var currentItem:String = 'applesauce';
(then some code to load an external swf)

[Code].....

View 1 Replies

ActionScript 3.0 :: Accessing Document Class Of An Externally Loaded Swf With AS3

Aug 5, 2010

I have loaded one swf externally in my main class. and there is one button in loaded swf suppose its name submit_btn. i have to do that when i click on submit_btn, this loaded swf should be removed. what is the code for that

View 1 Replies

Actionscript 3.0 :: Accessing Library Items From An Externally Loaded SWF?

Aug 11, 2009

I'm slowly working my way through AS3, and have a question about how to do this. In as2, you could just load a swf file, then use attachMovie("itemLibraryLinkageName");. I know in AS3 you have to use addChild() to add items to the display list, but how would you go about adding the library items to the stage from an externally loaded swf in AS3? I've tried:

Code: Select allvar library:MovieClip;
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);[code].......

View 2 Replies

ActionScript 3.0 :: Accessing Superclass Methods On An Externally-loaded SWF?

Jul 27, 2009

I'm trying to set up a large project that has a "shell" application that preloads and eventually displays a bunch of SWFs as a "slideshow". Each SWF could be authored by different people but will reference a base document class so they exhibit consistent behaviour. One of these behaviours is to be able to localise the slideshow into different languages. Since each SWF could have a different number of textfields that need to be localised embedded into their main timeline, the SWFs each must declare their stage instances in their document class. In order to implement the common functionality (such as a "localiseText()" method), I have decided to package all common functionality into a superclass (what I'm calling "Base Class" in this example) and using a subclass as each slide's document class.

This Example:This is a simple example I set up because in my actual project my compiler was throwing a coercion error when I tried to cast the Loader.content as my external class. The structure of this example is the following:

+ loader.fla : this is the main "shell" application.
+ SWFLoader.as : the Document Class for loader.fla
+ external_1.fla : this is the external SWF file that will get loaded and displayed

[code]....

I've set it up this way because a hypothetical external_2.fla might have different public variables to declare its stage instances so would need a separate implementation of ExternalBase (presumably External2.as).

The code (in reverse):

base/ExternalBase

[code]....

This just sets up the localiseText() method which is used in this example to change the contents of the text field. Since we don't know the name of the text field in the particular slide's timeline, we have to ask for it from the subclass' implementation of getLocalisableTextField(). We declare an abstract function here that needs to be overridden in the implementation.

[code]....

View 11 Replies

ActionScript 3.0 :: Flash - Accessing Classes From Externally Loaded Swf's?

Apr 30, 2011

I have a document class which links to several classes, one of which adds a container onto the stage and loads external .swf's into it.Q: How do I access the various classes loaded in the document class from the external swf timeline?For instance, when you click a button in the loaded swf it changes the soundtrack from the soundtrack class. I have tried dispatchevent from the external swf timeline, but I still can't seem to get it to work. Is this supposed to work, or should I be doing something different?

View 1 Replies

ActionScript 3.0 :: Accessing Variables And Functions From Externally Loaded Nested Clip?

May 23, 2009

How would you go about accessing a function or variable from a parent clip if the clip accessing has been loaded using the Loader() constructor in AS3?

View 1 Replies

ActionScript 2.0 :: Movieclip Blocking Buttons On Externally Loaded Swf?

Dec 14, 2009

Im designing a site with accessible controls, and the best way for me to do this is load each external swf into a container movieclip that then has all the controls applied to it.This container movie then also has another layer above with a movieclip on top of that acting as a filter layer to invert the colours. This is controlled by a keyboard press.Now when I run my project with this filter layer movieclip it prevents me from mouse clicking on any of the buttons in the externally loaded swf, without it they work fine.Is there any way that I can get through this movieclip so I can mouse click / rollover those buttons?

View 1 Replies

ActionScript 2.0 :: Externally Loaded Swf Slows Rollover Buttons?

Mar 30, 2006

I beginning to create a portfolio online. I have a pretty standard setup so far. I have a main swf which loads external swfs. One of my externally loaded swfs loads another external swf. When it does, my rollover animated buttons are slow in the main.swf.

View 1 Replies

ActionScript 1/2 :: Buttons To Carry Out Actions On Externally Loaded Movie?

Jan 29, 2007

I have a player which I have created with play/pause, rewind,forward buttons, and a progress bar on it. How can I link these buttons to carry out actions on an externally loaded movie?I have searched on the forum and can only find answers for buttons for embedded movies.

View 4 Replies

Actionscript 3 :: Dynamically Created Buttons Are Not Working Externally Loaded Swf Files?

Aug 4, 2010

i have a swf file which is a framework file done in puremvc and i m loading multiple swf files. one of the swf file loaded into the main swf file loads multiple sub swf files in it. works fine but in the loaded swf file which loads multiple swf files in it.. button dosent work at all. i m not able to click on any button. i m jst making a tree structure so can be easily understood..

container swf -> external swf -> miniSwf file and in miniSwf dynamic button are not clickable but they have all the Mouse eventListeners.

View 1 Replies

ActionScript 3.0 :: Can Buttons/assets Be Loaded Externally And Referencing Dynamic Content By Name

Jul 30, 2009

I have a widget containing a number of displayobjects, i.e. up arrows, down arrows, tab 'buttons', backgroundrectangularblocks, sliders, company logos etc.I am currently creating these displayobjects using the graphics class with parameters taken from an external file, things such as fontsize, font, colour, width, height e.t.c and adding them as children of "container" sprite objects for easy manipulation and referencing later can these assets be loaded in their entirety externally, rather than being created using graphics class draw methods (which I want to avoid) as some of the things I need to design cannot be created in pure actionscript very easily (if at all?), and then used or do they always have to be in the library and instantiated from there?

if the first question is yes they can be loaded externally, this question probably isn't needed; however, if I have to put the items in the library and recompile each time a client wants to use say a curved blue up arrow instead of a yellow one and then decides he wants a yellow circle instead then how do I write the code to do the following:-Say on my first ever compile I have 'upArrowBtnset1' in the library, I instantiate it and use the instance name to access it in the usual way using standard code,

upArrowBtnset1.addEventListener.... container.upArrowBtnset1.scaleY = .3 e.t.c

Now if they send me a second set of 'upArrow' graphics they want to use I could either update all the upArrowBtnset1 assets with the new graphics meaning the original set is no longer available to the client and I would either have to hold a "original set" FLA file with the first set of arrowbuttons or I could import these to the library as upArrowBtnset2 and a third set they send as upArrowBtnset3 and so on each time I am sent some new assets; I would then recompile them into the SWF and adjust the references to the new assets within the code. In the code, for each instance of "upArrowBtnset1" I would have to rename them to "upArrowBtnset2", recompile and send it back to the client.

Because I have already abstracted the font/colour/size choices out to an external file, they can change that as much as they like without a recompile which is what we want. The problem comes if they want to use set1 again and haven't kept the original "set 1" compiled SWF. It would be easier to abstract the 'setchoice' also to the external file. The SWF would over time build more and more available sets that they could use by just changing an external variable.

For example, if the designer wants to use set 1 on Monday, set 2 on Tuesday and set 3 on Wednesday I want to make it so they can just adjust an option in an external file to "setchoice = 3" for weds instead of either having to recompile the swf each time or they have to have 3 versions of the SWF for each asset set. The idea is that as more and more assets are added in, they have more and more choices. Ideally, in an external file there would be a list of assets and links to where they are loaded from. (i.e question 1 above).

If I have an external file (say XML) which holds the setchoice option that the designer wants to use (say they want set3 today) my 'generic' code has to be something like upArrowBtn(setchoice).scaleY and every instance in the code where that object is used I append the 'setchoice' as chosen by the designer from the external file where (setchoice) is retrieved from something like var setchoice:String = "set3"; from the external file (I am currently abstracting all the adjustable variables to a configuration.as file. I will work on using an XML later when the principle of external files works (I hope!);

Is it possible to import assets from external sources and then use them in the SWF as if they were in the library? The loader class? Is this just fraught with danger I wonder.

Essentially I am being asked to remove as much as I can from the SWF so that if the client wants to change the positioning of things on the stage or the text on buttons or change the style of the buttons or the company logo they don't have to come back to us to ask for a recompile of the SWF for each tiny adjustment. Inevitably SOMETIMES a recompile will be unavoidable (such as if they want the widget to suddenly be twice as wide (i.e. the stage). My code already handles some of this using stage.stageWidth and then positioning objects relative to other objects already on the stage using this value and centred so that just changing the document properties is all I would have to do and everything else adjusts proportionally. I am trying to make this as reusable as possible with as little effort from myself as possible to save our company wasted time.

After all that waffle, my question is this, if I can't load all my buttons and assets and things externally, how do I write the code for this:- I have a library asset called upArrowBtnset1 and another called upArrowBtnset2. Instantiated with say upArrowButtonset1 and upArrowButtonset2 The code would normally be upArrowButtonSet1.x = 100; upArrowButtonSet2.y = 300; but I need it to be upArrowButton(setchoice).x = 100; upArrowButtonSet2(setchoice).y = 300; where (setchoice) comes externally from var setchoice:String = "set1";How does the code change if the (setchoice) string was named not at the end i.e 'button(setchoice)UpArrow'?

ActionScript Code:
var numClips:Number = 5;
for (var i:Number = 0; i < numClips; i++)

[code]....

I need to do something like, getChildByName("mainTab"+i).addChild(myMovieClip) ? or maybe this["mainTab"+i].addChild(MovieClip)?Is it possible without using .name?

View 0 Replies

ActionScript 3.0 :: Buttons Accessing Loaded Layers

Apr 2, 2012

Using Flash CS3 and AS3 to build a learning module that will load different layers of SWF files based on buttons on the main screen. Got this working with no problems. What I want to do is add buttons to provide learners some functionality, specifically a forward button, back button and a check box that will keep advancing automatically. I've done massive searches and so far nothing seems to work. Seems like what I am acccessing so far is the main layer, not the new layers as they are loaded. Below is what I have been trying with the back button; the foward button uses nextFrame and is Handler2. It isn't working. Not even sure how to start with the checkbox for auto advance.

[Code].....

View 5 Replies

ActionScript 2.0 :: Preloading Flashvars - Ensure That All The Content Being Loaded Externally Is Loaded Before The Transition Plays?

Aug 30, 2005

I am in the process of building a site for an Architect... Jamie Fobert Architects (projects) I am useing transitions between the projects and am loading details/text and images externally through flashvars, php and a mySQL database. Within my transitions I have a a preloader on the forst 2 frames the code is as follows (taken from a Voetsjoeba tutorial):

[Code]....

This works pretty well if the content is within the .swf, but when it is loaded externally it doesnt preload it at all. Does anyone know how I can adapt/improve this preloader? or somehow ensure that all the content being loaded externally is loaded before the transition plays?

View 2 Replies

ActionScript 3.0 :: Accessing Externally Defined Variables?

Aug 22, 2009

Here is the problem:I have 2 external as3 files in a "com" folder next to the FLA within which i am working. The first of these ( "Main.as") is the document class. The second ("events.as") contains variable definition "myVar:Number = 0" which i want to be able to access and change inside Main.as. I am sure that this is possible, but i can't get it working (flash very keeps pointing out that I have made an error. Specifically that old classic: "1046: Type was not found or was not a compile-time constant: myVar." which has puzzled me since the dawn of time.

View 3 Replies

ActionScript 2.0 :: Externally Loaded Swf Does Not Stay Loaded?

Feb 16, 2006

I am loading an externally loaded swf that uses a mask to transition in. When the user clicks a different button I am doing a gotoAndPlay that goes to a mask that "unloads" the content (it doesnt actually unload the info is just outside of the mask area. As soon As I jump to that section the movie is no longer loaded and just shows the container clip that I had created for it. The Container Clip is never changed and is the same throughout the whole process. The only thing that changes is the mask animation.I have tried both loadClip and loadMovie but no luck on keeping the clip loaded.

EDIT - I have narrowed it down. When I change the mask movieclip the movie unloads for some reason. Is there a way I can keep it loaded?

View 2 Replies

Actionscript 3 :: Stopping An Externally Loaded Swf From "playing" When Another External Swf Is Loaded?

Nov 8, 2011

I have a homepage with five "links" to each swf. Now the first swf I have a custom cursor that hides the mouse. When I click on that link it plays and when I quickly go to the homepage again it hides the mouse there when it's not supposed to do it.

Same with every other link. When I was busy with the first swf and want to go to the last swf of the five, my mouse just disappears! It is almost as if it keeps on "playing" without seeing the swf...

Here is the code that I have so far!

var currentpage:uint = 0;
//one loader object per project:
var loadingobject1:Loader = new Loader();
loadingobject1.x = 445;

[Code]....

View 1 Replies

Resizing Externally Loaded SWF?

Dec 23, 2009

i'm having some "big" issues with what seems like a pretty easy flash concept. But, im pretty green when it comes to coding in flash.

I have a SWF thats being externally loaded into another SWF file (see code below):

on(release) {
loadMovie("test1.swf",_root.dropZone);
}

(If i'm understanding the above code correctly...its loading the SWF into a blank MC i created called dropZone) This part seems to work correctly when tested.

I've got 4 different SWF's that need to be loaded seperatley when its coresponding button is clicked. The issue arises when I import the external SWF file...it resizes itself to the size of the flash stage. I need all the SWFs to be loaded and remain there original size (1257x847) or be scaled to the correct size. Then if I click another button it should load the new SWF and "unload" the old SWF.

View 3 Replies

Loader For Externally Loaded SWF?

Dec 2, 2009

if a loader can be added to let the user know the video is being loaded rather than a blank 20-30 seconds...

View 18 Replies

Xml :: Order Of Externally Loaded Swf?

Feb 10, 2010

I'm loading swf's via an XML file. I'm wanting them to be added onto the stage in the same order that they appear in the XML. The problem that I'm having is that they are added to the stage only when they are fully loaded.

This is my xml (_config.xml)

<campaign>
<component SWFsource="logo.swf"/>
<component SWFsource="gallery.swf"/>

[code].....

View 3 Replies

IDE :: Loader For Externally Loaded SWF?

Dec 2, 2009

I have a fairly chunky swf that I am loading through the loadMovie function. Just wondering if a loader can be added to let the user know the video is being loaded rather than a blank 20-30 seconds...

View 1 Replies

ActionScript 3.0 :: Remove .flv From Externally Loaded .swf?

Aug 7, 2009

With the assistance of a very kind member of this forum, I have got as far as getting an .FLV to load into my API via its own .SWF.

[URL]

click on "Animalia - Verse from the Zoo" to load the VideoPlayer .swf which contains the .FLV

I will add more functionality when I've solved this. Now that I have a Video Player which closes, the next set of hurdles to overcome are these:

Click "Close" with the .FLV playing and the sound keeps playing because the .FLV is still playing. Click "Close" with the .FLV paused and when you call the player back, it plays from the same spot. So, my tiny brain says it's an "add/removeChild" issue. Obviously when happy user clicks "Close" and then re-loads by clicking "Animalia", happy user wants the video to play from scratch. That's what I want, anyway. Not from where it left off after clicking "Close". I've made several attempts at adding a "remove FLV" object to the function and Event Dispatch method, but what I did is wrong because the code I put in removed the .FLV permanently and when you call the player back by clicking on "Animalia", the .FLV does not play at all. I'm going round in circles looking for the correct NetStream/removeChild/unload.nsplay/etc/etc .. AS3 coding and where to put it.

My .FLV video load object on "NewPlayer.swf" is:

var myVideo:Video = new Video(360, 264);
addChild(myVideo);
var nc:NetConnection = new NetConnection();

[Code].....

My questions is:- What is the correct coding to get the VideoPlayer .swf to unload its .FLV completely, SO THAT when a user clicks "Close". Either with or without the .FLV playing, everything closes completely and when re-loaded, the video plays from scratch?

View 2 Replies

ActionScript 2.0 :: Pause Externally Loaded Flv?

Sep 16, 2009

I am externally loading an flv into an empty movie clip container using loadMovie into a main swf. The flv is in a standard flv playback component and works fine on its own. But what I'd like to be able to do is pause the flv when any of the buttons in the main swf are pressed.

View 7 Replies

ActionScript 1/2 :: Control An Externally Loaded SWF?

Jul 26, 2009

I'm working on an flash movie and the interface is a small town (simiar to "doritos.com" and "comcasttown.com") if you reference both the doritos and comcast sites their little movie runs smoothly. I have several elements in the town. For example, one of the elements is an airplane hangar. When you rollover the hanger, I created a movie, the doors open and an airplane flies out of the hangar. I have several little movies throughout the interactive such as this. I created the hangar animation as a seperate swf file. In my main movie I created a button, on rollover it loads the hangar swf into an empty movieclip. When I publish and view the swf it plays slow and choppy. First, is it possible to write actionscript to load the external swf ,but it stops on the first frame of the animation and when you rollover it continues to play.To put it all in a nutshell, I want to create several buttons throughout the movie with loadmovie functions, once the swf movies are loaded I want them to stop on the first frame of the animation and when you rollover loaded swf movie I want it to continue to play the animation. Should actionscript be applied to the swf movies first and preloaded into the main movie. And what will make the movies run smoothly once it's published and viewed in a browser.Also if this makes a difference, I created the animations in after effects, exported them as FLVs imported them into flash and exported them as swf. Again it runs really slow and choppy

View 1 Replies







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