Flash Question
- Started
- Last post
- 29 Responses
- jeremy_tai
I'm trying to figure out how to embed Flash in html and have the width and height be set at 100% but only have part of the Flash file scale.
An example is on the Future Farmers Website where the bottom blue part of the file scales to the width of the browser window.
How do I have to build the Flash file so only a part of the SWF scales?
thanks.
- rson0
http://62.212.64.131/component.c… i had the same issue. try using this comp. I didn't have much luck
- ozhanlion0
Stage.align = "TL";
Stage.scaleMode = "noscale";put a listener that listens your stage onResize() method. Thus, changing the position according to. Also when publishing your movie make suer it is set 100% w h.
hth
- jeremy_tai0
i've got the stage set to align left but i'm not sure how to include/code the movieclip that scales in the file.
any ideas?
- jkosoy0
if i think i understand what you're talking about...
there was a thread a little earlier on this somewhere. there's a dev note on macromedia.com written by brandon hall that goes into this, and i have some scripting written at home somewhere that goes a little more in depth with it.
http://www.macromedia.com/devnet…
g'luck!
- Seph0
Anyone got URL of this actually working?
I'm curious, I want to know too now.
- jeremy_tai0
jkosoy,
that article mentions how to keep the content to the top left but doesn't mention how to scale just a part of the flash file and not the whole thing.any ideas?
- jeremy_tai0
still looking for a solution...
- jkosoy0
i don't recall offhand what the code is for it. i remember adding a listener to the stage, but beyond that i'm braindead at the moment.
lucky for you i wrote down the exact script i used.
unlucky for you that its at my house, which i wont be at until 8pm or so tonight.
drop me an e-mail reminding me to dig it up.
:)
- jkosoy0
correct: i didn't use the script, i simply saved it.
someone actually gave it to me. i don't remember who, but they deserve the credit.
- jkosoy0
whooo! posted in the ntb section. fame and fortune, here i come. :)
- jkosoy0
someone on newstoday deserves the credit for this script other than me. unfortunately, i don't know who it is.
i haven't tried this out, so i'd like to know/see the results. keep me posted.
// resize stage when the browser window is scaled
this.onResize = function()
{
this.onEnterFrame = function()
{
this._height = this.-height - (this.-height - Stage.height) * .3);
}
};
- chibasan0
so where does that script go?
- shant0
This effect is going to be on every single design site now.
- jkosoy0
maybe it will be, maybe it won't. its a nice effect. its nice to see flash integrate with the browser for once instead of being so self-contained.
the script goes on the root timeline.
- mikotondria20
sorry - I placed this code and corrected the _height syntax, published with 100% and by pixel, and I dont see any difference from without the script..
Whats supposed to happen ?
- chibasan0
i can't get the effect to work inside the browser with the new code......will work on it later....thx jkosoy
- jeremy_tai0
download an example file here:
- shellie0
way to make me feel bad shant. i was just about to publish my new site with that effect. now im not. NOW WHAT AM I GOING TO DO?
asshole.
- mikotondria20
sorry - :(
I still see nothing of this 'effect'. What is supposed to happen.. The FranklinMint download I just previewed (IE6), and it was exactly the same as if Id just published the movie with a fixed pixel size. No resizing, nothing out of the usual happens when I resize the browser.
What am I missing out on?
Any live 'working' examples ? - my curiosity is aroused, goddamit :)...
- jkosoy0
the objects in the file will remain the same size while the scale of the browser is changed. watch the green square as you resize the SWF in the demo jeremy linked to. it stays the same constant dimensions while the BG is changed.
I suggest the demo over my script. Its a little bit better a visual to see whats going on.