Flash CS3 - Flash CS4

Free tutorials and scripts for all.
Actionscript 3.0

Navigation noob

This is a discussion on Navigation noob within the Actionscript 3.0 newbies forums, part of the Flash CS3 eng category; I am trying to make a flash-based navigation for HTML content. For previous flash versions, it seems that using ...


Go Back   Forum Flash CS3 Flash CS4 > English Forums > Flash CS3 eng > Actionscript 3.0 newbies

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  7 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 16-08-07, 21:56
Junior Member
 
Join Date: Aug 2007
Posts: 6
Rep Power: 0
p_su is on a distinguished road
Navigation noob

I am trying to make a flash-based navigation for HTML content. For previous flash versions, it seems that using frames is the way to go. Is this still the case? To have your flash in one frame, and use it to change html pages in the other frame? If so, how do you go about doing this? Would you use URLreqest and navigatetoURL? I looked into the navigatetoURL, and it doesn't appear to have the same options as getURL did- like specifying frame names to make your html content load to a specific frame.
Thanks for the help on this - and thanks for a great site too! This is the only place I've found that actually bothers explaining actionscript 3.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #2 (permalink)  
Old 16-08-07, 22:14
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,444
Rep Power: 6
Flep is on a distinguished road
Hi :)

How did you do with AS 2.0 ?
Perhaps i can find a way to do the same with AS 3.0.
I never worked with html frames and flash before so please, write a sample of AS 2.0 ;)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 17-08-07, 21:55
Junior Member
 
Join Date: Aug 2007
Posts: 6
Rep Power: 0
p_su is on a distinguished road
I am very new to flash - so I haven't done it myself before. If you know a way of making a flash menu control html content that is better, feel free to suggest a method. I just want a flash menu to navigate a site, so the simpler the better at this point :)

(the following is pasted in from Macromedia Flash - ActionScript Dictionary : getURL)

Here is the syntax for getURL from AS 2.0:

getURL(url [, window [, "variables"]])

Parameters
url The URL from which to obtain the document.
window An optional parameter specifying the window or HTML frame that the document should load into. You can enter the name of a specific window or choose from the following reserved target names:

_self specifies the current frame in the current window.
_blank specifies a new window.
_parent specifies the parent of the current frame.
_top specifies the top-level frame in the current window.
variables
A GET or POST method for sending variables. If there are no variables, omit this parameter. The GET method appends the variables to the end of the URL, and is used for small numbers of variables. The POST method sends the variables in a separate HTTP header and is used for sending long strings of variables.

The usage I saw was something along these lines:

getURL("http://www.google.com", "mainframe");

You would then put your flash into one frame on the top/side, and then have the main part of the site appear in the frame labeled mainframe. I didn't see that the new methods support passing anything other than _self, _blank, _parretnt, or _top. It doesn't look like you can reference your own frame anymore, which makes it seem to be that there is a cleaner way of doing this - I've just no idea what it would be.

getURL doesn't exist in AS3.0 - it is replaced by URLrequest and navigatetoURL. Here are the two links which seemed to tell me the most about those two functions.
flash.net.URLRequest (Flex? 2 Language Reference)
http://livedocs.adobe.com/flex/2/doc...=00001010.html

Thanks for your help.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #4 (permalink)  
Old 17-08-07, 22:08
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,444
Rep Power: 6
Flep is on a distinguished road
Try this one:

Code:
myButtonName.addEventListener(MouseEvent.CLICK,callTheFrame);

function callTheFrame(event:MouseEvent):void
{
	var request:URLRequest=new URLRequest("http://www.mysite.com");
	navigateToURL(request,"NameOfTheFrame");
}
this command works like the previous getURL();

Replace the site url and the NameOfTheFrame ;)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #5 (permalink)  
Old 21-08-07, 05:47
Junior Member
 
Join Date: Aug 2007
Posts: 6
Rep Power: 0
p_su is on a distinguished road
Thanks. This is what I'm looking for. I tried out the code, and substituted in my site page and frame designator. The button functions and opens the page I entered in, but only in a new browser window (or new tab in firefox). Can you point me to where the problem might be? I specified the frame name in dreamweaver (I'm using MX 2004) - using both frame name and also ID and Label under the CSS/acessability pane. I realize you may not be familiar with dreamweaver, but if there is an option in flash that might be interfering, I figured you'd probably know about it. :)

*edit
I am upgrading dreamweaver to CS3 - just in case that might be a problem. It was going to happen anyway, so now is as good a time as any. I know my version is old, so perhaps that'll do the trick. Thanks again for your help!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Flash Multi Gallery
  #6 (permalink)  
Old 21-08-07, 07:25
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,444
Rep Power: 6
Flep is on a distinguished road
Hi,
try to add this parameter to your html page ( just where you add the SWF ):
Code:
<param name="allowScriptAccess" value="sameDomain" />
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #7 (permalink)  
Old 22-08-07, 01:15
Junior Member
 
Join Date: Aug 2007
Posts: 6
Rep Power: 0
p_su is on a distinguished road
I tried adding in the code in the html for my flash button - under these lines:

<param name="movie" value="button.swf">
<param name="quality" value="high">

Let me know if that is not the correct location. The page i specify still loads in a new window. I tried using the four reserved commands instead of my frame name to see what would happen. _blank, _self, and _top work correctly. _parent does not seem to work, and instead opens in another page. The frame where the button is located is nested twice, so it should open in one of the existing frames on the page. It seems to be having the same problem, whatever that is :wall:, as when I specify a custom frame name. Not sure if that helps you troubleshoot, but thought I'd add that info in. As always, thanks for your help!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #8 (permalink)  
Old 22-08-07, 08:16
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,444
Rep Power: 6
Flep is on a distinguished road
Hi,

doubt: has your iframe a correct definition in the html page ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #9 (permalink)  
Old 24-08-07, 02:33
Junior Member
 
Join Date: Aug 2007
Posts: 6
Rep Power: 0
p_su is on a distinguished road
I checked again - and as far as I am able to determine, the Iframe is set up correctly. I am now using dreamweaver CS3 - which as an insert Iframe option. I created an html page with nothing on it except the flash button and an Iframe - but the behavior was still the same - it opens the content in a new window. I think I may try to pursue another option at this point - I can't seem to get this working. Thanks again for all your help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #10 (permalink)  
Old 24-08-07, 07:33
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,444
Rep Power: 6
Flep is on a distinguished road
Ok p_su,
if you get news, let us know them please :)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
Flash 8 [total noob] Controllare un movieclip da un'altra timeline Amaca Actionscript 3.0 base 7 01-10-08 17:22
Photoshop CS3 Creating a navigation menu Flep PhotoShop ENG 1 23-06-08 09:12
Need help in navigation system rashid Flash CS3 eng 1 04-06-08 14:54
Navigation problem madmad Actionscript 3.0 newbies 3 12-05-08 18:53
NEW NooB XD vieriu Flash CS3 generale 2 18-12-07 15:05


All times are GMT. The time now is 10:01.


Powered by vBulletin versione 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC4
Forum SiteMap


FlepStudio
by Filippo Lughi
P.IVA 03605860406