Monday, March 26, 2012

Mixing aspx and flash

I'm working on my site right now, and I am planning to use a Flash movie. I'm wanting to do some intergration and things with the flash and the aspx.

One of the things I am wanting to do is allow URL's to load the correct parts of my movie. I plan to use a full window movie that loads other movies. I'm wanting to find away to skip my load screen and load the correct movie if the user types in a URL.

What do you guys think? I have an idea about this, but haven't done any testing yet. Look at http://netnsite.com I want it to skip the initial stuff and load the content if the user is on the site for one thing and I also want it to jump to a section based on the URL.

For instance if I'm on the site and I type in a new site URL I want to try to get an effect just like if I had clicked a button and loaded the content in flash.

I'm thinking about this because of the search engine problem I had awhile back.

I'm thinking I can use some variables written into the object tag or something for the movie, but I don't know yet.As far as I know flash can interact with asp so it should be able to do the same with asp.net. I think it can accept parameter using LoadVariable method, so I guess you should be able to use LoadVariable to check the QueryString and based on that Play/Jump to the section you want. Search for LoadVariable in ActionScript reference.

Hipe this helps.
I read awhile back about being able to pass variables through the object tag into the movie. I'm going to try that first. That way I could just have either a dynamic page that used the URL rewrite I just learned or I could have multi pages with a var on the object to of loadMovie=whatever

I'll post something when I have some findings
I read awhile back about being able to pass variables through the object tag into the movie. I'm going to try that first. That way I could just have either a dynamic page that used the URL rewrite I just learned or I could have multi pages with a var on the object to of loadMovie=whatever

I'll post something when I have some findings

Have a look at this article, it should help...
http://www.smartwebby.com/Flash_and_ASP/basics.asp
Yeah, what I want to try and enable is the apperance of what the are talking about from the adress bar; see if you load my site you'll see the animations and so on it does. What I want to try to do is make sure if that has played once it won't play again and allow url navigation which usually doesn't work with flash.

It's like having everything happen through flash but I want to add a layer of urls to allow this to work like it would in flash from a url being entered.

Say I'm in section A and there is a section B. I type in the address bar site.com/B I want this to load section B into the movie without replaying the animation and reloading the movie. The movie is downloaded so all I need to do is make the movie understand to do it. I'm thinking a dynamic variable on the object tag can do this. I don't want to have to do any loadVar because it will make for some timing problems.
Is it that really all you need is an HttpHandler that processes a cookie (currentrequestedsection - which contains the section of the flash movie to load) and then instructs your flash movie to load that section...

So if a user types in /AboutUs.aspx

your handler intercepts that request and instead sets the currentrequestedsection cookie to read "aboutus.swf"... or puts it
in the query string (don't know how flash reads parameters the easiest).?

(EDIT HOLD THE PHONE... U JUST POSTED WHILE I JUST POSTED THIS.. let me read your post)
Eh... nevermind... i think my post is exactly opposite of what you were getting at.
I think I know how to do it, but it's going to be a bit before I can get a good test.

I'm going to check a var on the first frame(movie) and act based on it/them.
One will track if the movie has been loaded; the others will work with loading the sections.

I think a cookie may be worth a try. That's what I am trying to find the right answer for. Passing the variables to flash without having to loadVar cause that will take time I don't want to be sitting there. I want the variable to be quick access.

0 comments:

Post a Comment