ActionScript 3.0 :: Use Button To Load An External Swf Into A Target?
Jan 20, 2011Using a button to load an external swf into a target? Or even a layer would be fine.
I just need to have code to work with that I can edit.
Using a button to load an external swf into a target? Or even a layer would be fine.
I just need to have code to work with that I can edit.
I want to know if and how I can use a movie clip to give the coordinates to load an external swf in an exact location, through an xml file?What I have is an xml menu and instead of opening web pages, I want to load external swf files in the same swf, where the menu is located, the thing is I don't know how to give the coordinates in the target of the xml file, and I want to know if and how I can use a movieclip to do this, such as _parent.mc.loader.
View 1 RepliesI am trying to get a nav button in one movie (main_nav.swf) to target a my main movie (index.swf) and load a sub nav movie (metals_subnav_infinite.swf) into it. The sub nav movie will do a similar task - loading a portfolio swf into main movie (index.swf). Here is the file breakdown of my working files:index.swf - main final movie which loads "main_nav_infinite3.swf" on startmain_nav_infinite3.swf - loads main nav "main_nav.swf" and scrolls it infinitely (infinite menu)main_nav.swf - main nav with buttons that trigger sub nav "metals_subnav_infinite.swf" to load into index.swfmetals_subnav_infinite.swf - loads sub nav "metals_subnav.swf" and scrolls it infinitelymetals_subnav.swf - sub nav with buttons that trigger "folio.swf" (have not created this file yet!) to load into "index.swf"The script I was focusing on is in main_nav.fla and it is:
metals_mc_bn.onRelease = function() {
reActivateMenu();
this.gotoAndStop(3);
[code].....
I have a flash website that loads rather slowly, presumably because it is composed of a single .swf file, so I want to break that down into several. So how do I create a button that loads an external swf on top of the existing movie?
So far I have this which I pulled from {URL]
Code:
//This creates a new instance of the loader object.
var my_Loader:Loader = new Loader();
//This creates a new instance of the URLRequest object that contains the
//path to the external SWF.
[Code].....
I have to add in a precise position into my stage another swf by pushing a button.
View 1 RepliesHow to load an External SWF on button click?[code]...
View 3 RepliesUsing AS3.0, how do I load an external swf file when I click a button? Also, how can I get rid of that swf file when I click a different button on a menu?
View 1 RepliesI am an uber n00b to flash AS3. And it is not my intention to sound like a complete moron, but honestly, I have had a hard enough time figuring out just how to load an external .swf into my main file! add a button within the external .swf which will unload itself and load a new on in its place.
View 1 RepliesI can load an external SWF when I click a button. If I click the same button again the same swf file loads on top of it self. How can I fix it?
[Code]....
SWF Unload itself and load a new one from button within External SWF?
View 1 RepliesI have a main swf (call it Main1). Main1 calls an external swf (call it swf1). Swf1 loads on top of Main1 like it should. Swf1 has a button that calls another swf on top of Main1(call this Swf2). Well the problem is, the button on Swf1 calls Swf2 on top of itself, instead of removing Swf1 first. I cannot figure this out for s*** how to make this work. How can I unloading Swf1 from the loader, and at the same time load Swf2 into the loader from a single button residing on Swf1? My code is below.
Main1 has a button (click_btn) that loads Swf1 (click_btn is in a Movie Clip, not on main timeline)
ActionScript Code:
stop();
click_btn.addEventListener(MouseEvent.MOUSE_DOWN, loadMC)
function loadMC(ev:MouseEvent){
[Code].....
How can I incorporate something like the close button (closer) into done_click to close Swf1 when I call Swf2 from this button (done_click)
I do not know how to right the code to load an external swf file when a button is clicked.
View 3 RepliesI am trying to simply load in an external swf when I click a button. I have created a button on the stage called it 'my_button' I can get the swf to load in automatically but I am not understanding the script for loading it in on a click.....would someone pleae explain what script I need to have this is the script I have for loading automatically
[Code]...
I have been trying to pick up more as3 lately, also have been converting some of my sites from as2 to as3. In as2 I could create 3 menu buttons and save them in a mc- lets call it menu_mc. This menu_mc sits on my main stage. I have also placed a mc on stage to hold anything that I load. Lets call it holder_mc. So I figured out how to get my email button to work using this:
email_mc.addEventListener(MouseEvent.CLICK, mailto);
function mailto(event:MouseEvent):void {
var email:URLRequest = new URLRequest("mailto:myemail@mail.com");
navigateToURL(email, "_blank");
}
That's fine. What I can't for the life of me figure out is understanding how to click on one of my menu buttons and load a swf into my holder_mc on stage. In as2 I could use this code on a button :
on (release) {
//load Movie Behavior
if(this.my_holder == Number(this.my_holder)){
[code]....
How can I use one Button to load and unload a sequence of external swfs, Like a Next Button and Previous Button?
View 1 RepliesI am having trouble making a button load an external .swf file I have a made a flash file, and in the navigation; once a Button is pressed it should load another .swf file but I can't get the Button to load another .swf despite numerous attempts, and Google searches!!
View 4 RepliesI have to add un external swf in a precise position into my stage by pushing a button.
View 11 RepliesHow can I use one Button to load and unload a sequence of external swfs, Like a Next Button and Previous Button?
View 5 RepliesI am building a flash site and I am trying to load all of my swf file into one (final) fla file. This is the code for loading one of them in:
// ActionScript 3.0
stop();
var movie1:URLRequest = new URLRequest("mainpage.swf");
var ldr:Loader = new Loader()
ldr.load(movie1);
addChild(ldr);
So this mainpage.swf file has a button with instance name of btnContact which I would like to add an event Listerner to it here in the (final fla) so when I click it, it jumps to the frame "one" on the final timeframe.
So basically, controling the main timeframe though using a button on an external swf file.
i have the following layers:
Gallery - containt mx.controls.load named art1Loader
Gallery Info - Dynamic Text Box named infoBox
Gallery Buttons - btn1
[code].....
I have a button with an instance name of sound_btn. I'd like to load an external movie when this button is pressed, and then make this movie slide from "out of the canvas" into the canvas.My problem is how to deal with an external movie...
Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
var revealTween:Tween;
[code]....
I was getting in to transitioning from AS2 to AS3 a while back and had designed a page that had menu buttons that when clicked, loaded an external swf in to a container. Pretty simple accept for the fact that it was a while ago and my computer crashed so I'm having to redo this and learn it all over again. I have read in to flash on the subject but I am not to sure on the best way to go about this. I know there are a lot of people on here who make thing a lot more simple and structured than I do. I'm so used to putting the actionscript on the button and I'm a little stuck on the best way to combine the actionscript for the button and loading the swf. I would need to make a button load an external swf in to a container when clicked? I figure I just need one and then I can copy it to all the other menu buttons.
View 2 RepliesI have been trying to pick up more as3 lately, also have been converting some of my sites from as2 to as3.
In as2 I could create 3 menu buttons and save them in a mc- lets call it menu_mc. This menu_mc sits on my main stage. I have also placed a mc on stage to hold anything that I load. Lets call it holder_mc. So I figured out how to get my email button to work using this:
email_mc.addEventListener(MouseEvent.CLICK, mailto);
function mailto(event:MouseEvent):void {
var email:URLRequest = new URLRequest("mailto:myemail@mail.com");
[Code].....
im trying to load in external swfs. so as im studying, to my knowledge, ive done word for word (except file names) and it wont work heres my code, dont mind the comments....i take notes like if i was talking to myself
[Code]....
I try to use a flash button to load external website to a pop up lightbox. I see a white box shows up but no content....
1. On the flash button: step1.onRelease = function() {getURL("javascript:LightboxDelegate('[URL]','Green Wallpaper')");}; 2. On HTML:
[Code]...
I have created a button in flash 8 to act as a play button for mp3 files on a website in drupal. I however am having trouble, since am new to ActionScript, to make the button load an external mp3 file without hardcoding it in the flash.
View 0 RepliesI'm making a rather simple portfolio site, ment to be atleast.the Buttons are named as follows, both as name and instance name.[code]...
View 1 RepliesI need to have a button load it's GetURL() deal from an external file. XML? Txt?
View 2 RepliesWhat I need is an AS code for a button which first play an animation ( a motion tween) and then load an external swf file.
View 2 RepliesI've been searching for a way to do this without using html. For some reason i can't have my enter site button load the main movie from the splash page and go full screen at the same time. here is my full screen code: (where do I put my loadMovie script to make both events happen at the same time)
_root.enter_btn.onPress = function(){
if(Stage["displayState"] == "normal"){
Stage["displayState"] = "fullScreen";
[Code].....