Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Loading External SWF into Expandable Ad Banner

Posted on 2010-09-12
4
Medium Priority
?
587 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
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 select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

636 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