A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: [RESOLVED] Resize Stage? Impossible right?

  1. #1
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156

    [RESOLVED] Resize Stage? Impossible right?

    Okay, I work for a car dealership and I'm doing some ads for them. The people we're advertising with said that we can do ads that expand outward if we want. I'm thinking, that's great and sounds fun, but how do we do that. So I build a test thinking they are going to handle the resize with some javascript or css; and guess what, they don't. So I call them and ask them how I need to send it to them to do it and the one guy there says,"I don't know, we just have this swf uploader thing that puts them in. I just need to locate the file and upload it." So, my question is, is there a way to resize the stage dimensions dynamically in flash? As far as I know you can't. And, since this is probably how it is, how might these other people have been doing it. What other programs can export as a swf that maybe have these capabilities. Or, is there some way I can trick it into happening? Use external scripts located on another server they don't know about? HOW can this be done. I know it's getting done because they've uploaded swf files to the server that apparently complete this task. Any suggestions?
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  2. #2
    Senior Member
    Join Date
    Mar 2001
    Location
    Location : Location
    Posts
    131
    Hi

    I think the expandable ads work by manupulating an < iframe > which only shows parts of the movie on the html page ..... big frame for all the movie .... smaller window for initial banner size ..... at least thats how I'd do it. Go find a page with a similar ad on and look at the source to see if the .swf if inside an < iframe > or expandable < div > layer.
    this[MCr.i + 'm_not_ok']._lyric = "you sing the words but you don't know what they mean";

  3. #3
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    hi..

    this is achieved by using <DIV> and some CSS to layer the .swf object on a z-index ABOVE the rest of the HTML content.

    example.. you have a two frame movie.. in frame one.. shows a box that is 25x25.. you rollvoer the movie..and it goes to frame 2.. showing a bow 300x100 now... when you rollOout..it goes back to frame 1..

    simple rollOver type movie project...

    in my footer is a link called z-index.. read it.. it may provide some direction for you.

    or google z-index + flash

  4. #4
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    Whispers, you're all over my posts. I've obviously got a lot of different things going on right now I'm having trouble with.

    I've actually already looked at your z-index link once before. But, I checked it again. The truth is I understand how to manipulate it this way. The only problem is, I have no control over how they embed the ad into their site. And, they have no control either. In my search I did come across something that may be what I'm looking for. Here is a link to it:

    http://www.mustardlab.com/developer/flash/objectresize/

    What this does is use javascript to change the stage dimensions in the html. But, the problem with this is the file has to be called in the head of the html, which no one has access to. Might there be a way to get all of it to the html page using flash?

    Oh, whispers, maybe I don't completely understand. But are you saying I could import a .css to make my changes dynamically kind of like I'm mentioning above?

    just in case; the page my ad will be is:

    http://www.bakersfield.com/


    Thanks guys.
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  5. #5
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    hi..

    the link you provide (while a nice resource to bookmark) I dont think it will do what you want it to.. that will basically just change the stage dimensions.. which inturn would possible change your HTML layout/code...

    you could also use javaScript to write the <div><embed> code as well... ut you may face same problem as you do now...

    using CSS may be your only route to look into if you dont have any control over the code.. but Im not sure to be honest..

    your going to have to figure out to layer it ABOVE your HTML content, I think that may be the only way..

  6. #6
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    Okay, that's kind of what I was thinking. I wasn't sure how I could use the info in my link to do what I want. Okay, so more on the CSS way of doing it. I have not done it but I'm assuming I can load an external css file into flash. Is that what I would need to do to get this to work?
    Would I write a file that I import that will somehow get the embeded swf and get it above the html?
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  7. #7
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    Sorry I dont have much experience with CSS and Flash... but I would assume it just effect the .swf and the objects inside of it.... a .css would need to be applied to the HTML page(s) for the .swf to be layered...

    but wait for more experienced users in this area than myself.. they may know

  8. #8
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    okay, thanks. I'll check around for some more answers and post back when I get something concrete.
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  9. #9
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    Whispers, I've figured out the method that they are using to resize the stage. I've done it sort of at this url:

    http://www.webmakerx.net/Images/Site...esizeTest.html

    If you view the source you'll see in the head I have a simple javascript function that I call from within flash. I now know that they are doing the same thing because I looked closely at one that lincoln-mercury is running on the same site that I'm trying to get my ad on.

    Here's the catch. I can only do this right now by using call to get a js function on the html page. Is there a way I can use getURL or externalInterface maybe to send the js function to the html. I'm not sure if I'm wording that right. Remember, I can't control how the fla is embeded, so I've got to get the javascript to the html through my fla; any suggestions?

    here is a link to actionscript.org with a 3 page post on this same subject:

    http://www.actionscript.org/forums/s...nge+stage+size

    Just in case more people want to know how.
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  10. #10
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    I understand what is it you want to do..and I know how to do it.. (normally) (like your links)..

    however using ExternalInterface calls a function in the wrapper (ie: HTML page).. and since you dont have any control to put the function in there..that wont work...

    Im going to go out on a limb here and say this cant be done without access to the HTML page... either by re-writeing the <DIV> / embed code for the .swf or the CSS for the HTML page that contains the .swf

  11. #11
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    Okay, so I've got to have access to the code you think? I've contacted them again to ask them if they did anything special for the particular ad that I see doing this on there page. I've tried going over the source on the page but they call a lot of external stuff that I can't see so it doesn't do me much good. I'll keep working on this and hopefully figure out what's going on(maybe they just don't like me ).Thanks for the help. If I find out anything different than what you already know then I'll post back.

    Oh one more question real quick. If I wrote a script to do the changes for me would it be possible to get it their page without them uploading it. I'm sure the answer is no because if that were possible then anyone could do that and hack their page but just thought I'd ask. Maybe calling it through flash and posting it somehow? I don't know anymore; I'm reaching. Thanks
    Last edited by mneil; 08-07-2007 at 01:09 PM. Reason: I meant without them uploading
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  12. #12
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    Well....you're right as far as I've got. Have to have access. I've talked to some more people and searched now for almost 40 hrs. on this subject and learned a lot. There is a function for me to call loaded on an external script on the page my ad will display. Right now I'm waiting for the guys to send me the function name so I can get it to work. Sorry for the runaround on something that is impossible.

    Thank you!
    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  13. #13
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    No problem.. I was fairly certain th was no way to do it without access to the code/page....

    but you never know.

    hope it all works out for ya.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center