Flash Advisor logo
:: Desktop Shortcut
:: Flash Help
Advice from Experts

Closed Thread
Results 1 to 4 of 4
  1. #1

    Default Need to play external flash swf's in a screen

    A client of mine has a picture of a living room with a tv set on the wall. I need to be able to put buttons on the screen that when clicked will play a different swf in the tv screen for each button. The swf's that play in the tv screen cannot be a part of the flash movie that contains the tv screen Hope this isnt too vague. Anyway can this be done without going crazy with action scripting?

  2. # ADS
    Join Date
    Always
    Posts
    Many
     
  3. #2

    Default OK I figured out how to call the external flash but...

    I need to make it play on a new layer on top of the background layer. Right now it REPLACES the background layer. Help me please oh wise ones.

  4. #3
    Join Date
    May 2004
    Location
    U.S.A.
    Posts
    2,890

    Default

    Hi,

    Create a movieclip on a seperate layer and load your external content into that movieclip. You can size and load external content at runtime. Here is a custom function for loading and sizing content to a movieclip...it loads to a movieclip named "picHolder".

    Code:
    function sizeLoad() {
    	this.onEnterFrame = function() {
    		//boolean variable to establish if the movieclip is loaded
    		if (_root.loaded) {
    			return;
    		}
    		//size  image     
    		if (_root.picHolder._width>0) {
    			with (_root.picHolder) {
    				_x = 50;
    				_y = 80;
    				_width = 450;
    				_height = 280;
    			}
    		}
    	}
    }
    //custom load function
    imagePath = "http://yourSite.com/folderName/";
    function loadBackGround(imgTarg:String) {
    	_root.loaded = false;
    	_root.picHolder.loadMovie(imagePath+imgTarg);
    	sizeLoad();
    }
    Now, all you need to load exteral sized content is...

    Code:
    myButton.onRelease = function() {
    	loadBackGround("someFile.swf");
    }
    myButton1.onRelease = function() {
    	loadBackGround("someOtherFile.swf");
    }
    Hope it helps
    NTD
    A mind once stretched by a new idea never regains its original dimensions.
    - Oliver Wendell Holmes

  5. #4

    Default Thanks a ton. Really helped me out.

    Quote Originally Posted by NTD
    Hi,

    Create a movieclip on a seperate layer and load your external content into that movieclip. You can size and load external content at runtime. Here is a custom function for loading and sizing content to a movieclip...it loads to a movieclip named "picHolder".

    Code:
    function sizeLoad() {
    	this.onEnterFrame = function() {
    		//boolean variable to establish if the movieclip is loaded
    		if (_root.loaded) {
    			return;
    		}
    		//size  image     
    		if (_root.picHolder._width>0) {
    			with (_root.picHolder) {
    				_x = 50;
    				_y = 80;
    				_width = 450;
    				_height = 280;
    			}
    		}
    	}
    }
    //custom load function
    imagePath = "http://yourSite.com/folderName/";
    function loadBackGround(imgTarg:String) {
    	_root.loaded = false;
    	_root.picHolder.loadMovie(imagePath+imgTarg);
    	sizeLoad();
    }
    Now, all you need to load exteral sized content is...

    Code:
    myButton.onRelease = function() {
    	loadBackGround("someFile.swf");
    }
    myButton1.onRelease = function() {
    	loadBackGround("someOtherFile.swf");
    }
    Hope it helps
    NTD

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Multiple SWF's in a website.
    By nh in forum Newbies
    Replies: 1
    Last Post: 05-03-2006, 10:21 PM
  2. Replies: 0
    Last Post: 03-29-2006, 03:40 PM
  3. loading external swf's sequentially
    By martink in forum Advanced Flash
    Replies: 1
    Last Post: 12-07-2005, 01:58 PM
  4. Rebellious flash slideshow is viewing full screen
    By Nebraskagirl in forum Newbies
    Replies: 5
    Last Post: 01-29-2005, 02:38 PM
  5. --flash loading screen--
    By concise8675 in forum General Flash
    Replies: 2
    Last Post: 07-08-2004, 10:58 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Sponsors
Create Speaking Characters for your website and Flash movies. 15 Day Free Trial