Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Loading External .SWFs into Flash

New Here ,
Mar 15, 2013 Mar 15, 2013

OK, so I asked this question earlier :

http://forums.adobe.com/message/5135410#5135410

I didn't seem to get into much detail. My first question is, did Ishkur somehow make a transparent background for his external .swfs, or did he make a regular one, and used some sort of code or setting to make it so it appears into the bottom-right? And my second question is, where do I apply this code / where does it go? Does it get paired with the buttons which signal the flash to load the external .swfs? I sincerely apologize for my non-stop customer support ._.

myMovieClipInstance.loadMovie("myExternalMovie.swf");  // here only the filename is given, indicating the SWF file is in the same folder as the parent swf

TOPICS
ActionScript
1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Mar 15, 2013 Mar 15, 2013

You don't have to do anything to get a transparent background.  When you load an swf into another swf, the loaded file has no background, only the primary file does.

You place your code based on what you intend to trigger the loading.  If it is a button that will trigger the loading then you place the code in the button's code.  If it will occur when you enter a particular frame then you place the code in that frame.

Translate
LEGEND ,
Mar 15, 2013 Mar 15, 2013

You don't have to do anything to get a transparent background.  When you load an swf into another swf, the loaded file has no background, only the primary file does.

You place your code based on what you intend to trigger the loading.  If it is a button that will trigger the loading then you place the code in the button's code.  If it will occur when you enter a particular frame then you place the code in that frame.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 15, 2013 Mar 15, 2013

I shall try it!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 15, 2013 Mar 15, 2013

So I converted my button (blue button that says 'Indie') and I named it IndietronicaBTN (it's a MovieClip, obviously), and I typed in on the frame's actions, IndietronicaBTN.loadMovie("square.swf");

It didn't work, so I had to publish it, and I tried again, and it didn't work. Wheeeeere did I go wrong? square.swf is spelled correctly, and no error/debug window comes up when I launch.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 15, 2013 Mar 15, 2013

If you want to use the button to load the movie, then you assign button interaction code to the button...

IndietronicaBTN.onRelease = function(){

     loadMovie("square.swf");

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 15, 2013 Mar 15, 2013

**Error** Scene=Scene 1, layer=Techno, frame=4:Line 3: Wrong number of parameters; loadMovie requires between 2 and 3.

          loadMovie("square.swf");

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 15, 2013 Mar 15, 2013

Look at the loadMovie function in the help documentation to determine what else you need to specify. 

If you don't know how to use the help documentation, it is important that you learn -  it is your key to solving problems without looking to others to do it for you. 

Click Help -> Flash Help in the top toolbar to open the Help interface (or press F1).  With Actionscript 2.0 selected in the dropdown of the Help panel, type "loadMovie" into the search field and click Search.  Look thru the results and find the loadMovie function and select it to have its documentation appear.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 15, 2013 Mar 15, 2013
LATEST

No entries found. I'll just Google it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines