?
Solved

Reduce the size of the Flash SWF file it executes

Posted on 2014-03-07
12
Medium Priority
?
466 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
11 Comments
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 39913532
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
ID: 39913746
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 111

Expert Comment

by:Ray Paseur
ID: 39913885
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:GEMCC
ID: 39913928
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 111

Expert Comment

by:Ray Paseur
ID: 39913976
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
 

Author Comment

by:GEMCC
ID: 39913981
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 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39965559
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 84

Expert Comment

by:David Johnson, CD, MVP
ID: 39965582
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
ID: 39965627
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
ID: 39968262
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
ID: 39979836
Resolved my issue.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses
Course of the Month15 days, 5 hours left to enroll

840 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