ActionScript 2.0 :: Unloading A .swf Within A Container Mc?

Dec 5, 2006

i used the following AS to create a container mc, then load an external .swf into the container. I would like to remove the loaed .swf with a button contained within the loaded .swf?

but.onPress = function () {
createEmptyMovieClip("container", 1);
loadMovie("loaded.swf", "container");

[Code].....

View 5 Replies


Similar Posts:


ActionScript 2.0 :: Unloading Swf Deleting The Container?

Apr 2, 2009

I have a main swf which I am loading other swf's in to using a container. On each of the swf's I am loading I have an unload button which I placed the actionscript below on. The swf unloads fine, but it seems to be unloading the container as well. After I unload one video the others will not load. I don't know if it is because the unload button is on the swf being loaded and is not on the main swf or what. Is there anything I can put in this to make it unload the external swf and not the container on the main swf?

Code:
on (press){
this.onEnterFrame = function(){
if(this._alpha > 0){
this._alpha -= 8;

[code]....

View 3 Replies

ActionScript 2.0 :: Loading / Unloading Of Several SWFs In Container

Apr 23, 2010

I am creating a course that requires loading/unloading of several swfs in a container. My course structure is something like :
Course->Module01->src->test.as
->Module02->src->test.as

When I load file from Module01 in my container it works fine, but files from Module02 is not working as they should. They seem to be reading the code from the as file in Module01. The course works fine when I give the as files different names, but I want to keep the names as they are now as I have created several modules and sub-modules on similar structure.

View 3 Replies

ActionScript 2.0 :: Unloading Movie Clip From Root Container?

Aug 5, 2008

I've created a main page with my main links on top, and a container as my body.I load my pages with this action to the container.

on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "production";
container.loadMovie("production.swf");

[code]....

Inside the production.swf files I've created a gallery with a MovieClip that loads from my library to a container1 inside the production.swf. In the galleryMC(from library), Ive created a close button to unload it from the container1. It works fine from my production.swf file, but when it loads to the main page it doesn't unload. This is the ActionScript that I have to unload the Movie Clip.

on (release) {
this._root.container1.unloadMovie();
}

View 2 Replies

ActionScript 2.0 :: ClearInterval - Loading / Unloading External Swfs Into A Container Movie

Jul 9, 2005

when loading/unloading external swfs into a container movie,i`ve noticed that any intervals (within the loaded files)i`ve used are not being cleared despite the movie being unloaded causing errors when the same swf is reloaded. Without manually clearing all intervals is there a way round this?

View 1 Replies

Flex :: Prevent Container In ItemRenderer From Exceeding Width Of List Container?

Jul 2, 2011

In a Flex Mobile project I have a simple itemRenderer where I'm trying to create an "bubble" texting effect, similar to ichat or iphone (just so you get what im going for). But if the text is longer than the screen it runs off, rather than just going down a line.

If I set Group thats holding the rectangle(to create the bubble effect) and the label to 100% it works and keeps it from exceeding the list containers bounds, BUT the group is always at 100% and looks bad, I'm trying to keep the "bubble" JUST AROUND the text.

Anyway so, at the top of my itemRenderer I tried specifying:

<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" width="100%" height="100%">

And here's my layout I figured since msg_container has a width of 100% I was hoping bubble_lable_group would just not exceed that but...it doesnt...it just runs off. I tried setting a max width but that does not allow you to input percents. And just to say it 1 more time. I know if i set bubble_lable_group width to 100% it works, and keeps it from going off the edge, but then the rectangle "bubble" stretches all the way across and just looks bad.

<s:VGroup id="main_container" horizontalAlign="left" paddingBottom="10" paddingTop="10"
verticalAlign="top" width="100%">

[Code]....

View 1 Replies

Professional :: Run Project (main Container SWF And Child SWFs) Into Another Container File Which Place On A Website?

Jun 17, 2010

I am facing a issue in Flash container. I am having a project which has main container which call different SWFs into it. Now I call this main container file into another container, and their problem starts. Many option doesn't work properly which generally have _root, _parent etc...
 
If I want to run project (main container SWF and child SWFs) into another container file which place on a website. I want to show whole project from this container file so what I need to do?

View 1 Replies

Flex :: Dynamically Adding Container To A Dynamic Container

Sep 21, 2011

I have a loop that goes through data from a book and displays it. The book is not consistent in it's layout so I am trying to display it in two different ways. First way(works fine) is to load the text from that section in to a panel and display it. The second way is to create a new panel (panel creates fine) and then add collapsable panels(nested) to that panel. Here is the code from the else loop.

else if (newPanel == false){
// simpleData is just for the title bar of the new panel
// otherwise the panel has no content

[Code]....

The error I get is: ReferenceError: Error #1069: Property panel4.4 not found on components.readTest and there is no default value.

I have tried setting the "name" property instead of the "id" property.

View 1 Replies

Flex - Hide Container Of A Viewstack Container?

Dec 23, 2010

I have a viewstack container w/ 3 views: red, black, and blue. How can I completely hide the black & not include it?

[Code]...

View 2 Replies

Flex :: Drag Circle From One Container To Another Container?

Jan 13, 2012

I am creating an flex Air project,so mxml file will run. I have circles in one Big circle at one side and will be same on other side.

Now how to drag any circle from any Big circle to other side. Or it could be like any two container having circles, then how to drag and drop circle?

For one circle i am able to do drag and drop.But I want one Big circle on left hand side and one big circle on right hand side .And small circles with class names will be in these big circles.Now i want to drag and drop those small circles in big circles.Big cicles should not move. Even i have tried this code in actionscript

package
{
import flash.display.Sprite;
import flash.events.MouseEvent;

[Code].....

But in this i want big circles should not move and small circles should only be dragged.

View 1 Replies

ActionScript 3.0 :: Scale Container In Another Variable Container?

May 6, 2010

I need to place an image into a container. The problem is that I will not know the size of the image or the container beforehand, so it all has to be dynamic.this is how I started (have not gotten to stage(or container) changing size yet. No matter what I try, either all the images are the same width, or they are all the same height. If some images are portrait and other landscape, I don't want all the images to be X pixels high. In this variation of the code, all the images turn out the same height, regardless of portrait or landscape.

ActionScript Code:
var ratio:Number = container.width/container.height;//get the ratio, if width is bigger than height then ratio is greater than 1, else ratio is smaller than 1

[code]........

View 0 Replies

Flex :: Moving Children Of A Container (defined In MXML) Inside An "inner Container"

Jan 27, 2010

I'm currently working on a custom component which extends Canvas (let's call it SuperCanvas) ; it's basically a container that let you zoom & pan its contents. It would be too long to explain why, but I can't use scrollRect, so I was forced to declare a Canvas object (called innerCanvas)... inside my SuperCanvas (I know, not very nice =/) I would like to know if there's a proper way to "redirect" the creation of my component's children in this canvas.

[Code]...

View 1 Replies

LoadMovie Mc Keeps Unloading

May 2, 2011

I load my external image into emptymc which is inside mc_container:loadMovie("myimage.jpg", mc_container.emptymc); //placed on main timeline.This works fine. However when I go to a different frame within mc_container(specifically a frame without an instance of "emptymc") emptymc gets unloaded. As soon as I go back to a frame containing "emptymc" it no longer has the jpg.Is there a way I can keep the jpg loaded in emptymc without having to load it again?

View 2 Replies

ActionScript 3.0 :: Unloading AS2 Swf From Swf

Mar 12, 2009

I've loaded an SWF file into an AS3 project, thing is, I can't unload it. Everytime I use loader.unload, The Flash IDE crashes! I've tried to google the problem, but it seems no one seems to have an answer for it.

View 1 Replies

ActionScript 3.0 :: Unloading External SWF?

Mar 12, 2009

I'm having a problem unloading an external SWF from my container clip. I've searched all morning for a fix to this problem, with no clear resolution. I thought this was originally a xml update issue, but it's not. A lot of talk about removing child nodes, but I'm not sure what do do there.Here's my code:

PHP Code:
function loadXML(loaded) { if (loaded) {  xmlNode = this.firstChild; swiff = [];  total = xmlNode.childNodes.length;  for (i=0;

[code].....

View 1 Replies

ActionScript 3.0 :: Unloading SWF From Movieclip?

Jun 2, 2009

unloading a SWF from a movie clip. This code is inside a movie clip acting as a button that loads the SWF into another movie clip in the main timeline called "rootbox_mc". Basically when i spam the button, it keeps loading the external SWF over and over the one already loaded, i want it to remove the one already loaded before loading another in its place.

More specifically, i wanted to ask why my if statements were not working, and how do you actually unload a loaded external SWF. I read that you just delete the child, and that's what i tried to do here.

Code:
this.addEventListener(MouseEvent.CLICK, load1Release);
function load1Release(evt:MouseEvent):void {
var checker:Number=0;

[Code]....

ps; This code is someone else's code that i found on the internet. I tried to modify it to fit what i'm trying to do, but it is currently not working.

View 9 Replies

ActionScript 3.0 :: Unloading Swf's In UI Loader?

Nov 5, 2009

I am having some problem removing a null object and I realise that I have not been unloading my swf's properly. Could someone take a look at what I have been doing and tell me what I can do to make it better. I am putting my website in an exhibiton of my design work and if it lagged up due to all the clicking it would suck!

Code:

aboutBtn.addEventListener(MouseEvent.CLICK, aboutLoad);
function aboutLoad(e:MouseEvent):void {
ldr.unload();

[Code].....

View 19 Replies

ActionScript 3.0 :: Unloading Xml Or Swf File Within Swf?

Mar 31, 2010

have this main swf that calls 2 swf. then the 1st swf that he calls was consists of xml images and button.now my problem is upon loading 1st swf then i clicked the button and loads another swf file it should unload the 1st swf file, in my 1st swf i have this switch case ode for button, i put the unload code inside it but it does'nt work.

View 1 Replies

ActionScript 3.0 :: Unloading Swf Between Two Swfs?

Dec 3, 2008

I have a UI that loads swf in the content area when several buttons are clicked (these buttons are menu1, menu2 et.c) the code is as follows and it is working fine...

import fl.controls.Button;
import flash.display.Loader;
import flash.net.URLRequest;[code].....

So clicking the first button brings up a main menu in the main content area...with four menu options (buttons labelled mainMenu1, mainMenu2 etc.) When you click one of these main menu options, the corresponding swf should be loaded in place of the main menu (in the main contant area).

However this is not happening and the main menu is staying around and not being unloaded. Is this because the main menu swf is in a loader created in the parent swf, but the main menu loader is in the main menu swf. So I think in effect i have two loaders appearing at the same time.

import fl.controls.Button;
import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.MouseEvent;[code]......

View 2 Replies

Unloading A Script With A Button?

Oct 22, 2009

I have a movie that serves as a greeting card - it plays an animation which (at the end of the timeline) plays a looping music track, and activates a "random" script to generate a "snowing" effect.At the end of the movie I've faded in a button that allows the viewer to "replay" the movie - which works okay... except it's still snowing when it starts (should begin without that effect)... Is there a way to unload that script? I found a way to unload the sound easy enough - but I can't seem to figure this one out.

for (k=0; k<150; k++) { duplicateMovieClip(_root.snow, "snow"+k, k);}

There is another script within the movieclip itself, but I don't think you'll need that. To preview the movie click below (sorry, the "replay" button is all the way at the end - you'll need to watch the whole movie) http:[url].....It probably begs for an explaination - if you're wondering, it's for a religious-based college (Fransiscan) - their mascot is a Saint Bernard..

View 1 Replies

ActionScript 3.0 :: Unloading An External Swf From Itself?

Mar 8, 2010

I have a really simple problem regarding the unloading of swf's. I've searched for solutions but somehow I am having some difficulties understanding all the parent-child associations.So, I have main swf that has four buttons, each loading an external swf. The buttons are on the main timeline. The swf's that are loaded have a return button on their main timelines that would need to unload the current swf and thus return to my main swf.

View 1 Replies

Flash :: Unloading Swf From Parent Swf?

Sep 23, 2010

So I loaded a swf into another swf like so

correctURL being my external swf variable

function startLoad(){
var mRequest:URLRequest = new URLRequest(correctURL.toString());
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,

[Code]....

mLoader.contentLoaderInfo.addEventListener(Event.UNLOAD, closeAllStreams);

I'm just not having any luck as I can still hear the old sound over the top.

I don't want to access the loaded swf's variables either or i'd just cheat haha.

View 2 Replies

ActionScript 3.0 :: Unloading The External SWF?

Jul 20, 2009

I have a simple file with 2 buttons (load + unload).By pressing the load button, an external movie_player SWF loads (this SWF loads a FLV video into it).The problem is that when I press unload, the movie_player dissapears from the main SWF, but I still can hear it. How can this problem be fixed?

ActionScript Code:
var urlRequest01:URLRequest = new URLRequest("movie_player.swf");
var external_swf01:Loader = new Loader();

[code]....

View 9 Replies

ActionScript 3.0 :: Unloading Swf's In UI Loader

Nov 6, 2009

I am having some problem removing a null object and I realise that I have not been unloading my swf's properly. Could someone take a look at what I have been doing and tell me what I can do to make it better. I am putting my website in an exhibiton of my design work and if it lagged up due to all the clicking it would suck! so its important I get this right I just need a little help if someone wouldn't mind.[code]

View 2 Replies

ActionScript 3.0 :: Unloading A SWF From The Inside?

Jan 28, 2010

I have a SWF that is being loaded into another SWF. I have a close button inside of the loaded SWF that unloads the SWF using this function:

function clickedButton(evt:MouseEvent):void{
MoveClip(this.parent.parent).myLoader.unloadAndSto p();
}

Works great ... as long as I know the name of the Loader (in this case myLoader). How do accomplish the same thing without knowing the name of the Loader that's loading the new SWF? How do I make it more generic so that whatever Loader calls in the SWF I can unload the content (from inside of the loaded SWF)?

View 1 Replies

ActionScript 3.0 :: Unloading The Swf File?

Apr 28, 2010

The problem is when you click the green box, it loads the "book" fine, when you click the "x" button it doesn't unload i am unsure how to fix this.[URL]

View 1 Replies

ActionScript 3.0 :: Loading And Unloading SWF

Feb 5, 2011

I was wondering if someone could take a look at my files and tell me what I'm doing wrong. I'm trying to rebuild an ad in AS3 from AS2 and I'm running into some issues. This is the problem: When a page loads there is a 728x360 container that loads a 728x90 ad. What I need to happen is I need to communicate to the container that when the 728x90 expand button is clicked it needs to unload or stay on the screen while a 728x360 expanded state is loaded in.

I have these files 90% figured out. My problem is I cant get the collapsed state that is loaded into the container to load the new state. I've included my files and they re really simple to follow.

View 0 Replies

ActionScript 3.0 :: Unloading An External SWF?

Apr 6, 2011

I'm building a site that has 7 sections. 1 section is a Photo Gallery for which I'm loading an external SWF file that is controlled by an XML file. Im doing this for allowing content editing any time.

All of the other content on the site is one-time, no backend required.

I've successfully loaded the external swf file into a loader in one of the frames. However, when I navigate away to the other 6 sections, I'm unable to unload the external SWF loader. How do I go about this?

Here's my code that loads the external SWF in one frame:

ActionScript Code:
import flash.events.MouseEvent;
//This creates a new instance of the loader object.
var my_Loader:Loader = new Loader();

[Code]....

View 3 Replies

ActionScript 3.0 :: Unloading The Swf Dilemma?

May 12, 2011

new to action-script 3. I have created a flash site with 5 buttons (home,tvcs,film,contact and about). All buttons navigate to labels on the timeline. The tvcs and film buttons load external swfs which show flv videos. They both load up fine but unloading them seems to be my problem. They still remain onstage and play on while navigating through other pages. I've tried a few scripting ways to unload but to no avail. I'm wondering how and where to add the unloadAndStop()method into my current script in order for it to work properly.

as below:

stop();
import flash.events.MouseEvent;
home_btn.addEventListener(MouseEvent.CLICK,hClick) ;
function hClick(event:MouseEvent):void{

[code]....

View 3 Replies

ActionScript 3.0 :: Pre Loader And Unloading Swf?

Jun 1, 2011

after fighting for 3 days to get my code to work properly i found out that there is a bug in flash player nine & ten.It cant remove a loaded swf 100% if you use unload();Then again you can use unloadAndStop(); but this also is not working 100% meaning removing everything from the loaded or loading swf.unloadAndStop() is a much better solution than using unLoad(); in my case, but still if i click on a button while my swf is loading and that button has for function to unloadAndStop the swf it will not remove it completely and throw me an error Error #2036.my website still works but it could be working much better and opens the door to errors while people visit my website.im fixing these error and what not by methods that i think should not be there in the first place.

View 0 Replies







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