ActionScript 2.0 :: Not Working When Called As External Swf?

Jan 2, 2010

Following is my code in AS2. It works fine when viewed as swf. But when i call this swf from another swf, the code does not work. Have spent a lot of time & racked my brains, but cant figure out.

[Code]...

View 4 Replies


Similar Posts:


ActionScript 3.0 :: Load An External Swf Called 'signs.swf' Into An Empty Mc Called 'signholder'?

Apr 12, 2010

I want to load an external swf called 'signs.swf' into an empty mc called 'signholder'.

var loadit2 = new Loader();
loadit2.load(new URLRequest("signs.swf"));
signholder.addChild(loadit2);

Everything works. Cool. But, I now want to target something within the signs.swf. How do I do it though? What is the path? Do I have to give the child of signholder an instance name? Everything I try fails.

If I wanted the root timeline of the external swf to gotoAndPlay(2) for example,...would i say...

signholder.loadit2.gotoAndPlay(2) ???
var wow:MovieClip = loadit2.content as MovieClip;
wow.gotoAndPlay(2) ????

View 3 Replies

ActionScript 2.0 :: Why Isn't Function Working When It's Being Called

Jan 21, 2009

The code that is commented out will work, however, I'm trying to turn that code, since it's used multiple times, into a function.

Why isn't my function working when it's being called?

ActionScript Code:
function displayInfo(_ROLL:MovieClip,_MC:MovieClip, _NN:MovieClip) {
_ROLL.onRollOver = function() {

[Code]......

View 9 Replies

ActionScript 3.0 :: ClearTimeout Not Working When BtnDown Function Called

Oct 1, 2009

Why timeout is not clearing. I declare the timer outside of everything so it can be seen by everybody. After the mouse moves on the stage, the timeout is set. Then as soon as the mouse goes down on a movieclip, the btnDown function gets called which is supposed to clear the timeout. And when the mouse goes up, the timeout is supposed to be set again. The funny thing is the timeout does get cleared when the hideControls function is called, just not when the btnDown function is called. However, everything is working like it's supposed to in the btnDown function except the timer.

Code:
var controlsTimer:uint;
// BEGIN TWEEN
stage.addEventListener(MouseEvent.MOUSE_MOVE, showControls);
function showControls(e:MouseEvent):void {
Tweener.addTween(controls_mc, controlsTweenIn);
[Code] ......

View 3 Replies

ActionScript 2.0 :: Setinterval Called Too Quickly Makes It Stop Working?

Mar 22, 2006

I am having problems with this function, which is called when a button is pressed. I am loading a JPG with a movieClipLoader into a newly created movieclip, and while this is loading the other is still viewable and is faded and deleted when the new JPG has fully loaded, using the code below:

ActionScript Code:
function loadBigPicture(iValue:Number, firstTime:String):Void {
this.createEmptyMovieClip("myBigPicture"+iValue, this.getNextHighestDepth());
trace(_level0["myBigPicture"+iValue]);

[Code].....

If the button is pressed extremely quickly again and again, the intervals begin to stop working

View 3 Replies

External Jpg Looks Pixelated When Called?

Apr 15, 2008

I am calling a group of "large" jpgs into a slide show viaxml at runtime.The files are at size and with no compression as they are seelocally on a touchscreen.They look good in Pshop on screen, but when viewed in the swfthey have odd edges in t etext areas or anywhere there is adramatic shift in color or contrast. It looks like compressionissues, but I have been through each file multiple times andnothing seems to be wrong.Is there a limit to what file size can be imported andmanaged clearly by flash?Movie is 1924 x 1200 and the slideshow running in the windois 1277x959(rgb,jpg,files@72DPI)Image quality is very important on these because they are on

View 2 Replies

ActionScript 3.0 :: External Interface Not Being Called?

Jun 14, 2010

i am trying to communicate from javascript to AS3 by using External Interfaces, now the problem is that the function i am trying to call works fine with Internet Explorer 8, but it doesn't works with firefox 3.5.9 or google chrome, below is the html / javascript code.

HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

[Code]....

View 5 Replies

Professional :: Repeative Opening Of External Swf When Only Called Once?

Sep 24, 2011

I'm a newbie to flash (being in i.t. since 1989). I'm using the following method to load an external swf file. The method is called from the main movies constructors

[Code]...

View 2 Replies

ActionScript 3.0 :: Have An External Class Called Webcam.as On The Stage?

Oct 27, 2010

i have an external class called webcam.as on the stage I have two buttons. One called capture_mc and save_mc. I am new to working with external actionscript class. If someone could explain to me whatsI am getting lot of errors!!!!

Code:
1172: Definition flash.utils:byteArray could not be found.
1046: Type was not found or was not a compile-time constant: ByteArray.

[code].....

View 3 Replies

ActionScript 3.0 :: Run The External Swf's Actions When It's Called Main-intro.sql

Nov 11, 2009

I have a swf called main.swf that is loading an external swf called main-intro.swf.main-intro.swf has a clip that fades up and then I have a stop action 24 frames in. The problem is is that I get a null object reference error (1009) when calling the external swf. If I remove the stop action then it works, if I rename the external swf to intro-main.swf it works with the (stop action).It seems it just doesn't want to run the external swf's actions when it's called main-intro.sql

View 2 Replies

ActionScript 2.0 :: Preload Image And Fade For Each External MC Called

Aug 9, 2004

I have a movie that calls other movie clips with a preload and fade for each external mc called. but after you call and load the swf in the container it disappears aftre about 30 seconds it disappears if you dont do anything and then it comes back after about 30 seconds. I am using this script for the preload object and fade.

onClipEvent(enterFrame){
if(dummy ==1){
_root.text._alpha += 10;
} loaded = _root.clip.getBytesLoaded();
total = _root.clip.getBytesTotal();
[Code] .....

Then this is on every frame to make it use the preload and fade in the new loaded swf after it shows it loading.
clip.loadMovie("GuardHouse.swf");
clip._alpha = 0;
now = 0;
text.dummy = 1;
//now load the external file into the myData object
myData.load("GuardHouse.txt");
stop();

Also I dont know if this has anything to do with this problem but when I load an external swf it does not show any actions i have in there or any text but does show images and shapes but not dynamic text boxes or fades or anything like that. You can view it at the url below. I have listed the link to the main movie swf and the map1.swf that it calls when you click on floor plan so you can see when you view the map1.swf by itself there is more stuff that does not show up when loaded into the main swf. [URL]

View 7 Replies

ActionScript 2.0 :: Swf Called Main.swf Which Has A Container Movieclip That Gets External Swf's Loaded Into It

Jul 28, 2004

I have one swf called main.swf which has a container movieclip that gets external swf's loaded into it.

my external swf is called hosting and it calls an array of data that is loaded into a movieclip that is duplicate for each element from the database. The elements from the database are as follows:

Business
Economy
Power
Standard

Each one of these has a button over it that when press loads information from the database into a movieclip that contains a textbox. My button code is: _root.movieclip.loadVariables("url to database");

This works flawlessly when I run the hosting.swf by itself, but when it is loaded into the contianer in the main.swf the buttons dont work. I believe that it is the _root in the button call that is causing this but I dont know how to fix it. I think the _root variable changes when hosting is loaded into the main.swf.

View 1 Replies

ActionScript 3.0 :: Movie Clip Called CircleFill And Another Called CircleOutline?

Oct 30, 2007

I am having issues with startDrag(). I have a movie clip called circle. Inside circle, I have a movie clip called circleFill and another called circleOutline.onEnterFrame, this movieClip is duplicated 4 times.

When I use this:
private function onPressNow(event:MouseEvent):void
{
startDrag();
}
IT DRAGS ALL 4 MOVIECLIPS.

[Code]...

how can I make it drag my movieClip called circle? (meaning both circleFill and outlineFill)

View 8 Replies

ActionScript 3.0 :: Called InfoBox That Contains A Text Field Called Caption?

Oct 24, 2011

i have a box called infoBox that contains a text field called caption. infoBox expands on mouse-over. When it does so, I do not want the text in caption to scale up - I want it to stay at 11 pt. So far my code to prevent this from happening is not working:How do I fix this?[URL]..

View 2 Replies

ActionScript 2.0 :: Buttons And Transitions - Load In External Swf Files Into An Empty Movie Clip On The Main Stage Called Container

Jan 11, 2004

I have a problem with buttons and transitions and it is similar to a problem I had a couple of days ago that I posted and that was sorted out. I have two buttons onstage (they're inside a movie clip) inside the movie, on the button one I have the following

[Code]....

I have similar code on button two and this does indeed make the buttons move into place as required. My problem is this, I need to load in external swf files into an empty movie clip on the main stage called container. These External SWF files have transitions and this is where my problem is. If I place a normal button on the stage it works but not if the button is inside a movie clip and has actions applied as above. The code next is what I have believe should also be placed on the button to make swf transition one load in.

[Code]....

View 4 Replies

ActionScript 3.0 :: Compiler Bug - Var Declaration Function Definition Postcedes External Called Function Execution

Jun 29, 2010

Use Flash CS5 (and AIR, though this does not seem like it would be AIR related) in Win XP 64 I have a MovieClip symbol in my library with the identifier 'Puzzle10Piece10' with the following actionscript attached to frame 1 of the only layer with the following actionscript:

[Code]...

This runs contrary to my understanding of the pre-compiler and code execution order. In my way of thinking, any reference creation and related memory allocation is made when the object is instantiated, and indeed that allocation, unlike C depends not on code order (declaration before use), though this is an order that would satisfy even the C pre-compiler. If I understand the Flash compiler at all, it's not even a question of 'code order'... the symbol is pre-compiled such that for it to exist... for it to be instantiated, the variable would exist before the function would even be 'available' to be called internally or externally. Is my thinking way off, or is this a bug?

View 6 Replies

ActionScript 3.0 :: Loads A Gallery Of A External File Called Gallery.swf?

Mar 16, 2009

In my "actions" layer I have a function that loads a gallery of a external file called gallery.swf. The swf loads successfully but I cant remove that. The only way to remove is to call removeChild(mLoader.content); I noticed that the movies loads without addChild.

But sometimes also calling removeChild(mLoader.content) the content of mLoader is not removed and still appears in the stage.

[Code]...

View 5 Replies

ActionScript 2.0 :: Preloader - Can't Get Any Of The External Swfs To Load Into The Empty Movie Clip Called "content"

Oct 24, 2003

I went through Claudio's preloader transition tutorial on kirupa ([URL]). I have tried to apply it to my own fla and everything seems to work fine EXCEPT I can't get any of the external swfs to load into the empty movie clip called "content". And yes, I have checked and rechecked to make sure that all MCs have instance names!

View 7 Replies

Wordpress Based Site That Stores Information About An Image In A Database Field Called "background" In A Table Called "wp_postmeta"?

Jul 22, 2009

I have a wordpress based site that stores information about an image in a database field called "background" in a table called "wp_postmeta".The 'loader' gets an url such as "/thisImage/background.swf"The "background.swf" should somehow display "background.jpg" instead but since I've changed the field name in the database (from background to temp_background) it doesn't work.I pass variables to the "loader" swf and they are correct based on the new field name but it still isn't working.I need to know if there is anything in the .fla's (and therefore the .swfs) that is pointing to somewhere in the database hard-coded. Basically I need someone to look at them and tell me how they are working.

View 2 Replies

ActionScript 3.0 :: Target Path - Control A Movie Clip Called "nosotrosmc" With A Frame Label Inside Called "historia"?

Oct 5, 2009

i'm trying to control a movie clip called "nosotrosmc" with a frame label inside called "historia" but does not work this is the code:

[Code]...

View 2 Replies

ActionScript 2.0 :: External .swf Button Not Working.

Mar 18, 2009

Ok here is what I have.

randomLoader.swf - It has two layers. One being movieclip layer for loading the external .swf files to. The other is the script layer with the following code:

Code:
filename = ["random1.swf", "random2.swf"];
path = "http://www.domain.com/random/";
i = filename.length;

[Code].....

Now if I just embed randomX.swf into HTML they work fine. But if I embed randomLoader.swf in the HTML to load a different randomX.swf file everytime the page loads/refreshes the button seems to show up but does not function. I get the hand but clicking it does not take you to the URL.

Should I be using Java or PHP instead to load the randomX.swf files? I like how well what I have already is working and I don't have to touch the page to update it to show new randomX.swf files. Just need to get Z buttons to work

View 4 Replies

ActionScript 3.0 :: External Preloader FLA Not Working?

Aug 19, 2009

I export all my stage assets to frame 1, so the external preloader FLA is the approach I've been using for a while to show the nice percentage before the real SWF is loaded. I've just finished with a project and I'm getting errors when the file is done loading.The file works fine as long as it's not it a Loader component (stand-alone SWF), but as soon as I try to get it in the preloader it gives me a ton of errors.

The only major thing I did differently with this project is that a number of classes have their own individual Event.ENTER_FRAME listeners and that *I'm making a lot of stage calls* from various classes to get locations and what-not. I'm thinking it might have something to do with the latter, since I used the stage width/height for a lot of the positioning (stage.stageWidth/2, stage.stageHeight/2, etc).

View 7 Replies

ActionScript 3.0 :: External Interface Not Working In IE7?

Sep 16, 2009

I'm having a problem with Flash and Internet Explorer. I'm trying to close out a browser window with
 
//as code ExternalInterface.call("closeWindow");[URL].. Of course this works in all other browsers except IE, the error that I am getting is:'null' is null or not an object

View 9 Replies

ActionScript 3.0 :: External Swf Code Not Working?

Sep 2, 2009

this is probably a very simple mistake made by many beginners. Basically, I have a preloader loading an external swf. The external swf is an image sequence. I wrote actionscript so you can scrub through the image sequence using the keyboard arrows. This works by itself but does not work when preloaded.

[Code]...

View 8 Replies

ActionScript 2.0 :: External Swf Microsite Not Working?

Oct 15, 2009

I have not been able to get my flash off-line presentation to work properly. I have a list of projects that I have done and I want to present them by using an empty_mc and load the various swf into this empty containers. I have this part sorted, I can load the swfs and unload them. The problem is that most of this swf are games and micro-websites and for some reason some of the buttons or functions whithin the swf dont work properly (they work when I use them anywhere else but not in this presentation). I dont know what is causing this, it could be the code im using, or it could be something related to the level where the swf is loading. I dont know! Im stuck here and is very anoying.

//this code is inside a movieclip called hyo_mc and it tells the swf to load into an empty container called cont_hyo //
stop();
cont_hyo.onRollOver = function () {
_root.createEmptyMovieClip("cont_hyo", 0);

[code]....

load swfs and use them normally. I dont want to create a javascript pop-up in an new window as this presentation is off-line and I would rather have all the content within the presentation.

View 8 Replies

ActionScript 2.0 :: MX 04 External Swf Actions Not Working?

Sep 7, 2005

My main movie is called 'main.swf' and it is importing 'newgallery_1.swf' to the target named 'holder1'. It imports fine some functions work ok for example the movie pans left to right depending on the mouse x position. However when I tried to add something like the mouseOver tool tip I found here on Kirupa to a button on 'newgallery_1.swf' it works when viewed normally but when I import it to 'holder1' it no longer works.

View 9 Replies

ActionScript 2.0 :: Buttons In External Swf Not Working

Jun 24, 2009

I have this weird problem. I'm using a main fla to address all my external swfs into a loader. This is the script:

[Code]...

It loads just fine, but for some reason when I click in every button inside the loaded movie it wont work. Nothing happens, even though the mouse cursor changes to button mode.

View 4 Replies

ActionScript 2.0 :: External Swf Transitions Not Working

Mar 16, 2005

okay, this is driving me crazy. i used this tutorial: [URL] for creating transisitons between diffrent swfs. i have it set up exactly how the tutoral shows me, and i changed the necessary AS to the buttons that i have, as well as the contianer MC. but for som odd reason, when i press a diffrent button from one thing to another, the swf that comes through is still the first one.

View 2 Replies

ActionScript 2.0 :: Loadvars Not Working On External Domain?

Aug 27, 2009

I have Domain1 that is hosting my flash .swf file, and Domain2 that is linking to that .swf file. In the flash file I have a;loadVars.send "POST");command. When the flash file is placed anywhere on a page on Domain1, this works perfectly fine. But when placed on Domain2 (and other domains), this loadVars statement does not work and does not forward to But when I change "_self" to "_blank" - the statement works fine on Domain2.

View 4 Replies

Actionscript 3.0 :: Preloader No Longer Working With External Jpg?

Sep 4, 2009

i tried looking here with the keyword 'preloader', to find answers to my problem but I didn't.I'm a freshman AS3 developer....with a portfolio site to launch asap.

I have a movieClip in my library that is exported to AS (external jpg) - it is loaded separately from anything else in my scene (which is disrupting my normal preloader animation). When I simulate the download my preloader doesn't appear in my preview window, and I have no error message either. At first, not sure what the problem was I tried various preloader tutorials online hoping to find a solution.
I only realized later on that my preloader didn't work because of my external jpg.How can I make my preloader (code below) load everything altogether? (elements in my scene + external jpg)

PRELOADER (first frame);
Code: Select allimport flash.display.MovieClip;
import flash.events.ProgressEvent;

[code]...

View 4 Replies







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