Solved

Reduce the size of the Flash SWF file it executes

Posted on 2014-03-07
12
410 Views
Last Modified: 2014-04-05
Hello,

I have created an SWF file with the dimensions of 750x530.  After it plays/executes I want it to reduce to something like 300x110.

Using Flash CS5.5, Action Script 3, CCS 3, PHP

Any ideas?

Have a great weekend,

Don
0
Comment
Question by:GEMCC
12 Comments
 
LVL 108

Expert Comment

by:Ray Paseur
Comment Utility
The aspect ratios don't line up.
750 x 530 = Aspect Ratio of 1.415
300 x 110 = Aspect Ratio of 2.727

But that aside, here is what I would do.  Create two versions of the SWF file - the large one and the small one.  In the web page that plays the large SWF file, set a long-life cookie.  Your scripts can detect this cookie and know that it's time to load the small SWF file.  Conceptually this is similar to having a one-time "splash" page in front of a web site.  This article describes the concept.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_3314-How-to-Show-an-Introductory-Web-Page-Once-Using-PHP.html
0
 

Author Comment

by:GEMCC
Comment Utility
Hello,

I don't think we are on the same page.  I have a session variable to show Flash the first time a visitor comes to the site.

What I am saying is yes the starting size is 750x530 and yes after the SWF is executed, I want the size to be reduced down to 300x110.  I am using z-index so the SWF file is "above" the rest of the page which means the links underneath it are not accessible.

I hope this clarifies what I am attempting to do.

Have a great weekend,

Don
0
 
LVL 108

Expert Comment

by:Ray Paseur
Comment Utility
Maybe if would help if we could see a site that does something like this.  Are there any links you can show us with "prior art?"
0
 

Author Comment

by:GEMCC
Comment Utility
Yahoo.com is currently rotating an ad for a movie called Mr. Peabody and Sherman that starts almost over the compete screen and finishes over on the right.  During the full-screen, the links under it are not  accessible.
0
 
LVL 108

Expert Comment

by:Ray Paseur
Comment Utility
OK, thanks for the link.  I saw that.  It's really two separate videos.  They spent a lot of money to make it look seamlessly integrated (but they can afford that - their stock has nearly doubled in the last year).

Can you please show us any code that you've tried?  And tell us a little more about where you're getting to sticking points? Thanks.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:GEMCC
Comment Utility
I haven't tried anything because I don't know what to do.

As mentioned, I am trying to make it so the links "under" Flash are accessible after the SWF has executed.  If there is a trick so this can happen, great, if it involves two different SWF's, great, otherwise, I do not know how to get it done.

Have a great day,

Don
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
I think what you are talking about is a modal.  I use bootstrap and that is already baked in.  There are a lot of options from jquery ui http://jqueryui.com/dialog/ to a pure js modal http://jsmodal.com/docs/usage.php or http://getbootstrap.com/javascript/#modals

You can program the page to load with the modal.  After your script is done, you can programmatically via js close the modal.

If you are just doing this to show some content, I would avoid locking people out until your movie is played or you will turn people away.  Most modals allow you to click off the modal or an X to close.  You can also program to not close too.  

Sites that rely on ads and have the ability to force you to wait can get a way with this.  Like youtube as example.  Many ads have the little banner that you can click or make you wait 5 seconds before offering to let you skip. Very few have the power to make you sit throgh the 20 or 30 seconds.  

Check out the different modal scripts, I think that should get what you want.
0
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
Comment Utility
there is no trick to make the links accessible.. What you do is reduce the display dimensions of the flash so that the video doesn't cover them up.  or change the z-index after it has played.
0
 

Author Comment

by:GEMCC
Comment Utility
Scott,

I have to admit, I do not understand the modal stuff.

David,

With regards to changing the z-index, this makes sense to me, but do not know how to get it done. Would this work?  If I change the z-index won't that move everything else around?  Please advise.

Have a great day guys,

Don
0
 

Accepted Solution

by:
GEMCC earned 0 total points
Comment Utility
OK, so here is what I did:

<script type="text/javascript">
      setTimeout(function(){window.document.getElementById("flash").style.visibility = "hidden";window.document.getElementById("logo").style.visibility = "visible";},30000);
</script>

Basically I hid the actual flash file and made the logo visible.

Thank you for your responses,

Don
0
 

Author Closing Comment

by:GEMCC
Comment Utility
Resolved my issue.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

762 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

6 Experts available now in Live!

Get 1:1 Help Now