FORUMS: list search recent posts

Flash Intro-get url

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Alyssa Morley
Flash Intro-get url
on Oct 8, 2009 at 4:22:41 pm

Hello,
I am new to coding and web design so please excuse my ignorance. I have created an introductory video for my website. Basically when the movie is done playing I want it to automatically load my homepage. What I have done is that after the movie is done playing I put a key frame in and added an action:
stop()
sendToURL("index.html", "_self")

Flash come back and give me the error message:

1067: Implicit coercion of a value of type String to an unrelated type flash.net:URLRequest.

1137: Incorrect number of arguments. Expected no more than 1.


I am using CS4. Can someone help me? Thank you so much!


Return to posts index

Adam Ashby
Re: Flash Intro-get url
on Oct 12, 2009 at 11:03:55 pm

if its AS2 ti would be:

getURL("index.html", "_self") ;

if its AS3 it would be:

navigateToURL(new URLRequest("index.html"),"_self");

Adam Ashby
mutli-media artist
http://www.adamashby.com


Return to posts index

George McLaughlin
Re: Flash Intro-get url
on Oct 20, 2009 at 5:44:01 pm

I hope this continues the conversation. I'm working in Flash 8 with AS2.

I import the .flv that is my load video to stage in Flash, with no skin, progressive download, it appears in the viewer and there is one frame in layer 1. Now what do I do? What action to I apply to make the clip play and then launch my webpage? Do i apply it to the single frame? Do I need to convert the .flv to a symbol? I'm all turned around.

Then once that is figured out, how do I launch it. Do I simply put it in my index.html page?
Any help would be great.


Return to posts index


Adam Ashby
Re: Flash Intro-get url
on Oct 20, 2009 at 10:04:20 pm

I would suggest using adobe.com, help docs, & googling on how to use FLVplayback. Your video should automatically start playing, thats the default setting. If you want to control it via actionscript you need to give the flvplayback component an instance name. You can put the AS on the same layer or on a new empty layer, it doesn't matter. Then you could use an event listener like this ( instance name is "myVideo"):

myVideo.addEventListener("complete", the_end);

function the_end(eventObject:Object):Void {
getURL("page.html", "_self");
};




Adam Ashby
mutli-media artist
http://www.adamashby.com


Return to posts index

Kim Ciabattari
Re: Flash Intro-get url
on Oct 20, 2009 at 6:45:42 pm

Thanks, Adam, this is very helpful.

In AS3 do you know what code I can add so that it waits a few seconds before loading the new page?


Return to posts index

Adam Ashby
Re: Flash Intro-get url
on Oct 20, 2009 at 9:28:15 pm

you could use a timer. Inside the parameters the timer class can have 2 arguments delay and repeatCount. The "delay" specifies the interval of time, which is fired in milliseconds. The "repeatCount" determines how many times you want the event to fire and is optional.

example:

var myTimer:Timer = new Timer(2000, 1);
myTimer.addEventListener(TimerEvent.TIMER, onTime);
myTimer.start();

function onTime(evt:TimerEvent):void{
navigateToURL(new URLRequest("page.html"),"_self");
};

Adam Ashby
mutli-media artist
http://www.adamashby.com


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]