?
Solved

Calling an external SWF using a movie clip

Posted on 2009-12-28
10
Medium Priority
?
278 Views
Last Modified: 2013-11-11
I have a parent Flash 8 file (main.fla) in which I want to load a child SWF (tagcloud.swf) when I get to the last frame.

The tagcloud.swf requires some external code to work (see XML and HTML).  I don't have the source code for the child SWF but I do have permission to use it in it's compiled form

I am trying to use a movie clip and load the child in the last frame of the parent.

I believe I am using the correct syntax (no errors to report), but the movie clip does not seem to be loading tagcloud.swf.  

I've provided the source files.

main.fla
tagcloud.swf
tagcloud.xml
pasqpedia.html
0
Comment
Question by:Will_Anglin
  • 5
  • 3
  • 2
10 Comments
 
LVL 19

Expert Comment

by:moagrius
ID: 26135445
tagcloud is an AS3 / AVM2 file - while your main.fla is AS2 / AVM1 - you can't load an AVM2 file into an AVM1 file.
0
 

Author Comment

by:Will_Anglin
ID: 26135502
Bummer.

Is there a method to load an HTML file within a SWF?  Similar to an iframe?

I really don't want to have to upgrade to CS3 or 4 just to get this to work.

Thanks in advance for any alternative suggestions.
0
 
LVL 19

Accepted Solution

by:
moagrius earned 1000 total points
ID: 26135766
"Is there a method to load an HTML file within a SWF?  Similar to an iframe?"

Nope - not even close, really - html support in flash is extremely limited, and really only support basic text formatting and images.

I can't really think of any alternatives - you'll either need to upgrade to AS3 or convert tagcloud to AS2.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 14

Expert Comment

by:TanLiHao
ID: 26135877
Actually for AVM2 and AVM1 to communicate, there are some cheap tricks you can do. Using LocalConnection to communicate or using ExternalInterface to swap the swfs instead of loading the swf into the parent swf will be a choice too. There are definitely ways to do what you want, but upgrading to AS3 is better.

If you however do not want to do that, I can give you further information. Or moagrius can, I don't want to interfere with the question but I'm just offering you a possible alternative.
0
 
LVL 19

Expert Comment

by:moagrius
ID: 26138321
he wants to display an AS3/AVM1 animation inside an AS2/AVM1 swiff that has other display elements that need to persist, not just communicate with it or replace one with the other.

if you (Tan) have another idea that might work, definitely jump in and take over - i don't mind at all : )
0
 

Author Comment

by:Will_Anglin
ID: 26140689
I appreciate the input, but no solutions or work-arounds have materialized.

My circumstances are thus:

1. Customer loves the tagcloud menu and wants to use it on a specific page within his all-Flash website
2. Author of the tagcloud won't share source code...so the suggestion to convert it to AS2 is moot
3. I don't have a license for CS3 and don't want to spend $1000 to upgrade just for this problem so the suggestion I convert the parent SWF to AS3 is moot

I have decided on a hack for this one page of the website.  I will simply contain multiple SWFs within a table on the HTML page.  These SWFs do not need to communicate.  

Expert advice was helpful but did not offer a solution to the problem.
0
 
LVL 19

Expert Comment

by:moagrius
ID: 26141003
there is no "solution" for this problem besides what was presented.  i downloaded the files, and had to decompile one to determine the exact problem that the poster was unaware of (AVM1 vs. AVM2)

i won't formally object, but do feel the points should be awarded.
0
 
LVL 14

Expert Comment

by:TanLiHao
ID: 26143474
I actually have another solution for you, that is I will make an AS3 loader that loads a child swf (your parent) and then loads the tagcloud.swf (your child). It can be made dynamic by loading from an XML or from an XML returned from PHP so that you can use it for future projects.

There are many ways  to get what you want but it depends on how you want it to be like, I haven't took a look at your files but I will if you are willing to continue the question.

If you do not want to continue the question, I do think you should accept moagrius's as the solution, since he actually answered your question that it's not possible without any tricks/hacks.
0
 

Author Closing Comment

by:Will_Anglin
ID: 31671303
OK...so I'll give you your points.  But, honestly.  If you read the question, you can see that *no* solution was offered---except for the one that I came up with myself.  

The purpose of this forum is not to collect points.  It's to offer solutions.  If you don't have a solution or a work around to offer....just move on to the next thread.

My solution works.  You guys have offered advice but no solutions.  Alluding to "tricks and tips" without being specific just doesn't cut the mustard.

Since I'm a premium member paying for this service, who cares if I spend 500 points on a non-solution?  I appreciate the advice, but resent the amount of time I've spent on this thread at the expense of getting my project done.

Anyone facing a similar issue in the future will need to look to my solution (if they can find it) as the only work-around in this thread.
0
 
LVL 19

Expert Comment

by:moagrius
ID: 26148099
http://www.experts-exchange.com/help.jsp#hs=29&hi=405

"If you don't have a solution or a work around to offer....just move on to the next thread."

there are a LOT of questions asked here - and on boards all over that i participate in (for free - points aren't paying my mortgage ) - that have no possible solution.  if we all just moved on, there'd be a lot of frustrated posters.

i'm sorry you weren't happy with the answer, but it was correct - you can not load an AVM2 swiff into an AVM1 swiff.  period.

i'm replying not to start an argument, but to explain - there is no solution possible.  no other expert could have given you a better answer.  the answer is, simply: it can't be done.  if i hadn't told you about the virtual machine conflicts, who knows how long it would have taken you to figure that out and recognized the approach was fundamentally flawed?

anyways, best of luck on your project.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question