Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 17th, 2003, 01:16 PM
BobMallett BobMallett is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Location: France
Posts: 190 BobMallett User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 5 h 44 m 6 sec
Reputation Power: 8
passing frame numbers between pages

Hi,

I have a movie menu in index.html:

a.
b.

when a user clicks a. we goto a frame which contains the following:

a.
1
2
3
b.

so the menu opens up.

However if at the same time we load in a new page (a.html) which contains this movie the command to goto that frame is lost and so I only see

a.
b.

How do I pass the goto frame x to the movie in the next page?

I t sounds simple enough but it has me stumped. In php I would simply append a variable to the end of the url

a.php?myvariable='frame_x'

Any help would be appreciated. I'm using Flash 5

Thanks

Bob

Reply With Quote
  #2  
Old February 17th, 2003, 02:20 PM
bret bret is offline
flash junkie
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: CO, USA
Posts: 172 bret User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 38 sec
Reputation Power: 6
Send a message via Yahoo to bret
hello,

you can append the .swf embedding just like a .php file.

mymovie.swf?x=5

x will be assigned 5 in the timeline of mymovie.swf

hope that helps,

bret

Reply With Quote
  #3  
Old February 17th, 2003, 03:07 PM
BobMallett BobMallett is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Location: France
Posts: 190 BobMallett User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 5 h 44 m 6 sec
Reputation Power: 8
Further explanation

Hi,

Ok that's promising but I have a question or 2

1. The movie is in an html doc so the getURL is foo.html not foo.swf so how does this work with and html doc that has the movie embedded?

2. The frames are named so how would the appending work here. If I have a Frame called menu_a_open and want to go to this part of the movie when I click on a. how would I append the URL?

Thanks for your help.

Bob

Reply With Quote
  #4  
Old February 17th, 2003, 03:35 PM
bret bret is offline
flash junkie
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: CO, USA
Posts: 172 bret User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 38 sec
Reputation Power: 6
Send a message via Yahoo to bret
you would have to edit your embed tag. It has an embed tag and an object tag by default (for netscape and IE). look at your source and where the src attribute is, something.swf just append it there. if you need to pass in different variables, then you might consider writing the page dynamically with those variables or using javascript nad getURL/FSCommands to communicate with the browser. Frames are tricky to deal with whilst passing variables in, but if you specify a different .html file, you can embed different variables into the .swf in the embed tag.

hope that makes sense,

bret

Reply With Quote
  #5  
Old February 17th, 2003, 03:37 PM
bret bret is offline
flash junkie
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: CO, USA
Posts: 172 bret User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 38 sec
Reputation Power: 6
Send a message via Yahoo to bret
and i think i mistook frames in flash for frames in html .. if you have frames in html, you can just use the same method. In the first frame of your movie:

movie.swf:
if(frameVariable){
gotoAndStop(frameVariable);
} else {
stop();
//this code would stop


movie.swf?frameVariable=navigation1
if(frameVariable){
gotoAndStop(frameVariable);
} else {
stop();
//this code would go to the frame "navigation1"

make more sense?

bret

Reply With Quote
  #6  
Old February 18th, 2003, 12:11 PM
BobMallett BobMallett is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Location: France
Posts: 190 BobMallett User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 5 h 44 m 6 sec
Reputation Power: 8
Makes Sense

Hi,

Thanks for your help. It all makes sense but the solution looks complex.

If I construct my site using 2 (html) frames and have the movie/menu in (say) the left frame and I use

on (release) {
gotoAndStop ("frame_name");
}
on (release) {
getURL (apage.html, _content);
}

in the movie.

When the user clicks on the button to which this action is attached then the movie goes to (frame_name) and apage.html loads into the content window. All works fine.

What I want is the same result but I want to eliminate (html) frames. So I need the movie loaded in the first page to tell the movie in the second page to go to (frame_name) when it loads.

In just the same way as I would using a bookmark in html:

<A href="apage.html#bookmark5">user click this link</A>

This would load apage.html and take me to bookmark5 on the page.

Flash cannot it seems even duplicate this simple function (ie pass a bookmark to an html page). Also it cannot pass a variable from one movie to another without utilising Javascript or php.

Seems pretty limited. Say I wanted to have someone pick a color and then load in a movie with text displayed in that colour?

I'd simply do

<?php

echo "<A href='apage.php?color=red'>click here for red text</A>";

?>

and then in apage.php I'd write

<?php

if (color =='red')

{
echo "<FONT COLOR='Red'>This text in red</FONT>";
}

else

{
echo "Normal text";
}
?>

Flash doesn't seem to able to pass the variable color=red from a movie embedded in one page to another movie embedded in a second page.

Is this for real?

Thanks for your thoughts anyway.

Reply With Quote
  #7  
Old February 18th, 2003, 12:42 PM
bret bret is offline
flash junkie
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: CO, USA
Posts: 172 bret User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 38 sec
Reputation Power: 6
Send a message via Yahoo to bret
okay, you would probably want to use FlashVars. FlashVars are parameters in the Object/Embed Tag... they are created prior to the first frame of the flash movie but can be utilised in the movie. But if you are trying to pass variables between movies on the same html page (or another frame) it's impossible without javascript. Even with javascript, you have to use the SetVariable method, which is not cross platform... it is a very large weakness in Flash though, you're correct...

here's what macromedia has to say about FlashVars

http://www.macromedia.com/support/f...s/flashvars.htm

a possible solution is to make your whole page flash.. then you could control everything... (and on a side note, with your code, you can just use one on(release function)

on (release) {
gotoAndStop ("frame_name");
getURL (apage.html, _content);
}

bret

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > passing frame numbers between pages


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway