Solved

Loading External SWF into Expandable Ad Banner

Posted on 2010-09-12
4
582 Views
Last Modified: 2013-11-11
Hi,

I am working on a Flash project in AS3.  I have only enough knowledge to be dangerous!  Here's the situation:

It's an expanding ad for an ad serving company.  I created the ad, using a template from them, which has a component in it that expands the ad on rollover, and collapses on rollout.

It works.  However, the ad can only be 40k, and it's 160k!  But the loophole is that the first part (non expanded, 300x250) can be 40k, and then a second movie (500x250) can be larger upon user initiation (the rollover).

So I need to split the movie into two: the first part (300x250, 40k), and then when the user rolls over, the second movie loads.

So what I want to do is to have the rollover in the first movie load the second movie (instead of expanding), and then have the second movie have the expansion/collapse component.  So the user rolls over the first movie, the second movie loads, and then the expansion happens.  Not sure if it will work, but that's my thought.

Only trouble is, I don't know how to load an external movie! This is AS3 and I have CS5.  Can you help?  Let me know if you need more clarification.  I'm not an Flash expert.

Thanks!
0
Comment
Question by:smfmetro10
  • 2
  • 2
4 Comments
 
LVL 1

Expert Comment

by:ihaveitnow
Comment Utility
Hi smfmetro10,


Actionscript 3 is able to load external files with the Loader class. This is done by calling its load() method.

See the attached.

Hope this helps, regards.
//loading external swf

var myLoader:Loader = new Loader();

myLoader.load(new URLRequest("external.swf"));

addChild(myLoader)

Open in new window

0
 

Author Comment

by:smfmetro10
Comment Utility
Thanks ihaveitnow!  It seems to be working, at least in my SWF.  I can't quite get it to work in their ad serving software, but I will contact them about that.  

Can you tell me, is there a way to load the external swf and jump to a specific frame within that movie?
0
 
LVL 1

Accepted Solution

by:
ihaveitnow earned 500 total points
Comment Utility
Hi smfmetro10:,

Try having a look at this link.

http://www.actionscript.org/forums/showthread.php3?t=56868

Hope this helps, regards.
0
 

Author Comment

by:smfmetro10
Comment Utility
Thank you!
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Problem witih Adobe Flash Player with a W7 machine 21 51
black magic design 1 108
Running Mp4 or Flash Video 1 81
flash in chrome 4 65
This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
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 set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now