Solved

Loading External SWF into Expandable Ad Banner

Posted on 2010-09-12
4
583 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
ID: 33659020
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
ID: 33659262
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
ID: 33666538
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
ID: 33666558
Thank you!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Suggested Solutions

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to how to record live broadcast.

839 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