ActionScript 3.0 :: Loading Buttons In MovieClip As External SWF File

Jun 27, 2009

I am working on a website, its a project, I built custom buttons and used there own AS3 to make them play on hover. There is one problem thou, in my main scene or timeline I created this function:

about_but.addEventListener(MouseEvent.CLICK, function(){
var aboutURL:URLRequest = new URLRequest("about.swf");
})
contact_but.addEventListener(MouseEvent.CLICK, function(){
var contactURL:URLRequest = new URLRequest("contact.swf");
})
cat_but.addEventListener(MouseEvent.CLICK, function(){
var galleryURL:URLRequest = new URLRequest("catalogue.swf");
})
port_but.addEventListener(MouseEvent.CLICK, function(){
var portURL:URLRequest = new URLRequest("port.swf");
})

Ok but it had the navigatetoURL function but I took it out. Reason is because I want these buttons to load in a movieclip (mc_loader) as external swf files. I am not sure as is to linking these buttons to the loader movieclip.

View 9 Replies


Similar Posts:


ActionScript 3.0 :: Loading External Swf Files With Buttons From Inside A Movieclip?

Mar 3, 2010

In my main .swf I have labels on the timeline, navs for those btns are on the first frame of the AS layer and each button sends the playhead to a different frame. On one frame called fr1 there is an mc called mc_1 that appears on stage when the playhead stops there. Inside mc_1 are a set of navigation buttons that need to call external .swfs.
 
Do I add event listeners on the last frame of mc_1 for each button? how do I call the loaders for the swfs on the buttons since the swfs will load on the main timeline NOT the mc_1 timeline?
 
So label on main timeline called fr1 will load external1 swf , on fr10 external 2.swf will load and so on.

View 4 Replies

ActionScript 2.0 :: Loading External SWFs Controlled By MovieClip Buttons?

Jun 4, 2006

I basically made movie clip buttons to navigate through my site, has sounds and all...now all i need those buttons to do is to call out a .swf file from a certain directory. I know how to do this with the traditional button, but not with a movie clip button since it requires a function. This is what I have tried and failed with so far:

// PROFILE SECTION BUTTON //
this.profile_mc.onRollOver = function(){
profile_mc.gotoAndPlay("_over");

[code]....

View 3 Replies

ActionScript 2.0 :: Loading Named Buttons Onto Stage With Coordinates From An External File

Jan 15, 2005

i have 20 buttons, and i want to design an external file that holds the coordinates for each named button.

how would i go about this, since the external file would be read as a string by flash?

View 3 Replies

ActionScript 2.0 :: Loading Named Buttons Onto Stage With Coordinates From An External File?

Jan 15, 2005

i have 20 buttons, and i want to design an external file that holds the coordinates for each named button.how would i go about this, since the external file would be read as a string by flash?

View 3 Replies

ActionScript 2.0 :: Loading An External Swf File/movieclip Onto The Main Stage?

Jan 7, 2009

I am loading an external swf file/movieclip onto the main stage - it is a simple transition and once it has finished playing, I want to jump to a frame in the main stage.I've loaded the movieclip onto the stage, but don't know how to jump to another frame after it has played and stopped...what's needs to be added to this to goto a frame on the main stage........

on (release) {
loadMovie("black.swf", holder);
}

View 2 Replies

Flash :: Loading An External SWF File Into A Loader Movie And Type Casting To MovieClip

Nov 13, 2009

I am trying to import a SWF file into a custom loader and then treat the loaded SWF file as a MovieClip object. The code for the functionality can be seen below.

public function loadMyMovie(movie:String)
{
var now:Date = new Date();
var rnd:String = "?randomize=" + now.time;

[Code].....

When I do this I get the following error.

"Implicit coercion of a value with static type flash.display:DisplayObject to a possibly unrelated type flash.display:MovieClip."

View 2 Replies

Flash :: Loading / Unloading External SWF Using Buttons From Loaded External Files

Feb 23, 2011

I spent almost a week trying to figure out how to unload a currently loaded swf using its button and loading a new swf... I have three files, a main.fla, file1.fla and file2.fla. In my main.fla, I have a code which loads the other two files. If i will click the "unload" button in the file1.swf, I would like the main.fla to unload the file1.swf and load the other file, file2.swf. Here is the code to load the file1.swf:

[Code]....

View 1 Replies

ActionScript 2.0 :: External Swf Loading Into Target Movieclip Loading

Apr 20, 2005

I'm trying to load a SWF movie into a target movieclip called blankmc. The SWF movie is loaded from an absolute URL (eg. [URL]/img/20042005113934movie3.swf ) My Loading Progress code fails to detect the SWF file size. However the same code works perfectly for a JPG! Essentially the .getBytesLoaded() and .getBytesTotal fail to work. Why is this and how can I get it to work for loading SWFs?

[CODE]...

View 3 Replies

IDE :: Keep Buttons From Loading External Movies?

Nov 5, 2009

I got this tutorial about external movie loading. It works but it seems that their is a little problem with it. How do you keep the button from loading an external movie once it's loaded already?

[URL]

Let's BUTTON-1 loaded MOVIE-1, now when you click on BUTTON-1 again it will load the movie even if it's loaded. How do you do it like only when another button is clicked will it load the movie for that button.

View 2 Replies

ActionScript 3.0 :: Loading And Unloading Of External Swf's Using Buttons

Jun 30, 2010

I have 7 buttons on my main page, on the left side of the screen. I want the buttons to load the external swf on the right, and then unload when a different button is pressed. Do I need to make an array? Do I need an empty movie clip to load each swf into?

[Code]...

View 20 Replies

ActionScript 2.0 :: Loading External SWFs Without Buttons?

Aug 17, 2009

Flash CS4 Actionscript 2.0 internal training project Main movie is a single frame project, containing just the interface. This includes a menu listing 80+ individual "chapters" for the training series. Each "chapter" that loads is its own project/swf of varying lengths. Once the main interface loads, it should automatically begin to play the chapters sequentially without the user selecting anything from the menu. When one chapter finishes, the next should load. If the user DOES select a chapter in the menu, it should load that SWF, and continue auto-playing from that selection forward.

- Each chapter swf has a built-in play/rewind/ff bar, various movie clips with animations, dialogue audio track and a fairly lengthy embedded FLV movie, and therefore a preloader before each chapter is mandatory.What I have so far works, but it's embarrassingly crafted my lack of AS skills:- First frame of main interface movie (let's call this main.fla) contains the following code:

var slideName = "modules/00.swf";
var loader:MovieClipLoader = new MovieClipLoader();
loader.addListener(this);

[code]....

View 0 Replies

ActionScript 3.0 :: Menu Buttons Loading External .swf?

Nov 30, 2009

Basically I have a site that will load an external .swf for each menu button to display the content for each page. I have found tried several methods to do this and all at least create a loader and display the default .swf without problem.

Heres the code...

***start code***
stop();
var xPos:Number = 0;
var yPos:Number = 125;

[code]....

My problem is I am getting the following error:

"1120: Access of undefined property event. var newSWFRequest:URLRequest = new URLRequest(event.target.name + ".swf");"

Now the buttons I have set up are text converted to a button. Not sure that matters as I have seen other instances where people create an object (retangle) covert that to a button and put the text inside of that as an instance of the retangle. I have even created a new .fla with just a single button creates with a retangle and the text as an instance of that and still get the same problem.

View 2 Replies

ActionScript 2.0 :: Loading External Swfs With Buttons (that Are Not On Main Timeline)

Aug 7, 2008

I just don't know how to target it. I'm trying to load an external swf, when releasing a button. The problem is the button is not on the main timeline, but instead nested in a movie clip. I just don't know how to target that button. I tried loading the swf with a button on my main timeline and it worked, so I know the problem is not with the movie clip loader class or the actual swf itself. I actually learned this from a note midway down the page in one of your tutorials..... [URL] how can i target that button that is nested in that movie clip?

[Code]...

View 2 Replies

ActionScript 3.0 :: Loading And Unloading External Swfs When User Clicks Buttons?

Jan 9, 2012

I am working on a few websites at the moment, one of the being my online portfolio, as well as my website for a sleep product I am trying to sell. I have very little experience with AS3, last time I created a website AS2 was used. I've tried a few online tutorials, but nothing gets the job done, there is always some error..I have a index.swf which loads the default home.swf.There is also an about.swf, contact.swf, order.swf, and All I need is for the external swf to pull up when the corresponding button is clicked, and when the next button is clicked, for the current swf to unload and the new swf to load.  This was so simple with AS2, one would think things might be as simple if not easier.

View 9 Replies

ActionScript 2.0 :: Loading External Text Files Into A Textbox When Click Buttons

Jul 28, 2006

I'm loading external text files into a textbox when you click buttons, like so:

[Code]....

This works fine, no problem. But I've got a bunch of buttons. So, I write this as a function:

[Code]....

View 2 Replies

ActionScript 3.0 :: Buttons Using External AS3 File?

Jan 20, 2010

ive been trying to get some buttons to load into my main movie called rules.swf using an external actionscript file. Ive got the buttons to load into the movie but now i cant get the buttons to load a new movie,Heres part of my code

package{
import durationSymbol;
import exit2Symbol;[code]......

View 0 Replies

ActionScript 3.0 :: Loading SWF Into MovieClip - Play / Pause Buttons

Aug 14, 2010

I am going out of my mind trying to get this to work. I can do it in AS2 without a hitch - but not AS3. I just need to load an external swf file into an empty movieclip. Then I have 2 buttons play and pause that need to be on the top layer of the new movie and they need to play and pause the loaded swf file. I have tried a number of things and nothing is working.

View 1 Replies

Actionscript 3 :: Get MovieClip Within A MovieClip From External Flash File Dynamically?

Dec 13, 2011

I want access MovieClips Dynamically from the external flash file.There are 5 MovieClips named Loader_1_mc, Loader_2_mc,.Loader_5_mc like so. Each of this movieClip contain 5 movieClips by named acc_1,acc_2, acc_5 like.How Can I access From the swf file. i tried few steps within nested loop.[code]

View 1 Replies

IDE :: Loading External SWF Into MovieClip?

Jan 30, 2009

I am a new forum user and new AS programmer (but an experienced OOP in C++/Java/.NET),now using Flash CS4 on a Windows XP Pro machine.Using pre-loader demos from the web I coded my first AS3 program, it actually works as expected with some SWF movies; but with others it fails to operate properly.What I wanted to do is to create classes for each type of movieclip I have (the movieclips are all 100 frames animations) and when I create the instances with "new" the classes would just load its corresponding movieclip content (A SWF file containing the 100 frames).

Well the first problem I ran into was that if the SWF file is from previous versions (AS2 say) it does not work. Just to let you know because that is not the prolem now.All the program is doing now is loading the external swf into a movieclip instance at the time the class is created, this part works fine always, and then listening to EVERYFRAME events just calls moveNext going from frame 1 to 100, and when I reaches frame 100 it plays backwards by calling movePrevious.

The program works fine with a SWF file I downloaded from the web, but because I am having a hard time finding long animations built with the current version of Flash I tried to create my own SWF files to test, etc... Now the problems:I have 100 frames that I import to the stage into a new movieclip, then I right click on that movieclip in the library and export this movieclip as SWF using Flash S4...which creates the SWF fine and which I can play in a player fine too.However the program fails with this Flash CS4 movieclip ! , for some reason it does not seem to react to the moveNext and movePrevious calls, it just plays from 1 to 100 and them jumps back to 1 again.

View 9 Replies

ActionScript 2.0 :: Buttons Within The External Swf File Do Not Work?

Jan 16, 2009

I built a flash site. The site's navigation is an external swf file. The file loads fine. However, the buttons within the external swf file do not work. I have a simple goto webapage behavior attached to each of them.

I'm assuming it has something to do with paths. I do not know what the proper code is in order to make a button inside an external swf file change the web page.

View 5 Replies

ActionScript 3.0 :: Passing Buttons Names To External .as File?

Jun 5, 2011

I am working on a project where I have on the stage 8 movie clips, and when hovered, they are to shake. I have made this into a class, and placed the code as an external .as file.

Each movie clip is named shaker_mc - shaker_mc7

I have also gone in and changed all of the button movie clips base classes to ShakeButton.

Right now I am getting a couple of errors, and I believe all i need to do is pass the buttons names to the class in the external .as file, but I am not sure how to do that? I had everything working without the external script, but I did not want to have to create the effect for each button.

The erros are:

1120: Access of undefined property shaker_mc.

Here is my code for the ShakeButton.as file

ActionScript Code:
package{ 
import flash.display.Sprite; 
import flash.events.MouseEvent; 

[Code]......

View 3 Replies

IDE :: Loading External Php File?

Apr 11, 2009

loading external php file,this mean,when we load the file all info at php will load actionscript in swf file.

View 2 Replies

ActionScript 2.0 :: Loading External Jpg Dynamically Into A Movieclip

Feb 3, 2009

I have built a horizontal scroller, you can see images there that go from left to rigth, what I wanted to do is when a user clicks on a thumbnail:

1)go to full screen mode

2)create an empty movie clip and load a jpg into it

I did it, but when I go back to the normal screen the empty movie clip is still there. How can I get rid of it when the user goes to the normal screen? it seems to be that when I load the jpg into the emptymovieclip the empty movie clip doesn't have the click property is that true?

[Code]...

View 7 Replies

ActionScript 3.0 :: Loading External SWF Within A Moving MovieClip?

Jun 29, 2009

I'm loading external swfs into instance "Frame01" which is a MovieClip, the MovieClip is nested within instance"FrameLoader" (MovieClip) Which moves (elastic effect) when a button is pressed. Im looking to get the loaded swf to be inside "Frame01" while its sliding.

//Elasticity Effect:
var xVel:Number=535.0;
var yVel:Number=89.0;[code].......

View 0 Replies

ActionScript 2.0 :: Loading External Swf Into Movieclip Holder?

Jan 6, 2011

note I have to change some file names and urls for company privacy.I am working on an online banner ad which tight size requirements. In order to stay under the file size, I want to load an external swf housed on our server into an empty movie clip on a button press. I have this working with the following code on a button:

on (release) {
loader_mc.loadMovie("location where swf file is housed");
}

I then want to unload this movie if a different button is pressed. However I am receiving the following error.

*** Security Sandbox Violation ***
Connection to file: XXXXXXXX halted - not permitted from "location where swf file is housed"
-- Remote SWFs may not access local files.

How can I unload this external swf file from my move? Again the external swf file is housed on our sever and the main swf file will be housed with the place we are advertising.

View 0 Replies

ActionScript 3.0 :: Loading External SWF To Target MovieClip

Jan 16, 2010

I am trying to build a menu, that loads external swf to target movie clip, in the code below it works if I remove the line target removeChild, but then if a press the other button, just put it on top, so my actual problem is that if I don't have anything loaded in target, this code doesn't work because it can remove child?

menu.btn_avanti.addEventListener(MouseEvent.MOUSE_DOWN, goseccion);
menu.btn_professors.addEventListener(MouseEvent.MOUSE_DOWN, gofotos);
function goseccion(Event:MouseEvent):void{
var main:Loader = new Loader();
main.load(new URLRequest("seccion_basica.swf"));
target.removeChildAt(0);
target.addChild(main);
[Code] .....

View 1 Replies

ActionScript 2.0 :: Loading External SWF Inside Of MovieClip

Feb 22, 2012

I'm trying to load an external swf inside of my movie clip.
meter.loadMovie("external.swf");
I managed to get the above to work but as soon as I press a button in the external movie it reacts with my main movie! So a button in the external movie that makes the timeline go to frame 2 makes the main flash file to goto frame 2. Also, can you load external swf files that use external folders for content? Basically I have an interactive diabetes meter and it's all controlled via scripting ( I didn't create it ) but it has the main swf file which you load. However it references other folders and scripting files.

View 2 Replies

ActionScript 2.0 :: Transition Within Movieclip - Open The Load.swf And Click Red Buttons.. It Loads Up The External Swf?

Feb 27, 2006

if you open up the TEST.swf you can see how I want my transition to look like.. everything works perfectly.. then if you open the Load.swf and click one of those red buttons.. it loads up the external swf.. but if you click another button it loads up the same external thing.the difference between Load.swf and TEST.swf is that in Load.swf is container in which the TEST.swf is loaded..

View 4 Replies

Loading Different Vars In External Txt-file?

Dec 8, 2009

In first frame of my movie I've got this:

PHP Code:

loadVariablesNum("produkter.txt", 0);
import TextField.StyleSheet;
var myCSS:StyleSheet = new StyleSheet();

[Code]....

and a dynamic textbox called "myHTML". If I name 'var' on this textbox everything works fine, but I want to write it in actionsscript instead. Where do I write that? (I have 3 different vars in the text-file)

View 1 Replies







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